Skip to content
Snippets Groups Projects
Commit e7a7a756 authored by alexisben's avatar alexisben
Browse files

add description field to hero

parent 23f2054f
No related branches found
No related tags found
No related merge requests found
{{- $direction := "" -}}
{{- $breadcrumb_is_after_hero := eq site.Params.breadcrumb.position "after-hero" -}}
{{- $subtitle := .subtitle -}}
{{- $description := .description -}}
{{ if .image }}
{{- $direction = partial "GetImageDirection" .image -}}
{{ end }}
......@@ -8,6 +9,7 @@
{{- $summary := partial "PrepareText" .context.Params.summary -}}
{{- $subtitle_is_summary := false -}}
{{ if not $subtitle }}
{{ if and (eq site.Params.summary.position "hero") $summary }}
{{ $subtitle = $summary }}
......@@ -23,10 +25,15 @@
{{- end -}}
{{- end -}}
<div class="content">
{{- if $subtitle -}}
{{- if or $subtitle $description -}}
<hgroup>
<h1>{{ partial "PrepareHTML" .title }}</h1>
<p {{ if $subtitle_is_summary -}} class="lead" {{- end -}}>{{ partial "PrepareHTML" $subtitle }}</p>
{{- if $subtitle -}}
<p {{ if $subtitle_is_summary -}} class="lead" {{- end -}}>{{ partial "PrepareHTML" $subtitle }}</p>
{{- end -}}
{{- if $description -}}
<p class="h1">{{ partial "PrepareHTML" .description }}</p>
{{- end -}}
</hgroup>
{{- else -}}
<h1>{{ partial "PrepareHTML" .title }}</h1>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment