kern

White space theme for Hugo
Log | Files | Refs | LICENSE

page.html (1485B)


      1 {{- define "main" -}}
      2   {{- $wc := .WordCount -}}
      3   {{- $microPostLen := .Site.Params.microPostLen -}}
      4   {{- if le $wc $microPostLen }}
      5     <article class="micro-post">
      6   {{ else }}
      7     <article class="regular-post">
      8   {{ end -}}
      9   <h1 class="pagetitle">{{ .Title }}</h1>
     10   {{- if .Date }}
     11     <div class="metadata">
     12       {{ with .Date -}}
     13         {{- $dateTime := . | time.Format "2006-01-02T15:04:05-07:00" }}
     14         {{- $dateF := . | time.Format ":date_short" }}
     15         {{- $timeF := . | time.Format ":time_short" -}}
     16         <span>
     17           <time id="publication-date-time" datetime="{{ $dateTime }}">{{ $dateF }}, {{ $timeF }}</time>
     18         </span>
     19       {{ end -}}
     20       {{- with .GetTerms "tags" -}}
     21       <span class="seperator">&middot;</span>
     22         <span class="tags">
     23           {{ range . }}
     24             {{- partial "tag.html" . -}}
     25           {{ end -}}
     26         </span>
     27       {{ end -}}
     28     </div>
     29     {{- end }}
     30     {{ .Content -}}
     31   </article>
     32   {{- if and (eq .Type "posts") (or .PrevInSection .NextInSection) }}
     33     <nav class="post-nav">
     34       {{- with .NextInSection }}
     35         <div class="prev-post">
     36           <a href="{{ .RelPermalink }}" rel="prev">‹ {{ T "nextPost" }}</a>
     37         </div>
     38       {{ else }}<div class="prev-post"></div>{{ end -}}
     39       {{- with .PrevInSection }}
     40         <div class="next-post">
     41           <a href="{{ .RelPermalink }}" rel="next">{{ T "prevPost" }} ›</a>
     42         </div>
     43       {{ end -}}
     44     </nav>
     45   {{ end -}}
     46 {{ end -}}