Remove list header if title or description isnt present

This commit is contained in:
Joe Hutchinson
2019-07-19 11:23:02 -04:00
parent db0217d4c3
commit 463f593153

View File

@@ -4,10 +4,12 @@
<body class="list-body"> <body class="list-body">
{{ partial "nav-bar.html" . }} {{ partial "nav-bar.html" . }}
<main class="card-container side-gutter"> <main class="card-container side-gutter">
{{ if or (isset .Params "description") (isset .Params "title") -}}
<header class="list-header"> <header class="list-header">
<p class="list-header-subtext">{{ .Description }}</p> {{ with .Description }}<p class="list-header-subtext">{{ . }}</p>{{ end }}
<h1 class="list-header-title">{{ .Title }}</h1> {{ with .Title }}<h1 class="list-header-title">{{ . }}</h1>{{ end }}
</header> </header>
{{- end }}
{{ with .Content -}} {{ with .Content -}}
<section class="list-header-content"> <section class="list-header-content">
{{ . }} {{ . }}