diff options
Diffstat (limited to 'layouts/partials/header-nav.html')
-rw-r--r-- | layouts/partials/header-nav.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/layouts/partials/header-nav.html b/layouts/partials/header-nav.html new file mode 100644 index 0000000..f6a4030 --- /dev/null +++ b/layouts/partials/header-nav.html @@ -0,0 +1,17 @@ +<section class="page-header"> + <h1 class="project-name"> + {{ $.Site.Params.project_name | default "project_name goes here" | markdownify }} + </h1> + <h2 class="project-tagline"> + {{ $.Site.Params.project_tagline | default "project_tagline goes here" | markdownify }} + </h2> + <!-- TODO wrap w/ nav element --> + {{ $current := . }} + {{ range .Site.Menus.nav }} + {{ $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }} + {{ $active = or $active (eq .Name $current.Title) }} + {{ $active = or $active (and (eq .Name "Blog") (eq $current.Section "post")) }} + {{ $active = or $active (and (eq .Name "Tags") (eq $current.Section "tags")) }} + <a href="{{ .URL }}" class="btn">{{ .Name }}</a> + {{ end }} +</section> |