Serge Bazanski | 4915425 | 2020-10-24 20:22:08 +0200 | [diff] [blame] | 1 | {{ define "header" }}<!doctype html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="author" content="{{ html .Site.Other.Author }}"> |
| 6 | <link rel="alternate" type="application/atom+xml" title="{{ html .Site.Other.Title }} feed" href="{{ .Rel "blog.atom" }}"> |
| 7 | <title>{{ .Site.Other.Title }}{{ if .Title }}: {{ .Title }}{{ end }}</title> |
| 8 | <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"> |
| 9 | <link rel="stylesheet" type="text/css" href="{{ .Rel "static/style.css" }}"> |
| 10 | </head> |
| 11 | <body> |
| 12 | {{ end }} |
| 13 | |
| 14 | {{ define "footer" }} |
| 15 | </body> |
| 16 | </html> |
| 17 | {{ end }} |
| 18 | |
| 19 | {{define "date"}} |
| 20 | <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}"> |
| 21 | {{ .Format "2006, January 02" }} |
| 22 | </time> |
| 23 | {{end}} |
| 24 | |
| 25 | {{ define "page" }}{{ template "header" . }} |
| 26 | {{ .Content }} |
| 27 | {{ template "footer" . }}{{ end }} |
| 28 | |
| 29 | {{ define "post" }} |
| 30 | <article> |
| 31 | <header> |
| 32 | <h1>{{ .Title }}</h1> |
| 33 | <div class="info"> |
| 34 | {{ template "date" .Date }} — |
| 35 | {{ range $i, $t := .Tags }}{{if $i}},{{end}} |
| 36 | <a href="/tags/{{ $t }}/">{{ $t }}</a>{{ end }} |
| 37 | </div> |
| 38 | </header> |
| 39 | <section> |
| 40 | {{ .Content }} |
| 41 | </section> |
| 42 | </article> |
| 43 | {{ end }} |
| 44 | |
| 45 | {{define "tag"}} |
| 46 | # Pages tagged with {{ .Title }} |
| 47 | {{ range .Site.Pages.WithTag .Title }} |
| 48 | - [{{ .Title }}](../../{{ .Url }}) |
| 49 | {{ end }} |
| 50 | {{ end }} |