davideisinger.com

My personal website
Log | Files | Refs | README

index.html (1154B)


      1 {{ define "main" }}
      2 
      3   <section>
      4     <hr>
      5 
      6     <h3>
      7       <a href="/journal/">Journal</a>
      8     </h3>
      9 
     10     <ul>
     11       {{ range first 5 (where .Site.RegularPages "Type" "in" "journal") }}
     12         <li>
     13           <p>
     14             <a href="{{ .Permalink }}">{{ .Title }}</a>
     15             <span class="nowrap">
     16               {{ .Date | time.Format "(2006-01-02)" }}
     17             </span>
     18           </p>
     19 
     20           {{ .Summary }}
     21         </li>
     22       {{ end }}
     23     </ul>
     24   </section>
     25 
     26   <section>
     27     <hr>
     28 
     29     <h3>
     30       <a href="/elsewhere/">Elsewhere</a>
     31     </h3>
     32 
     33     <ul>
     34       {{ range where (where .Site.RegularPages "Type" "in" "elsewhere") "Params.featured" "=" true }}
     35         {{ $url := urls.Parse .Params.canonical_url }}
     36         {{ $host := strings.Replace $url.Hostname "www." "" }}
     37 
     38         <li>
     39           <p>
     40             <a href="{{ .Permalink }}">{{ .Title }}</a>
     41             <span class="nowrap">
     42               (<a href="{{ $url }}">{{ $host }}</a>, {{ .Date | time.Format "2006-01-02" }})
     43             </span>
     44           </p>
     45 
     46           {{ .Summary }}
     47         </li>
     48       {{ end }}
     49     </ul>
     50   </section>
     51 
     52   {{- partial "marky.html" . -}}
     53 {{ end }}