Restructure all pages under article tag
parent
6356e860e4
commit
f74704bb8a
@ -1,56 +1,47 @@
|
||||
{{ define "main" }}
|
||||
{{ if or .Title .Description }}
|
||||
<div class="row">
|
||||
<div class="col text-center">
|
||||
{{ if .Title }}
|
||||
<h1 class="display-1 fw-bold">{{ .Title | markdownify }}</h1>
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<p class="lead">{{ .Description | markdownify }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ if .Title }}
|
||||
<h1 class="display-1 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 .Params.stretch }}
|
||||
<div class="row">
|
||||
<div class="col pb-3 text-center">
|
||||
<div class="rounded-4 shadow" style="background-image: url('{{ relURL .Params.stretch }}'); background-position: center; background-size: cover; height: 20rem; max-width: 100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rounded-4 shadow" style="background-image: url('{{ relURL .Params.stretch }}'); background-position: center; background-size: cover; height: 20rem; max-width: 100%"></div>
|
||||
{{ end }}
|
||||
{{ if .Params.center }}
|
||||
<div class="row">
|
||||
<div class="col pb-3 text-center">
|
||||
<img class="rounded-4 shadow" src="{{ relURL .Params.center }}" style="max-height: 20rem; max-width: 100%">
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-center">
|
||||
<img class="rounded-4 shadow" src="{{ relURL .Params.center }}" style="max-height: 20rem; max-width: 100%">
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ if .Params.greeting }}
|
||||
<div class="row">
|
||||
<div class="col text-center">
|
||||
<h2 class="display-5 fw-bold">{{ .Params.greeting | markdownify }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="display-5 fw-bold text-center">{{ .Params.greeting | markdownify }}</h2>
|
||||
{{ end }}
|
||||
{{ if .Params.blurb }}
|
||||
<div class="row">
|
||||
<div class="col col-lg-6 mx-auto text-center">
|
||||
<p class="lead">{{ .Params.blurb | markdownify }}</p>
|
||||
<section>
|
||||
<div class="col col-xl-6 mx-auto">
|
||||
<p class="lead text-center">{{ .Params.blurb | markdownify }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
<div class="row">
|
||||
<div class="col">{{ .Content }}</div>
|
||||
</div>
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ if .Site.Social }}
|
||||
<div class="row">
|
||||
<div class="col pb-3 text-center">
|
||||
<section>
|
||||
<div class="pb-3 text-center">
|
||||
{{ range $k, $v := .Site.Social }}
|
||||
<a href="{{ $v }}"><i class="bi bi-{{ $k }} display-6 px-2"></i></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -1,70 +1,4 @@
|
||||
{{ define "main" }}
|
||||
<section>
|
||||
{{ if or .Title .Description }}
|
||||
<header>
|
||||
<div class="row text-center justify-content-center">
|
||||
<div class="col">
|
||||
{{ if .Title }}
|
||||
<h1 class="display-5 fw-bold">
|
||||
{{ if .Params.link }}
|
||||
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
|
||||
{{ else }}
|
||||
{{ .Title | markdownify }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<p class="lead">{{ .Description | markdownify }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mx-auto">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .Pages }}
|
||||
{{ $p := .Paginate (.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mx-auto text-center">
|
||||
{{ range $p.PageGroups }}
|
||||
<h5>{{ .Key }}</h5>
|
||||
{{ range .Pages }}
|
||||
<p>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
{{- if .Description -}}
|
||||
<br/>
|
||||
{{- .Description | markdownify -}}
|
||||
{{- end -}}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ if or $p.HasPrev $p.HasNext }}
|
||||
<footer>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="d-flex justify-content-center pt-3">
|
||||
{{ partial "pagination" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not (or .Content .Pages) }}
|
||||
<p class="lead text-center">Nothing here</p>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ partial "paige_content.html" . }}
|
||||
{{ partial "paige_pages.html" . }}
|
||||
{{ end }}
|
||||
|
@ -1,40 +1,3 @@
|
||||
{{ define "main" }}
|
||||
{{ if not (or .Title .Description .PublishDate .Content) }}
|
||||
<section>
|
||||
<h1 class="display-5 fw-bold text-center">Nothing Here</h1>
|
||||
</section>
|
||||
{{ else }}
|
||||
<article>
|
||||
{{ if or .Title .Description .PublishDate }}
|
||||
<header>
|
||||
<div class="justify-content-center row">
|
||||
<div class="col col-auto text-center">
|
||||
{{ if .Title }}
|
||||
<h1 class="display-5 fw-bold">
|
||||
{{ if .Params.link }}
|
||||
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
|
||||
{{ else }}
|
||||
{{ .Title | markdownify }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<p class="lead">{{ .Description | markdownify }}</p>
|
||||
{{ end }}
|
||||
{{ if .PublishDate }}
|
||||
<p class="text-muted"><time datetime="{{ .PublishDate.Format `2006-01-02` }}">{{ .PublishDate.Format "January 2, 2006" }}</time></p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
<div class="justify-content-center row">
|
||||
<div class="col col-auto" id="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ partial "paige_content.html" . }}
|
||||
{{ end }}
|
||||
|
@ -1,40 +1,14 @@
|
||||
{{ define "main" }}
|
||||
{{ if not (or .Title .Pages) }}
|
||||
{{ partial "paige_content.html" . }}
|
||||
{{ if .Pages }}
|
||||
<section>
|
||||
<h1 class="display-5 fw-bold text-center">Nothing Here</h1>
|
||||
</section>
|
||||
{{ else }}
|
||||
<section>
|
||||
{{ if .Title }}
|
||||
<header>
|
||||
<div class="row text-center">
|
||||
<div class="col">
|
||||
<h1 class="display-5 fw-bold">
|
||||
{{ if .Params.link }}
|
||||
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
|
||||
{{ else }}
|
||||
{{ .Title | markdownify }}
|
||||
{{ end }}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ if .Pages }}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mx-auto text-center">
|
||||
<ul class="list-inline">
|
||||
{{ range (sort .Pages "Title") }}
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<ul class="list-inline text-center">
|
||||
{{ range (sort .Pages "Title") }}
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -1,34 +1,4 @@
|
||||
{{ define "main" }}
|
||||
<section>
|
||||
<header>
|
||||
<div class="row text-center justify-content-center">
|
||||
<div class="col">
|
||||
<h1 class="display-5 fw-bold">
|
||||
{{ .Title }}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ $p := .Paginate (.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mx-auto text-center">
|
||||
{{ range $p.PageGroups }}
|
||||
<h5>{{ .Key }}</h5>
|
||||
{{ range .Pages }}
|
||||
<p>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
{{- if .Description -}}
|
||||
<br/>
|
||||
{{- .Description | markdownify -}}
|
||||
{{- end -}}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
{{ partial "paige_content.html" . }}
|
||||
{{ partial "paige_pages.html" . }}
|
||||
{{ end }}
|
||||
|
@ -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 }}
|
@ -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>
|
@ -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 }}
|
Loading…
Reference in New Issue