diff options
author | Thedro Neely <thedroneely@gmail.com> | 2022-04-01 21:47:57 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2022-04-01 21:47:57 -0400 |
commit | 1fb581637a5064e26d6f5ee124ef60c925f89c15 (patch) | |
tree | b19062341b26b761f86aeaad64122e9f8c0072b5 | |
parent | f9bc50fe83926c2c94f6ef4aa246f1e6ce4d78e2 (diff) | |
download | thedroneely.com-1fb581637a5064e26d6f5ee124ef60c925f89c15.tar.gz thedroneely.com-1fb581637a5064e26d6f5ee124ef60c925f89c15.tar.bz2 thedroneely.com-1fb581637a5064e26d6f5ee124ef60c925f89c15.zip |
generators/hugo/layouts: Format
layouts/_default/_markup/render-heading.html
layouts/_default/_markup/render-link.html
layouts/shortcodes/sidenote.html
3 files changed, 23 insertions, 3 deletions
diff --git a/generators/hugo/themes/tdro/layouts/_default/_markup/render-heading.html b/generators/hugo/themes/tdro/layouts/_default/_markup/render-heading.html index 319997c..10e6709 100644 --- a/generators/hugo/themes/tdro/layouts/_default/_markup/render-heading.html +++ b/generators/hugo/themes/tdro/layouts/_default/_markup/render-heading.html @@ -1,3 +1,8 @@ <h{{ .Level }} id="{{ .Anchor | safeURL }}"> - <a class="article__heading__anchor" title="{{ .Text | safeHTML }}" href="#{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</a> + <a + class="article__heading__anchor" + title="{{ .Text | safeHTML }}" + href="#{{ .Anchor | safeURL }}"> + {{ .Text | safeHTML }} + </a> </h{{ .Level }}> diff --git a/generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html b/generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html index 3b266dd..b6574a2 100644 --- a/generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html +++ b/generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html @@ -7,5 +7,16 @@ {{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}} {{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}} {{- end -}} -<a title="{{ $link | safeURL }}" rel="noopener" href="{{ $link | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank"{{ end }}>{{ .Text | safeHTML }}</a> +<a + title="{{ $link | safeURL }}" + rel="noopener" + href="{{ $link | safeURL }}" + {{ with .Title }} + title="{{ . }}" + {{ end }} + {{- if $isRemote -}} + target="_blank" + {{ end }}> + {{- .Text | safeHTML -}} +</a> {{- /* This comment removes trailing newlines. */ -}} diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/sidenote.html b/generators/hugo/themes/tdro/layouts/shortcodes/sidenote.html index 9606a11..d54a077 100644 --- a/generators/hugo/themes/tdro/layouts/shortcodes/sidenote.html +++ b/generators/hugo/themes/tdro/layouts/shortcodes/sidenote.html @@ -1,7 +1,11 @@ {{ $id := md5 (printf (.Get `mark`) .Inner) }} <span class="sidenote-container"> - <label for="{{ $id }}" class="sidenote-toggle sidenote-mark" title="{{ .Inner | replaceRE "\n" " " | markdownify }}"><span>{{ .Get `mark` | markdownify }}</span></label> + <label + for="{{ $id }}" + class="sidenote-toggle sidenote-mark" + title="{{ .Inner | replaceRE "\n" " " | markdownify }}"> + <span>{{ .Get `mark` | markdownify }}</span></label> <input type="checkbox" id="{{ $id }}" class="sidenote-toggle"> <span class="sans-serif sidenote {{ .Get `set` }}note"> <mark>{{ .Inner | markdownify }}</mark> |