kern

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

home.html (1213B)


      1 {{ define "main" }}
      2 <article>
      3   <h1 class="title">{{ .Site.Title }}</h1>
      4   {{ with .Site.Params.profilePicture }}
      5     <div class="profile-picture">
      6       <img src="{{ . }}">
      7     </div>
      8   {{ end }}
      9   {{ .Content }}
     10 </article>
     11 <hr>
     12 <div class="recent-posts">
     13   <h2 class="title">{{ T "recentPosts" }}</h2>
     14   <div class="row">
     15     {{ range first 3 (where site.RegularPages "Type" "posts") }}
     16       <a class="recent-post-wrapper" href="{{ .RelPermalink }}">
     17         <article class="recent-post">
     18           <h3>{{ .Title }}</h3>
     19           <div class="preview-footer metadata"> 
     20             {{- $dateTime := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
     21             {{- $dateF := .Date | time.Format ":date_medium" }}
     22             {{- $timeF := .Date | time.Format ":time_short" }}
     23             <time id="publication-date-time" datetime="dateTime">{{ $dateF }}, {{ $timeF }}</time>
     24             <span class="seperator">&middot;</span>
     25             <span class="reading-time">{{ .ReadingTime }}&thinsp;MIN</span>
     26           </div>
     27         </article>
     28       </a>
     29     {{ end }}
     30   </div>
     31   <nav class="post-nav">
     32     <a href="{{ absLangURL "posts" }}" class="nav-item">{{ T "showAllPosts" }}</a>  
     33   </nav>
     34 </div>
     35 {{ end }}