mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-29 13:27:34 +00:00
28 lines
998 B
Plaintext
28 lines
998 B
Plaintext
{{ define "title" }}
|
|
<title>{{ .Data.Title }} - {{ .Blog.Title }}</title>
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<main>
|
|
{{ with .Data.Title }}<h1>{{ . }}</h1>{{ end }}
|
|
{{ with .Data.Description }}{{ md . }}{{ end }}
|
|
<p><a href="{{ .Blog.RelativePath .Data.Download }}" class="button" download>{{ string .Blog.Lang "download" }}</a></p>
|
|
{{ $lang := .Blog.Lang }}
|
|
{{ range .Data.Outlines }}
|
|
{{ $title := .Title }}
|
|
{{ if not $title }}{{ $title = .Text }}{{ end }}
|
|
<h2 id="{{ urlize $title }}">{{ $title }} ({{ len .Outlines }})</h2>
|
|
<ul>
|
|
{{ range .Outlines }}
|
|
{{ $ct := .Title }}
|
|
{{ if not $ct }}{{ $ct = .Text }}{{ end }}
|
|
<li><a href="{{ .HTMLURL }}" target="_blank">{{ $ct }}</a> (<a href="{{ .XMLURL }}" target="_blank">{{ string $lang "feed" }}</a>)</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</main>
|
|
{{ end }}
|
|
|
|
{{ define "blogroll" }}
|
|
{{ template "base" . }}
|
|
{{ end }} |