Restructure all pages under article tag
This commit is contained in:
18
layouts/partials/paige_content.html
Normal file
18
layouts/partials/paige_content.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{{ if .Title }}
|
||||
<h1 class="display-5 fw-bold text-center">
|
||||
{{ if .Params.link }}
|
||||
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
|
||||
{{ else }}
|
||||
{{ .Title | markdownify }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<p class="lead text-center">{{ .Description | markdownify }}</p>
|
||||
{{ end }}
|
||||
{{ if .PublishDate }}
|
||||
<p class="text-center text-muted"><time datetime="{{ .PublishDate.Format `2006-01-02` }}">{{ .PublishDate.Format "January 2, 2006" }}</time></p>
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
15
layouts/partials/paige_menus.html
Normal file
15
layouts/partials/paige_menus.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<nav class="d-flex justify-content-center py-3">
|
||||
<ul class="justify-content-center nav nav-pills">
|
||||
{{ $p := . }}
|
||||
{{ $basePath := path.Clean (urls.Parse .Site.BaseURL).Path }}
|
||||
{{ if eq $basePath "/" }}
|
||||
{{ $basePath = "" }}
|
||||
{{ end }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ $pagePath := strings.TrimPrefix $basePath $p.RelPermalink }}
|
||||
{{ $menuPath := strings.TrimPrefix $basePath .URL }}
|
||||
{{ $active := or (and (eq $menuPath `/`) (eq $pagePath `/`)) (and (ne $menuPath `/`) (hasPrefix $pagePath $menuPath)) }}
|
||||
<li class="nav-item"><a href="{{ .URL }}" class="nav-link{{if $active }} active{{ end }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
22
layouts/partials/paige_pages.html
Normal file
22
layouts/partials/paige_pages.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ if .Pages }}
|
||||
<section>
|
||||
{{ $p := .Paginate (.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
|
||||
{{ range $p.PageGroups }}
|
||||
<h5 class="text-center">{{ .Key }}</h5>
|
||||
{{ range .Pages }}
|
||||
<p class="text-center">
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Description }}
|
||||
<br>
|
||||
{{ .Description | markdownify }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if or $p.HasPrev $p.HasNext }}
|
||||
<div class="d-flex justify-content-center pt-3">
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
Reference in New Issue
Block a user