M assets/style.scss => assets/style.scss +10 -10
@@ 198,18 198,19 @@ time.post-time {
blockquote {
color: var(--aside-fg-color);
}
+}
- .footnotes {
- font-size: 0.8rem;
+.footnotes {
+ font-size: 0.8rem;
- ol {
- margin: 0.5rem 0;
- }
+ ol {
+ margin: 0.5rem 0;
+ margin-bottom: 0;
+ }
- p {
- margin: 0;
- margin-top: 0.5rem;
- }
+ p {
+ margin: 0;
+ margin-top: 0.5rem;
}
}
@@ 238,7 239,6 @@ time.post-time {
}
}
-
.post-tags {
margin: 0;
padding: 0;
M layouts/blog/single.html => layouts/blog/single.html +26 -4
@@ 10,12 10,31 @@
{{ partial "feed-icon.html" }}
</span>
</header>
+ {{ $content := .Content }}
{{- if in .Params.tags "math" }}
- <section>{{ replace .Content "$" "<span class=\"inline-math\">$</span>" | safeHTML }}</section>
- {{- else }}
- <section>{{ .Content }}</section>
+ {{ $content := replace $content "$" "<span class=\"inline-math\">$</span>" | safeHTML }}
{{- end }}
- {{- if .Params.tags -}}
+ {{- if .Params.tags }}
+ {{ $footnotes_tag:= `<section class="footnotes" role="doc-endnotes">` }}
+ {{- if strings.Contains $content $footnotes_tag }}
+ {{ $split := split .Content $footnotes_tag }}
+ <section>{{ index $split 0 | safeHTML }}</section>
+ <footer>
+ <section class="post-metadata">
+ tags: [
+ <ul class="post-tags">
+ {{- range .Params.tags }}
+ <li>
+ <a href="/tags/{{ . }}">{{ . }}</a>
+ </li>
+ {{- end }}
+ </ul>
+ ]
+ </section>
+ {{ $footnotes_tag | safeHTML }}{{ index $split 1 | safeHTML }}
+ </footer>
+ {{- else }}
+ <section>{{ $content }}</section>
<footer class="post-metadata">
tags: [
<ul class="post-tags">
@@ 28,6 47,9 @@
]
</footer>
{{- end -}}
+ {{- else }}
+ <section>{{ $content }}</section>
+ {{- end }}
</article>
</main>
{{ partial "openring.html" . }}