improve renderings
This commit is contained in:
parent
4cd64207fe
commit
0a24223fe8
8 changed files with 175 additions and 113 deletions
|
@ -1,35 +1,40 @@
|
|||
{{ define "title" }}
|
||||
{{ .Page.Title | plainify }} | {{ .Site.Title }}
|
||||
{{ .Page.Title | plainify }} |
|
||||
{{ .Site.Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-class" }}--section layouts-cv-organisations-section{{ end }}
|
||||
|
||||
{{ define "main-header" }}
|
||||
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
|
||||
<header class="site-content__header">
|
||||
<div class="article-header__featured-image"
|
||||
{{ if .Params.featured_image }}
|
||||
{{ with .Resources.GetMatch .Params.featured_image }}
|
||||
style="background-image: url({{ .RelPermalink }})"
|
||||
{{ end }}
|
||||
{{ end }}>
|
||||
<div class="article-header__title-wrapper{{ if .Params.title_in_logo }} article-header__title-wrapper--no-title{{ end }}">
|
||||
<h2 class="article-header__title">{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ else }}
|
||||
<header class="site-content__header">
|
||||
<h2 class="page-title">{{ .Title | safeHTML }}.</h2>
|
||||
{{- .Content -}}
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
|
||||
<header class="site-content__header">
|
||||
<div
|
||||
class="article-header__featured-image"
|
||||
{{ if .Params.featured_image }}
|
||||
{{ with .Resources.GetMatch .Params.featured_image }}
|
||||
style="background-image: url({{ .RelPermalink }}); {{ with .Params.bg }}background-color: {{ . }};{{ end }}"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
>
|
||||
<div class="article-header__title-wrapper{{ if .Params.title_in_logo }}article-header__title-wrapper--no-title{{ end }}">
|
||||
<h2 class="article-header__title">
|
||||
{{ default .Title .Params.markup_title | .Page.RenderString }}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ else }}
|
||||
<header class="site-content__header">
|
||||
<h2 class="page-title">{{ .Title | safeHTML }}.</h2>
|
||||
{{- .Content -}}
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
{{ with .GetPage "cv/organisations" }}
|
||||
{{ partial "cv/organisations/organisations-table.html" . }}
|
||||
{{ end }}
|
||||
{{ with .GetPage "cv/organisations" }}
|
||||
{{ partial "cv/organisations/organisations-table.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-footer" }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue