Browse Source

improve conditional

tags/v1.1
Bud Parr 7 years ago
parent
commit
480ea34d22
No account linked to committer's email address
2 changed files with 6 additions and 6 deletions
  1. 2
    2
      layouts/partials/page-header.html
  2. 4
    4
      layouts/partials/site-header.html

+ 2
- 2
layouts/partials/page-header.html View File

{{ partial "site-navigation.html" . }} {{ partial "site-navigation.html" . }}
<div class="tc-l pv6 ph3 ph4-ns"> <div class="tc-l pv6 ph3 ph4-ns">
<h1 class="f2 f1-l fw2 white-90 mb0 lh-title">{{ .Title | default .Site.Title }}</h1> <h1 class="f2 f1-l fw2 white-90 mb0 lh-title">{{ .Title | default .Site.Title }}</h1>
{{ if .Params.description }}
{{ with .Params.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">
{{ .Params.description }}
{{ . }}
</h2> </h2>
{{ end }} {{ end }}
</div> </div>

+ 4
- 4
layouts/partials/site-header.html View File

<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>
{{ if .Params.description }}
{{ with .Params.description }}
<h2 class="fw1 f5 f3-l white-80 mt3"> <h2 class="fw1 f5 f3-l white-80 mt3">
{{ .Params.description }}
{{ . }}
</h2> </h2>
{{ end }} {{ end }}
</div> </div>
<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>
{{ if .Params.description }}
{{ with .Params.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">
{{ .Params.description }}
{{ . }}
</h2> </h2>
{{ end }} {{ end }}
</div> </div>

Loading…
Cancel
Save