commit 297cd59eff1ad7116f89adb6c4286cc74a399be9 parent a3a4b3c7791fbcd763bd688cc6492bc651ceba3d Author: David Eisinger <[email protected]> Date: Tue, 30 May 2023 15:48:23 -0400 Extract refrences partial; fix spacing bug Diffstat:
| M | themes/v2/layouts/journal/single.html | | | 19 | +------------------ |
| M | themes/v2/layouts/notes/single.html | | | 19 | +------------------ |
| A | themes/v2/layouts/partials/references.html | | | 17 | +++++++++++++++++ |
3 files changed, 19 insertions(+), 36 deletions(-)
diff --git a/themes/v2/layouts/journal/single.html b/themes/v2/layouts/journal/single.html @@ -17,22 +17,5 @@ {{ .Content }} - {{ with .Params.References }} - <hr> - - <div class="references"> - <h3>References</h3> - - <ul> - {{ range . }} - <li> - “<a href="{{ .url }}">{{ .title }}</a>”; - <a href="/archive/{{ .file }}"> - backed up {{ .date | time.Format "2006-01-02 15:04:05 MST" }} - </a> - </li> - {{ end }} - </ul> - </div> - {{ end }} + {{- partial "references.html" . -}} {{ end }} diff --git a/themes/v2/layouts/notes/single.html b/themes/v2/layouts/notes/single.html @@ -5,22 +5,5 @@ {{ .Content }} - {{ with .Params.References }} - <hr> - - <div class="references"> - <h3>References</h3> - - <ul> - {{ range . }} - <li> - “<a href="{{ .url }}">{{ .title }}</a>”; - <a href="/archive/{{ .file }}"> - backed up {{ .date | time.Format "2006-01-02 15:04:05 MST" }} - </a> - </li> - {{ end }} - </ul> - </div> - {{ end }} + {{- partial "references.html" . -}} {{ end }} diff --git a/themes/v2/layouts/partials/references.html b/themes/v2/layouts/partials/references.html @@ -0,0 +1,17 @@ +{{ with .Params.References }} + <hr> + + <div class="references"> + <h3>References</h3> + + <ul> + {{ range . }} + <li>“<a href="{{ .url }}">{{ .title }}</a>”; + <a href="/archive/{{ .file }}"> + backed up {{ .date | time.Format "2006-01-02 15:04:05 MST" }} + </a> + </li> + {{ end }} + </ul> + </div> +{{ end }}