Make home page sections dynamic and configurable (#14)
* Make home page sections dynamic and configurable * Fix navbar issue when no section is configured + fix next-prev navigator * Update exampleSite * Fix next-prev navigator * Make navbar brand URL context aware
This commit is contained in:
parent
8f99f05a98
commit
e2d376215a
32 changed files with 455 additions and 363 deletions
|
@ -7,7 +7,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "navbar" }}
|
||||
{{ partial "navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" false) }}
|
||||
{{ partial "navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" false "navBrandURL" "/posts") }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
|
@ -44,31 +44,7 @@
|
|||
|
||||
<!---Next and Previous Navigator -->
|
||||
<hr />
|
||||
<div class="row next-prev-navigator">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.RegularPages.ByDate }}
|
||||
{{ if eq .RelPermalink $currentPage.RelPermalink }}
|
||||
{{ if .Next }}
|
||||
<div class="col-md-6 previous-article">
|
||||
<a href="{{.Next.RelPermalink}}" class="btn btn-outline-info">
|
||||
<span><i class="fas fa-chevron-circle-left"></i> Prev</span>
|
||||
<br />
|
||||
<span>{{ .Next.Title }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .Prev }}
|
||||
<div class="{{ if .Next }}col-md-6{{ else }}col-md-12{{ end }} next-article">
|
||||
<a href="{{ .Prev.RelPermalink }}" class="btn btn-outline-info">
|
||||
<span>Next <i class="fas fa-chevron-circle-right"></i></span>
|
||||
<br />
|
||||
<span>{{ .Prev.Title }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partial "next-prev-navigator.html" . }}
|
||||
<hr />
|
||||
<!-- Add Disqus forum -->
|
||||
{{ if .Site.DisqusShortname }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue