templates/index.html (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
<!doctype html> <html lang=en> <head> {{ template "partials/head.html" }} <meta name="description" content="{{ .Meta.subtitle }}"> </head> <title> {{ .Meta.title }} </title> <body> <main> <div class="sidenav"> {{ template "partials/nav.html" }} </div> <article> <section class="my-12 py-12 border-b border-light-gray"> {{ .Body }} </section> <section> <h2 class="pb-6">writing</h2> <ul class="m-0 p-0"> {{ $posts := .Extra.blog }} {{ range slice $posts 0 3 }} <li class="list-none py-2"> <div class="flex md:flex-row flex-col justify-between"> <div> <a href=/{{ .Meta.slug }}>{{ .Meta.title }}</a> {{ if .Meta.draft }} (<span class="draft">draft</span>) {{ end }} <p class="text-gray">{{ .Meta.subtitle }}</p> </div> {{ $dateStr := .Meta.date }} {{ $date := parsedate $dateStr }} <div class="text-gray lowercase">{{ $date.Format "02 Jan, 2006" }}</div> </div> </li> {{ end }} </ul> <a class="border-b-0" href="/blog/"><span>more →</span></a> </section> </article> </main> <footer> {{ template "partials/footer.html" }} </footer> </body> </html> |