diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 92b6754..eb85f0d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -19,7 +19,7 @@
-
+
{{ .Site.Title }} @@ -31,7 +31,7 @@ change theme button
{{- end }} -
@@ -49,18 +49,18 @@ {{- end }}
- -
+ +
{{- block "main" . }}{{ end }}
-
+ {{- if .Site.Params.FooterText }}
- + {{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 78d465b..64320a7 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "title" }}{{ .Title }} – {{ .Site.Title }}{{ end }} {{ define "main" }} -
+

{{ if .Draft }}(Draft) {{ end }}{{ .Title }}

{{- if eq .Date.IsZero false }} @@ -10,24 +10,24 @@ — last updated {{- end }}
-
- {{ if or (.Params.toc) (and (ne .Params.toc false) (isset .Site.Params "tocwordthreshold") (ge .Site.Params.TocWordThreshold 0) (gt .WordCount .Site.Params.TocWordThreshold)) }} - {{/* If the front matter parameter is true, show the toc */}} - {{/* Elif the front matter parameter is false, don't show the toc */}} - {{/* Elif the front matter parameter is not set, show the toc if the site parameter is set, non-negative, and less than the word count */}} -

-
-
- - Table of Contents - - {{ $toc := .TableOfContents -}} - {{/* Workaround for an extra layer of indentation (https://discourse.gohugo.io/t/2303) */}} - {{- $toc := replaceRE `(\s*)
    \s*
  • \s*
      ` `${2}
        ` $toc -}} - {{- $toc := replaceRE `
      \s*\s*
    (\s*)` `
${1}` $toc -}} - {{- safeHTML $toc }} -
-
- {{ end }} - {{ .Content | replaceRE "()" (printf "${1}${3}" ("images/chain-link.svg" | relURL)) | safeHTML }} + {{ if or (.Params.toc) (and (ne .Params.toc false) (isset .Site.Params "tocwordthreshold") (ge .Site.Params.TocWordThreshold 0) (gt .WordCount .Site.Params.TocWordThreshold)) }} + {{/* If the front matter parameter is true, show the toc */}} + {{/* Elif the front matter parameter is false, don't show the toc */}} + {{/* Elif the front matter parameter is not set, show the toc if the site parameter is set, non-negative, and less than the word count */}} +

+
+
+ + Table of Contents + + {{ $toc := .TableOfContents -}} + {{/* Workaround for an extra layer of indentation (https://discourse.gohugo.io/t/2303) */}} + {{- $toc := replaceRE `(\s*)
    \s*
  • \s*
      ` `${2}
        ` $toc -}} + {{- $toc := replaceRE `
      \s*\s*
    (\s*)` `
${1}` $toc -}} + {{- safeHTML $toc }} +
+
+ {{ end }} + + {{ .Content | replaceRE "()" (printf "${1}${3}" ("images/chain-link.svg" | relURL)) | safeHTML }} {{ end }} diff --git a/static/css/styles.css b/static/css/styles.css index c61d7b5..ca2a00d 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -41,12 +41,14 @@ h1, h2, h3, h4, h5, h6 { } .heading-anchor { + /* this is used on an "aside" tag so that it's not shown in the browser's reader mode */ + display: inline; color: grey; margin-left: 0.5em; font-size: 0.75em; } -.heading-anchor:hover { +.heading-anchor a:hover { text-decoration: none; }