summaryrefslogtreecommitdiff
path: root/layouts/_default/single.html
diff options
context:
space:
mode:
authorMichał M. Sapka <michal@sapka.me>2023-05-16 10:36:15 +0200
committerMichał M. Sapka <michal@sapka.me>2023-05-16 10:36:32 +0200
commit1483ffedca544f5908340b33b5d29fee110800f9 (patch)
treea6f14fe662c935217e3e82ee51c920d9e2a0a10d /layouts/_default/single.html
parenta14ecdf1402fd91ef3d1946178f4b69517d5e98e (diff)
feat: improve article view
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r--layouts/_default/single.html51
1 files changed, 33 insertions, 18 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index bc058fb..1ef78b3 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,30 +1,45 @@
{{ define "main" }}
<article>
- {{ partial "partials/full_post.html" . }}
+ <a href="{{ .Page.Permalink }}">
+ <h2>{{ .Page.Title }}</h2>
+ </a>
+ {{- if not (eq .Page.Type "special") }}
+ <time datetime="{{.PublishDate }}">
+ {{ .PublishDate.Format "January 2, 2006" }}
+ </time>
+ {{- end }}
+ <div>
+ {{ .Page.Content }}
+ </div>
-{{- if not (in .Params.category "pages") }}
- <BR>
- {{- if isset .Params "tags" -}}
+ {{- if not (in .Params.category "pages") }}
+ <aside>
+ {{- if isset .Params "tags" -}}
{{- $tagsLen := len .Params.tags -}}
{{- if gt $tagsLen 0 -}}
- &nbsp;with tags:
- {{- range $k, $v := .Params.tags -}}
- {{- $url := printf "tags/%s" (. | urlize | lower) -}}
- <a href="{{ $url | absURL }}"> {{ . | title }}</a>
- {{- if lt $k (sub $tagsLen 1) }} &middot; {{ end -}}
- {{- end -}}
+ <h3>Tags</h3>
+ {{- range $k, $v := .Params.tags -}}
+ {{- $url := printf "tags/%s" (. | urlize | lower) -}}
+ <a href="{{ $url | absURL }}"> {{ . | title }}</a>
+ {{- if lt $k (sub $tagsLen 1) }} &middot; {{ end -}}
{{- end -}}
+ {{- end -}}
+ </aside>
{{- end }}
+ {{- if not (eq .Page.Type "special") }}
+ <aside>
+ <h3>Author</h3>
+ <p>
+ Hey! I'm Michał Sapka, a computer programmer living in Kraków, Poland. This website is not dedicated to any particular one thing. Instead, I write whatever interests me most at the moment. No content here is auto-generated, so any bugs, problems, or controversies are entirely on me!
+ </p>
+ <p>
+ I don't have any commenting system, but comments over <a href="/about#contact">email</a> are more than welcome!
+ </p>
+ </aside>
+ {{- end }}
</article>
- {{ if or .Next .Prev -}}
- <div>
- {{- with .Prev }} <a class="prev-link" href="{{ .RelPermalink}}"> &#8592; Previous</a> {{ end -}}
- {{- with .Next -}}<a class="next-link" href="{{ .RelPermalink}}">Next &#8594;</a> {{ end -}}
- </div>
- {{ end -}}
-
- {{ end }}
+{{ end }}
{{ end }}