mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
Refactoring the reference to description in the Params to a variable in the site-header.html.
This commit is contained in:
parent
601ccf45e1
commit
24dd1f92bf
@ -1,4 +1,5 @@
|
|||||||
{{ $featured_image := .Param.featured_image | default "images/gohugo-default-sample-hero-image.jpg" }}
|
{{ $featured_image := .Param.featured_image | default "images/gohugo-default-sample-hero-image.jpg" }}
|
||||||
|
{{ $description := .Param.description | default "" }}
|
||||||
{{ if $featured_image }}
|
{{ if $featured_image }}
|
||||||
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
|
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
|
||||||
{{ $featured_image := (trim $featured_image "/") | absURL }}
|
{{ $featured_image := (trim $featured_image "/") | absURL }}
|
||||||
@ -9,7 +10,7 @@
|
|||||||
<h1 class="f2 f-subheadline-l fw2 white-90 mb0 lh-title">
|
<h1 class="f2 f-subheadline-l fw2 white-90 mb0 lh-title">
|
||||||
{{ .Title | default .Site.Title }}
|
{{ .Title | default .Site.Title }}
|
||||||
</h1>
|
</h1>
|
||||||
{{ with .Param.description }}
|
{{ with $description }}
|
||||||
<h2 class="fw1 f5 f3-l white-80 measure-wide-l center mt3">
|
<h2 class="fw1 f5 f3-l white-80 measure-wide-l center mt3">
|
||||||
{{ . }}
|
{{ . }}
|
||||||
</h2>
|
</h2>
|
||||||
@ -25,7 +26,7 @@
|
|||||||
<h1 class="f2 f-subheadline-l fw2 light-silver mb0 lh-title">
|
<h1 class="f2 f-subheadline-l fw2 light-silver mb0 lh-title">
|
||||||
{{ .Title | default .Site.Title }}
|
{{ .Title | default .Site.Title }}
|
||||||
</h1>
|
</h1>
|
||||||
{{ with .Param.description }}
|
{{ with $description }}
|
||||||
<h2 class="fw1 f5 f3-l white-80 measure-wide-l center lh-copy mt3 mb4">
|
<h2 class="fw1 f5 f3-l white-80 measure-wide-l center lh-copy mt3 mb4">
|
||||||
{{ . }}
|
{{ . }}
|
||||||
</h2>
|
</h2>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user