<!doctype html>
<html lang="en">
<head>
- {{ partial "meta.html" . }}
- {{ $style := resources.Get "css/style.css" | resources.Minify }}
- <link rel="stylesheet" href="{{ $style.RelPermalink }}?v=1.1.2">
- {{ $index := $.Site.GetPage "/" }}
- {{ range $index.AlternativeOutputFormats }}
- {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
- {{ end }}
+ {{ partial "head.html" . }}
</head>
<body>
{{ end }}
</main>
<footer>
+ {{ $index := $.Site.GetPage "/" }}
{{ with $index.OutputFormats.Get "RSS" }}
<p><a href="{{ .RelPermalink }}">RSS feed</a> | This site is <a href="http://git.dujemihanovic.xyz/?p=dujemihanovic.xyz.git;a=summary">free software</a></p>
{{ end }}
--- /dev/null
+{{ define "main" }}
+{{ .Content }}
+<h1>Recent Posts</h1>
+<ul>
+ {{ range first 5 ($.Site.GetPage "/posts").Pages }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Date.Format "January 2, 2006" }}</li>
+ {{ end }}
+</ul>
+<ul style="list-style: none;"><li><a href="/posts">Read all the posts</a></li></ul>
+
+{{ end }}
--- /dev/null
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="description" content="Duje Mihanović's personal website">
+<title>{{ print .Page.Title }} | {{ print .Site.Title }}</title>
+{{ $style := resources.Get "css/style.css" | resources.Minify }}
+<link rel="stylesheet" href="{{ $style.RelPermalink }}?v=1.1.2">
+{{ $index := $.Site.GetPage "/" }}
+{{ range $index.AlternativeOutputFormats }}
+{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
+{{ end }}
+++ /dev/null
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta name="description" content="Duje Mihanović's personal website">
-<title>{{ print .Page.Title }} | {{ print .Site.Title }}</title>