Files
cocoa-eh-hugo-theme/layouts/index.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

50 lines
1.7 KiB
HTML

{{ partial "header.html" . }}
<div class="main column">
<div class="container">
<div class="content">
{{ range where .Data.Pages "Title" "Home" }}
<div class="markdown">
{{ .Content }}
</div>
{{ end }}
{{ if isset .Site.Params "latestpostcount" }}
<div class="posts">
{{ $nbPosts := len (where .Data.Pages "Section" "blog") }}
{{ if gt $nbPosts 0 }}
<div class="page-heading">Latest posts</div>
<ul>
{{ range (first .Site.Params.latestpostcount (where .Pages "Section" "blog")).GroupByDate "Jan, 2006" "desc" }}
<li class="groupby">{{ .Key }}</li>
{{ range .Pages.ByPublishDate }}
{{ partial "li.html" . }}
{{ end }}
{{ end }}
</ul>
{{ if gt $nbPosts .Site.Params.latestpostcount }}
<a href="./blog/" class="see-more">See more ...</a>
{{ end }}
{{ end }}
</div>
{{ end }}
<div class="best-posts">
{{ $nbPosts := len (where .Data.Pages "Params.best" true) }}
{{ if gt $nbPosts 0 }}
<div class="page-heading">Best posts</div>
<ul>
{{ range .Data.Pages.ByPublishDate }}
{{ if eq .Params.best true }}
{{ partial "li.html" . }}
{{ end }}
{{ end }}
</ul>
{{ end }}
</div>
</div>
</div>
</div>
{{ partial "footer.html" . }}