mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2026-01-14 04:22:48 +01:00
Enumerate sections in the header to do links
This commit is contained in:
26
layouts/_default/section.html
Normal file
26
layouts/_default/section.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{ partial "header.html" . }}
|
||||
<section class="main">
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
{{ $globalTitle := .Title}}
|
||||
<div class="markdown">
|
||||
{{ range .Data.Pages }}
|
||||
{{ if eq .Title $globalTitle }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if ne (len (where .Data.Pages "Title" "!=" $globalTitle)) 0}}
|
||||
<div class="page-heading">{{ .Title }}</div>
|
||||
<ul>
|
||||
{{ range .Data.Pages.ByPublishDate }}
|
||||
{{ if ne .Title $globalTitle }}
|
||||
{{ partial "li.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ partial "footer.html" . }}
|
||||
Reference in New Issue
Block a user