diff options
Diffstat (limited to 'layouts/posts')
-rw-r--r-- | layouts/posts/list.gmi | 20 | ||||
-rw-r--r-- | layouts/posts/single.gmi | 33 |
2 files changed, 53 insertions, 0 deletions
diff --git a/layouts/posts/list.gmi b/layouts/posts/list.gmi new file mode 100644 index 0000000..40a0ba5 --- /dev/null +++ b/layouts/posts/list.gmi @@ -0,0 +1,20 @@ +{{- define "main" }} +<h1>{{ .Title }}</h1> +{{ .Content }} +{{- range .Sections }} + <h2>{{ .Title }}</h2> + <ul> + {{- range .Pages }} + <li> + <a href="{{ .Permalink }}">{{ .Title }}</a> + <small> + {{ .Date | dateFormat "2006-01-02" }} + {{- range .Params.tags }} + <a href="/tags/{{ . | lower }}">#{{ . }}</a> + {{- end }} + </small> + </li> + {{- end }} + </ul> +{{- end }} +{{- end }} diff --git a/layouts/posts/single.gmi b/layouts/posts/single.gmi new file mode 100644 index 0000000..cab9527 --- /dev/null +++ b/layouts/posts/single.gmi @@ -0,0 +1,33 @@ +{{ define "main" }} +<article> + <header> + <h1>{{ .Title }}</h1> + {{- range .Params.tags }} + <a href="/tags/{{ . | lower }}">#{{ . }}</a> + {{- end }} + {{- if .Draft }} + <section class="admonition"> + <div class="admonition-title"> + draft + </div> + <div class="admonition-content"> + This blog post is still a + <strong>draft</strong>. It has most likely been + shared with you for reviewing purposes. Please + do not yet share this with other people. + </div> + </section> + {{- end }} + </header> + <main> + {{ .Content }} + </main> + <footer> + <p class="text-center"> + <a class="image-link" rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> + <img alt="Creative Commons License" src="/img/cc-by-sa.png"> + </a> + </p> + </footer> +</article> +{{ end }} |