Files
cocoa-eh-hugo-theme/layouts/partials/header.html
Michael Noronha 498265ba76 Add option to use large header everywhere
To use, set large_banner_logo = true in the config file
2018-08-14 22:38:32 -07:00

43 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{ partial "head.html" . }}
<body>
{{ if (or (.Site.Params.small_banner_logo) (and (.IsPage) (not (.Site.Params.large_banner_logo)))) }}
<div class="header column">
{{ else }}
<div class="header header-home column">
{{ end }}
<div class="container">
{{ if (not (isset .Site.Params "logofile")) }}
<a href="https://github.com/mtn/cocoa-eh-hugo-theme/wiki/Configuration#logo">Logo HOWTO</a>
{{ else if ne .Site.Params.logofile "" }}
<a href="{{ .Site.BaseURL }}"><img class="logo" src="{{ .Site.Params.logofile | absURL }}" alt="logo"></a>
{{ end }}
<div class="content">
<a href="{{ .Site.BaseURL }}"><div class="name"><h1>{{ .Site.Title }}</h1></div></a>
<nav>
<ul>
{{ if ne (len (where .Site.RegularPages "Section" "blog")) 0 }}
<li><a href="{{ .Site.BaseURL }}blog/">Blog</a></li>
{{ end }}
{{ range $.Site.Home.Sections }}
{{ range first 1 (where .Pages "Section" "ne" "")}}
{{ if ne .Section "blog"}}
<li><a href="{{ .Section | urlize | absURL }}">{{ .Section }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ range where .Site.RegularPages "Section" ""}}
{{ if and (ne .Title "License") (ne .Title "Home")}}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</nav>
</div>
</div>
</div>