Files
cocoa-eh-hugo-theme/layouts/partials/header.html
Michael Noronha 969bd5ca4e Fix validation HTML validation errors (#62)
* Make the theme compliant with W3C standards (#55)

* Dropped the line because chrome tab is deprecated.

* On header, "li" elements are meant to surround the "a" elements and not the other way around.

* Dropped all section tags I could find at first glance, as they had no semantic meaning and were firing warnings at the W3C validator.

* Change "middot" from a helper div to a helper class since putting div's inside ul's is not compliant

* Fixed a problem of the previous commit. A middot would not hide if on mobile.

* Fix archetypes bug with Go templates

* Fix additional validation error in 404
2017-11-09 16:22:28 -06:00

39 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{ partial "head.html" . }}
<body>
{{ if or (.Site.Params.small_banner_logo) (.IsPage) }}
<div class="header column">
{{ else }}
<div class="header header-home column">
{{ end }}
<div class="container">
<a href="{{ .Site.BaseURL }}"><img class="logo" src="{{ .Site.Params.logofile | absURL }}" alt="logo" /></a>
<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>