Add titleclass page param

This commit is contained in:
Will Faught
2023-01-22 01:56:44 -08:00
parent 2e43188ee8
commit 7b3d81cdab
3 changed files with 5 additions and 6 deletions

View File

@@ -1,10 +1,6 @@
{{ if .Title }}
{{ $class := "display-5" }}
{{ $class := .Params.paige.titleclass | default "display-5 fw-bold text-center" }}
{{ $title := .Title | markdownify }}
{{ if .IsHome }}
{{ $class = "display-1" }}
{{ end }}
<h1 class="{{ $class }} fw-bold text-center">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>
<h1 class="{{ $class }}">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>
{{ end }}