davideisinger.com

My personal website
Log | Files | Refs | README

index.html (1675B)


      1 {{ define "main" }}
      2   {{ .Content }}
      3 
      4   <ul>
      5     {{ $recentDispatch := first 1 (where .Site.RegularPages "Params.tags" "intersect" (slice "dispatch")) }}
      6     {{ with index $recentDispatch 0 }}
      7       <li>
      8         <a href="{{ .Permalink }}">Read the latest dispatch</a>
      9       </li>
     10     {{ end }}
     11 
     12     <li>
     13       <a href="/music">Music I’ve made</a>
     14     </li>
     15 
     16     <li>
     17       <a href="https://dispatch.davideisinger.com/subscription/form">Subscribe via email</a>
     18     </li>
     19 
     20     <li>
     21       <a href="/about">More about me</a>
     22     </li>
     23   </ul>
     24 
     25   <section>
     26     <hr>
     27 
     28     <h3>
     29       <a href="/journal/">Journal</a>
     30     </h3>
     31 
     32     <ul>
     33       {{ range first 5 (where .Site.RegularPages "Type" "in" "journal") }}
     34         <li>
     35           <p>
     36             <a href="{{ .Permalink }}">{{ .Title }}</a>
     37             <span class="nowrap">
     38               {{ .Date | time.Format "(2006-01-02)" }}
     39             </span>
     40           </p>
     41 
     42           {{ .Summary }}
     43         </li>
     44       {{ end }}
     45     </ul>
     46   </section>
     47 
     48   <section>
     49     <hr>
     50 
     51     <h3>
     52       <a href="/elsewhere/">Elsewhere</a>
     53     </h3>
     54 
     55     <ul>
     56       {{ range where (where .Site.RegularPages "Type" "in" "elsewhere") "Params.featured" "=" true }}
     57         {{ $url := urls.Parse .Params.canonical_url }}
     58         {{ $host := strings.Replace $url.Hostname "www." "" }}
     59 
     60         <li>
     61           <p>
     62             <a href="{{ .Permalink }}">{{ .Title }}</a>
     63             <span class="nowrap">
     64               (<a href="{{ $url }}">{{ $host }}</a>, {{ .Date | time.Format "2006-01-02" }})
     65             </span>
     66           </p>
     67 
     68           {{ .Summary }}
     69         </li>
     70       {{ end }}
     71     </ul>
     72   </section>
     73 
     74   {{- partial "marky.html" . -}}
     75 {{ end }}