blog/layouts/home.html
2023-02-04 01:21:20 -06:00

26 lines
816 B
HTML

{{- define "body" -}}
<div id="homepageContainer">
<div id="homepage">
<h1 id="title">michael zhang</h1>
<div id="about">{{ .Content }}</div>
<h2 id="blog-posts-title"><a href="/posts">recent blog posts &raquo;</a></h2>
<ul id="blog-posts">
{{ $posts := where (.GetPage "/posts").Pages "Draft" false }}
{{- range first 3 $posts -}}
<li><a href="{{ .RelPermalink }}" class="blog-post-link">
<span class="blog-post">
<span class="title">{{ .Title }}</span>
<small class="details">
{{ .Date.Format "Mon Jan 02, 2006" }}
</small>
</span>
</a></li>
{{- end -}}
</ul>
</div>
</div>
{{- end -}}