yamt

YAMT: Yet Another Minimal Theme for Hugo
git clone https://git.ckiri.com/yamt.git
Log | Files | Refs | LICENSE

preview.html (963B)


      1 <div class="preview">
      2 {{- $wc := .WordCount }}
      3 {{- $microPostLen := .Site.Params.microPostLen }}
      4 <article class="{{ if le $wc $microPostLen }}preview-micro-post{{ else }}preview-regular-post{{ end }}" id="{{ .File.ContentBaseName }}">
      5 <h2 class="preview-post-title">{{ .Title }}</h2>
      6 {{ .Summary }}
      7 <div class="preview-footer"> 
      8 <div class="preview-footer-left metadata">
      9 {{- $dateTime := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
     10 {{- $dateF := .Date | time.Format ":date_medium" }}
     11 {{- $timeF := .Date | time.Format ":time_short" }}
     12 <time id="publication-date-time" datetime="dateTime">{{ $dateF }} {{ $timeF }}</time>
     13 </div>
     14 <div class="preview-footer-right"> 
     15 <nav id="post-link"> 
     16 {{- if le $wc $microPostLen }}
     17 <a href="{{ .RelPermalink }}">{{ T "show" }}</a>
     18 {{- else }}
     19 <a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
     20 <span id="reading-time">(~{{ .ReadingTime }}&thinsp;{{ T "min" }})</span>
     21 {{- end }}
     22 </nav>
     23 </div>
     24 </div>
     25 </article>
     26 </div>