Consolidate header_wp.html and header.html
Consolidate header_wp.html and header.html to a single header.html file.
This commit is contained in:
parent
b44b51c9f1
commit
ee6246379b
@ -6,7 +6,7 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
{{ partial "nav.html" . }}
|
{{ partial "nav.html" . }}
|
||||||
{{ partial "header_wp.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
<div class="container" role="main">
|
<div class="container" role="main">
|
||||||
{{ if eq .Type "post" }}
|
{{ if eq .Type "post" }}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
{{ partial "nav.html" . }}
|
{{ partial "nav.html" . }}
|
||||||
{{ partial "header_wp.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
<div class="container" role="main">
|
<div class="container" role="main">
|
||||||
<article class="post-preview">
|
<article class="post-preview">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
{{ partial "nav.html" . }}
|
{{ partial "nav.html" . }}
|
||||||
{{ partial "header_wp.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
<div role="main" class="container">
|
<div role="main" class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -1,22 +1,70 @@
|
|||||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
{{ if .IsHome }}
|
||||||
|
{{ $.Scratch.Add "bigimg" .Site.Params.bigimg }}
|
||||||
|
{{ $.Scratch.Add "title" .Site.Title }}
|
||||||
|
{{ $.Scratch.Add "subtitle" .Site.Params.subtitle }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $.Scratch.Add "bigimg" .Params.bigimg }}
|
||||||
|
{{ $.Scratch.Add "title" .Title }}
|
||||||
|
{{ $.Scratch.Add "subtitle" .Params.subtitle }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
||||||
|
|
||||||
<div class="container">
|
{{ if or $bigimg ($.Scratch.Get "title") }}
|
||||||
<div class="row">
|
{{ if isset $bigimg 0 }}
|
||||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
<div id="header-big-imgs" data-num-img={{len $bigimg}} {{range $i, $img := $bigimg}}data-img-src-{{add $i 1}}="{{$img.src}}" {{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}{{end}}></div>
|
||||||
<div class="{{ .Type }}-heading">
|
{{ end }}
|
||||||
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
|
||||||
{{ if $subtitle }}
|
<header class="header-section {{ if isset $bigimg 0 }}has-img{{ end }}">
|
||||||
{{ if eq .Type "page" }}
|
{{ if isset $bigimg 0 }}
|
||||||
<hr class="small">
|
<div class="intro-header big-img">
|
||||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||||
{{ else }}
|
<div class="container">
|
||||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
<div class="row">
|
||||||
{{ end }}
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
{{ end }}
|
<div class="{{ .Type }}-heading">
|
||||||
{{ if eq .Type "post" }}
|
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||||
<span class="post-meta">Posted on {{ .Date.Format .Site.Params.dateFormat }}</span>
|
{{ if $subtitle }}
|
||||||
{{ end }}
|
{{ if eq .Type "page" }}
|
||||||
|
<hr class="small">
|
||||||
|
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||||
|
{{ else }}
|
||||||
|
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if eq .Type "post" }}
|
||||||
|
<span class="post-meta">Posted on {{ .Date.Format .Site.Params.dateFormat }}</span>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="img-desc" style="display: inline;"></span>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="intro-header no-img">
|
||||||
|
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
<div class="{{ .Type }}-heading">
|
||||||
|
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||||
|
{{ if $subtitle }}
|
||||||
|
{{ if eq .Type "page" }}
|
||||||
|
<hr class="small">
|
||||||
|
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||||
|
{{ else }}
|
||||||
|
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if eq .Type "post" }}
|
||||||
|
<span class="post-meta">Posted on {{ .Date.Format .Site.Params.dateFormat }}</span>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</header>
|
||||||
|
{{ else }}
|
||||||
|
<div class="intro-header"></div>
|
||||||
|
{{ end }}
|
@ -1,30 +0,0 @@
|
|||||||
{{ if .IsHome }}
|
|
||||||
{{ $.Scratch.Add "bigimg" .Site.Params.bigimg }}
|
|
||||||
{{ $.Scratch.Add "title" .Site.Title }}
|
|
||||||
{{ $.Scratch.Add "subtitle" .Site.Params.subtitle }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $.Scratch.Add "bigimg" .Params.bigimg }}
|
|
||||||
{{ $.Scratch.Add "title" .Title }}
|
|
||||||
{{ $.Scratch.Add "subtitle" .Params.subtitle }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
|
||||||
|
|
||||||
{{ if or $bigimg ($.Scratch.Get "title") }}
|
|
||||||
{{ if isset $bigimg 0 }}
|
|
||||||
<div id="header-big-imgs" data-num-img={{len $bigimg}} {{range $i, $img := $bigimg}}data-img-src-{{add $i 1}}="{{$img.src}}" {{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}{{end}}></div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<header class="header-section {{ if isset $bigimg 0 }}has-img{{ end }}">
|
|
||||||
{{ if isset $bigimg 0 }}
|
|
||||||
<div class="intro-header big-img">
|
|
||||||
{{ partial "header.html" . }}
|
|
||||||
<span class="img-desc" style="display: inline;"></span>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="intro-header no-img">
|
|
||||||
{{ partial "header.html" . }}
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
{{ else }}
|
|
||||||
<div class="intro-header"></div>
|
|
||||||
{{ end }}
|
|
Loading…
x
Reference in New Issue
Block a user