Browse Source

Switch to breadcrumb style navigation

main
Mark Cornick 2 months ago
parent
commit
4dd8eaf101
  1. 3
      themes/mcornick/i18n/en.toml
  2. 3
      themes/mcornick/i18n/es.toml
  3. 3
      themes/mcornick/i18n/fr.toml
  4. 51
      themes/mcornick/layouts/partials/footer.html
  5. 3
      themes/mcornick/static/style.css

3
themes/mcornick/i18n/en.toml

@ -24,3 +24,6 @@ other = "by"
[in_commit]
other = "in"
[navigation]
other = "Navigation"

3
themes/mcornick/i18n/es.toml

@ -24,3 +24,6 @@ other = "por"
[in_commit]
other = "en"
[navigation]
other = "Navegación"

3
themes/mcornick/i18n/fr.toml

@ -24,3 +24,6 @@ other = "par"
[in_commit]
other = "en"
[navigation]
other = "Navigation"

51
themes/mcornick/layouts/partials/footer.html

@ -1,6 +1,37 @@
<hr>
<p>
{{ i18n "navigation" }}:
{{ if .IsHome }}
<span class="you-are-here">{{ i18n "home" }}</span>
{{ else }}
{{ with $.Site.GetPage ("/") }}
<a href="{{ .Permalink }}">{{ i18n "home" }}</a>
{{ end }}
>
{{ end }}
{{ if eq .Section "show" }}
{{ if ne .Kind "section" }}
{{ with $.Site.GetPage ("/show/") }}
<a href="{{ .Permalink }}"><span class="you-are-here">{{ .Title }}</span></a>
{{ end }}
> <span class="you-are-here">{{ .Title }}</span>
{{ else }}
<span class="you-are-here">{{ .Title }}</span>
{{ end }}
{{ end }}
{{ if eq .Section "blog" }}
{{ if ne .Kind "section" }}
{{ with $.Site.GetPage ("/blog/") }}
<a href="{{ .Permalink }}"><span class="you-are-here">{{ .Title }}</span></a>
{{ end }}
> <span class="you-are-here">{{ .Title }}</span>
{{ else }}
<span class="you-are-here">{{ .Title }}</span>
{{ end }}
{{ end }}
<br>
{{ if .IsTranslated }}
<p>{{ i18n "translations" }}:
{{ i18n "translations" }}:
{{ range .Translations }}
<a href="{{ .Permalink }}">{{ .Lang }}</a>
{{ end }}<br/>
@ -12,22 +43,6 @@
<a href="https://git.sr.ht/~mcornick/www/commit/{{ .GitInfo.Hash }}">{{ .GitInfo.AbbreviatedHash }}</a>
</p>
{{ end }}
<p>
{{ if and (eq .Section "blog") (ne .Kind "section") }}
{{ with $.Site.GetPage ("/blog/") }}
<a href="{{ .Permalink }}">{{ i18n "blog_index" }}</a><br>
{{ end }}
{{ end }}
{{ if and (eq .Section "show") (ne .Kind "section") }}
{{ with $.Site.GetPage ("/show/") }}
<a href="{{ .Permalink }}">{{ i18n "show_index" }}</a><br>
{{ end }}
{{ end }}
{{ if not .IsHome }}
{{ with $.Site.GetPage ("/") }}
<a href="{{ .Permalink }}">{{ i18n "home" }}</a><br>
{{ end }}
{{ end }}
<a href="https://creativecommons.org/licenses/{{ .Params.license }}/4.0/">{{ i18n .Params.license }}</a></p>
<p><a href="https://creativecommons.org/licenses/{{ .Params.license }}/4.0/">{{ i18n .Params.license }}</a></p>
</body>
</html>

3
themes/mcornick/static/style.css

@ -18,3 +18,6 @@
color: blue;
};
}
span.you-are-here {
color: gray;
}

Loading…
Cancel
Save