ybbond

My site. The main domain
Log | Files | Refs | README | LICENSE | CC-LICENSE

index.html (1349B)


      1 {{ define "main" }}
      2   {{ $postURL := "/posts" | absURL }}
      3   {{ $notesURL := "/micro" | absURL }}
      4 
      5   <article>
      6     {{ .Content }}
      7   </article>
      8 
      9   <hr>
     10 
     11   <h2>Blog Posts:</h2>
     12   <div href={{ $postURL }} class="listing__top">
     13     {{ range first 5 (where .Site.RegularPages "Section" "posts") }}
     14       <a
     15         href={{ .Permalink }}
     16         class="listing__post"
     17       >
     18         <h3 class="listing__post__title">
     19           {{ .Title }}
     20         </h3>
     21         <time class="listing__post__date">
     22           {{ .Date.Format "02 Jan 2006" }}
     23         </time>
     24         {{ with .Description }}
     25           <p class="link-white listing__post__description">{{ . | safeHTML }}</p>
     26         {{ end }}
     27         <p class="listing__post__description">Read More »</p>
     28       </a>
     29     {{ end }}
     30   </div>
     31   <p class="main__more"><a href={{ $postURL }} class="button">More Blogs ⤳</a></p>
     32 
     33   <hr>
     34 
     35   <h2>My Micro:</h2>
     36   <div class="listing__bottom">
     37     {{ range first 5 (where .Site.RegularPages "Type" "in" (slice "notes" "responses")) }}
     38       {{ .Scratch.Set "scope" "list" }}
     39       {{ if eq .Type "responses" -}}
     40         {{ partial "post/responses-item.html" . }}
     41       {{ else -}}
     42         {{ partial "post/notes-item.html" . }}
     43       {{ end -}}
     44     {{ end }}
     45   </div>
     46   <p class="main__more"><a href={{ $notesURL }} class="button">More Micros ⤳</a></p>
     47 
     48 
     49 {{ end }}