summaryrefslogtreecommitdiff
path: root/template/root.tmpl
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-06-19 16:17:17 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-06-19 16:17:17 +0200
commit09f85ffd3eb84c605ef0b851a054fce310b9c8cf (patch)
tree0c9915e59ffc12ff6c23329e43f44fa20e88eef0 /template/root.tmpl
parenta344cef5099d4bf5416cec9601557e44ba2343b7 (diff)
Update templates
Diffstat (limited to 'template/root.tmpl')
-rw-r--r--template/root.tmpl21
1 files changed, 19 insertions, 2 deletions
diff --git a/template/root.tmpl b/template/root.tmpl
index 461c82f..8bebe8e 100644
--- a/template/root.tmpl
+++ b/template/root.tmpl
@@ -18,7 +18,9 @@
<head>
<meta charset="UTF-8">
<title>{{template "title" .}}</title>
- <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Abel|Raleway|Anonymous+Pro">
+ <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Abel">
+ <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Raleway">
+ <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Anonymous+Pro">
<link rel="stylesheet" type="text/css" href="/static/style.css">
<link rel="alternate" type="application/atom+xml" title="Atom Feed" href="/feed.atom">
{{template "google"}}
@@ -64,7 +66,7 @@
<article>
<header>
<h2><a href="{{.Path}}">{{.Title}}</a></h2>
- <p><time datetime="{{.Time.Format "2006-01-02 15:04"}}">{{.Time.Format "2 January 2006"}}</time></p>
+ <p>{{template "time" .Time}}</p>
</header>
{{.HTML}}
{{with .Authors}}
@@ -74,3 +76,18 @@
{{end}}
</article>
{{end}}
+
+{{define "time"}}
+<time datetime="{{.Format "2006-01-02 15:04"}}">{{.Format "2 January 2006"}}</time>
+{{end}}
+
+{{define "list"}}
+<dl>
+{{range .}}
+ <dt><a href="{{.Path}}">{{.Title}}</a></dt>
+ <dd>{{template "time" .Time}}
+ {{with .Tags}}<div class="tags">{{range .}}{{.}} {{end}}</div>{{end}}
+ </dd>
+{{end}}
+</dl>
+{{end}}