diff options
author | Joe Hutchinson <HutchinsonJoseph@JohnDeere.com> | 2019-07-19 18:23:02 +0300 |
---|---|---|
committer | Joe Hutchinson <HutchinsonJoseph@JohnDeere.com> | 2019-07-19 18:23:02 +0300 |
commit | 463f5931532c752b33cf5f74346e1ed0194e2cd9 (patch) | |
tree | e63efa3eadbb795fd1984bb62b4eae34a601a9c4 /layouts | |
parent | db0217d4c3ac8996bbf9e740cd32b7aef949744e (diff) |
Remove list header if title or description isnt present
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index bcbf067..4d41403 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,10 +4,12 @@ <body class="list-body"> {{ partial "nav-bar.html" . }} <main class="card-container side-gutter"> + {{ if or (isset .Params "description") (isset .Params "title") -}} <header class="list-header"> - <p class="list-header-subtext">{{ .Description }}</p> - <h1 class="list-header-title">{{ .Title }}</h1> + {{ with .Description }}<p class="list-header-subtext">{{ . }}</p>{{ end }} + {{ with .Title }}<h1 class="list-header-title">{{ . }}</h1>{{ end }} </header> + {{- end }} {{ with .Content -}} <section class="list-header-content"> {{ . }} |