use mainSections, update Permalinks and asset URLS

This commit is contained in:
Robert Austin 2019-03-14 10:56:09 +10:00
parent eba613e044
commit d87fbd97cc
17 changed files with 59 additions and 50 deletions

View file

@ -1,11 +0,0 @@
{{$currentNode := .}}
<div class="docs-menu">
<h4>Docs</h4>
<ul>
{{ range (where .Site.Pages "Section" "docs") sort .Site.Pages ".Weight" }}
<li class="{{ if eq .UniqueID $currentNode.UniqueID }}active {{ end }}">
<a href="{{ .URL }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</div>

View file

@ -1,14 +0,0 @@
<div class="footer">
<div class="container">
<div class="row">
<div class="col-12">
<div class="footer-inner">
<ul class="footer-menu">
<li><a href="{{ .Site.BaseURL }}">Home</a></li>
<li><a href="{{ .Site.BaseURL }}contact">Contact</a></li>
<li class="copyright">© {{ now.Format "2006" }} {{.Site.Title}}</li>
</ul>
</div>
</div>
</div>
</div>

View file

@ -1,10 +1,10 @@
<div class='header'>
<div class="container">
<div class="logo">
<a href="{{ .Site.BaseURL }}"><img alt="Figurit Homepage" src="{{ .Site.BaseURL }}images/logo.svg" /></a>
<a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ "images/logo.svg" | absURL }}" /></a>
</div>
<div class="logo-mobile">
<a href="{{ .Site.BaseURL }}"><img alt="Figurit Homepage" src="{{ .Site.BaseURL }}images/logo-mobile.svg" /></a>
<a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ "images/logo-mobile.svg" | absURL }}" /></a>
</div>
{{ partial "main-menu.html" . }}
{{ partial "hamburger.html" . }}

View file

@ -3,8 +3,7 @@
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="menu-item-{{ .Name | lower }}{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}">
<a href="{{.URL}}">
{{ .Pre }}
<a href="{{ .URL }}">
<span>{{ .Name }}</span>
</a>
</li>

View file

@ -3,8 +3,7 @@
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="menu-item-{{ .Name | lower }}{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}">
<a href="{{.URL}}">
{{ .Pre }}
<a href="{{ .URL }}">
<span>{{ .Name }}</span>
</a>
</li>

View file

@ -0,0 +1,11 @@
{{$currentNode := .}}
<div class="docs-menu">
<h4>{{ .Section | humanize }}</h4>
<ul>
{{ range (where .Site.RegularPages "Section" .Section) sort .Site.RegularPages ".Weight" }}
<li class="{{ if eq .UniqueID $currentNode.UniqueID }}active {{ end }}">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</div>