summaryrefslogtreecommitdiff
path: root/template/root.tmpl
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-04-06 14:59:25 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-04-06 14:59:25 +0200
commit1ca0e11c15d4b5692b9b95c660689fd245ee66bd (patch)
treeb386cfc06f73a9ce92b9bd977fa204342e13cbc9 /template/root.tmpl
parent8b0fb5ba05165d5d57e1fd474e40f18f9acf5fb6 (diff)
Add templates
Diffstat (limited to 'template/root.tmpl')
-rw-r--r--template/root.tmpl87
1 files changed, 87 insertions, 0 deletions
diff --git a/template/root.tmpl b/template/root.tmpl
new file mode 100644
index 0000000..5794c37
--- /dev/null
+++ b/template/root.tmpl
@@ -0,0 +1,87 @@
+{{/* This template is combined with other templates to render blog pages. */}}
+
+{{define "google"}}
+ <meta name="google-site-verification" content="3cwuN4OwVfNZEGTw5Q9UotI2AJCTzr8F7QB8uhtfAWo">
+
+ <script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+ ga('create', 'UA-22272807-1', 'auto');
+ ga('send', 'pageview');
+ </script>
+{{end}}
+
+{{define "root"}}
+<!DOCTYPE html>
+<html>
+<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="/static/style.css">
+ <link rel="alternate" type="application/atom+xml" title="Atom Feed" href="/feed.atom">
+ {{template "google"}}
+</head>
+<body>
+
+<aside>
+ <header>
+ <h1><a href="{{.BasePath}}/">dim-i-tri&nbsp;.&nbsp;org</a></h1>
+ </header>
+
+ {{with .Doc}}
+ {{with .Older}}
+ <h4>Previous article</h4>
+ <p><a href="{{.Path}}">{{.Title}}</a></p>
+ {{end}}
+
+ {{with .Newer}}
+ <h4>Next article</h4>
+ <p><a href="{{.Path}}">{{.Title}}</a></p>
+ {{end}}
+
+ {{with .Related}}
+ <h4>Related articles</h4>
+ <ul>
+ {{range .}}
+ <li><a href="{{.Path}}">{{.Title}}</a></li>
+ {{end}}
+ </ul>
+ {{end}}
+ {{end}}
+
+ <h4>Links</h4>
+ <ul>
+ <li><a href="{{.BasePath}}/index">Blog Index</a></li>
+ <li><a href="/cgi-bin/cvsweb">CVS Repository</a></li>
+ <li><a href="/cgi-bin/cgit.cgi">Git Repository</a></li>
+ <li><a href="//github.com/dim13">GitHub</a></li>
+ <li><a href="ftp://ftp.dim13.org/pub/">Public FTP</a></li>
+ <li><a href="{{.BasePath}}/Who-am-I">Who am I</a></li>
+ </ul>
+
+ <p><img src="avatar/cube.jpg" alt="avatar"></p>
+</aside>
+
+{{template "content" .}}
+
+</body>
+</html>
+{{end}}
+
+{{define "doc"}}
+ <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>
+ </header>
+ {{.HTML}}
+ {{with .Authors}}
+ <footer>
+ <address>By {{authors .}}</address>
+ </footer>
+ {{end}}
+ </article>
+{{end}}