refactor templates layout
@see https://gohugo.io/templates/new-templatesystem-overview/
This commit is contained in:
parent
a83f339dc8
commit
230c46411b
102 changed files with 2 additions and 2 deletions
15
layouts/_partials/text/foreign-text.html
Normal file
15
layouts/_partials/text/foreign-text.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{- /*
|
||||
Displays foreign text.
|
||||
|
||||
@params original The text in the original language.
|
||||
@params lang The language code of the original language.
|
||||
@params translation The text in the parent container's language.
|
||||
*/
|
||||
-}}
|
||||
|
||||
|
||||
<i
|
||||
lang="{{ .lang }}"
|
||||
title="{{ .translation }}"
|
||||
>{{ .original }}</i
|
||||
>
|
21
layouts/_partials/text/item-title.html
Normal file
21
layouts/_partials/text/item-title.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{{- /*
|
||||
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 }}">
|
||||
{{- default .pc.Title .pc.Params.markup_title | .pc.Page.RenderString -}}
|
||||
</h2>
|
||||
{{ with .pc.Params.subtitle }}
|
||||
<p class="{{ $.class }}__subtitle">{{ . | $.pc.Page.RenderString }}</p>
|
||||
{{ end }}
|
||||
</hgroup>
|
Loading…
Add table
Add a link
Reference in a new issue