improve renderings

This commit is contained in:
Ben Goldsworthy 2025-03-02 22:41:10 +01:00
parent 4cd64207fe
commit 0a24223fe8
No known key found for this signature in database
8 changed files with 175 additions and 113 deletions

View file

@ -41,11 +41,11 @@
<div class="article-header__title-wrapper">
<a class="u-url u-uid" style="display: none" href="{{ .pc.Permalink }}"></a>
<hgroup class="p-name" itemprop="name">
<h2 class="article-header__title{{ if gt ( len ( .pc.Title | plainify ) ) 40 }} article-header__title--long{{ end }}">
{{- .pc.Title | safeHTML -}}
<h2 class="article-header__title {{ if gt ( len ( .pc.Title | plainify ) ) 40 }}article-header__title--long{{ end }}">
{{- default .pc.Title .pc.Params.markup_title | .pc.Page.RenderString -}}
</h2>
{{ with .pc.Params.subtitle }}
<p class="article-header__subtitle">{{ . | safeHTML }}</p>
<p class="article-header__subtitle">{{ . | $.pc.Page.RenderString }}</p>
{{ end }}
</hgroup>
</div>

View file

@ -24,7 +24,7 @@
{{ end }}
{{ else }}
{{ erroridf "missing-organisation" "Could not find organisation %q (%q)" .Title $.sc.File.Path }}
<li>{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</li>
<li>{{ default .Title .Params.markup_title | .Page.RenderString }}</li>
{{ end }}
{{- end -}}
</ul>