blog/layouts/home.html

27 lines
816 B
HTML
Raw Normal View History

2022-01-25 00:35:39 +00:00
{{- define "body" -}}
2020-11-03 22:14:45 +00:00
2022-01-25 00:35:39 +00:00
<div id="homepageContainer">
<div id="homepage">
<h1 id="title">michael zhang</h1>
2020-11-03 22:14:45 +00:00
2022-01-25 00:35:39 +00:00
<div id="about">{{ .Content }}</div>
2020-11-03 22:14:45 +00:00
2022-01-25 00:35:39 +00:00
<h2 id="blog-posts-title"><a href="/posts">recent blog posts &raquo;</a></h2>
<ul id="blog-posts">
2022-02-02 09:19:09 +00:00
{{ $posts := where (.GetPage "/posts").Pages "Draft" false }}
{{- range first 3 $posts -}}
<li><a href="{{ .RelPermalink }}" class="blog-post-link">
2022-01-25 00:35:39 +00:00
<span class="blog-post">
<span class="title">{{ .Title }}</span>
<small class="details">
{{ .Date.Format "Mon Jan 02, 2006" }}
</small>
</span>
</a></li>
2022-01-25 00:35:39 +00:00
{{- end -}}
</ul>
2022-01-25 00:35:39 +00:00
</div>
</div>
2021-07-06 21:32:34 +00:00
2020-11-03 22:14:45 +00:00
{{- end -}}