Omphaloskepsis-2/layouts/partials/text/item-title.html

22 lines
555 B
HTML
Raw Normal View History

2025-04-09 10:15:56 +02:00
{{- /*
Displays an itemtitle with optional subtitle.
@params pc Page context.
@params sc Site context.
@params class The base of the element CSS class.
*/
-}}
<hgroup
class="p-name"
itemprop="name"
>
<h2 class="{{ .class }}__title {{ if gt ( len ( .pc.Title | plainify ) ) 40 }}{{ .class }}__title--long{{ end }}">
2025-05-08 13:48:23 +02:00
{{- default .pc.Title .pc.Params.markup_title | .pc.Page.RenderString -}}
2025-04-09 10:15:56 +02:00
</h2>
{{ with .pc.Params.subtitle }}
<p class="{{ $.class }}__subtitle">{{ . | $.pc.Page.RenderString }}</p>
{{ end }}
</hgroup>