Restructure all pages under article tag

This commit is contained in:
Will Faught
2022-12-11 00:09:41 -08:00
parent 6356e860e4
commit f74704bb8a
9 changed files with 122 additions and 251 deletions

View File

@@ -30,6 +30,10 @@
<link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $.Site.Title }}" type="{{ .MediaType.Type }}">
{{ end }}
<style>
article > div {
margin-bottom: 1rem;
}
blockquote {
padding: 0.5rem 1rem;
border-left: 0.25rem solid #e9ecef;
@@ -39,55 +43,35 @@
blockquote p:last-of-type {
margin-bottom: 0;
}
#content div {
margin-bottom: 1rem;
}
</style>
{{ if templates.Exists "partials/head.html" }}
{{ partial "head" . }}
{{ partial "head.html" . }}
{{ end }}
</head>
<body class="d-flex flex-column">
<div class="container flex-fill">
{{ if .Site.Menus.main }}
<header>
<div class="row">
<div class="col">
<nav class="d-flex justify-content-center my-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>
</div>
<div class="row">
<div class="col">
{{ if .Site.Menus.main }}
<header>
{{ partial "paige_menus.html" . }}
</header>
{{ end }}
<main>
<article>
{{ block "main" . }}{{ end }}
</article>
</main>
{{ if .Site.Copyright }}
<footer>
<p class="text-center text-muted">{{ .Site.Copyright | markdownify }}</p>
</footer>
{{ end }}
</div>
</header>
{{ end }}
<main>
{{ block "main" . }}{{ end }}
</main>
{{ if .Site.Copyright }}
<footer>
<div class="justify-content-center row">
<div class="col col-auto">
<p class="text-muted">{{ .Site.Copyright | markdownify }}</p>
</div>
</div>
</footer>
{{ end }}
</div>
</div>
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"></script>
{{ if or .Params.math .Site.Params.math }}
<script crossorigin="anonymous" defer integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
{{ if or .Site.Params.math .Params.math }}
<script crossorigin="anonymous" defer integrity="sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O" src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js"></script>
<script crossorigin="anonymous" defer integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" onload="renderMathInElement(document.body);" src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js"></script>
{{ end }}
@@ -95,7 +79,7 @@
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ if templates.Exists "partials/body.html" }}
{{ partial "body" . }}
{{ partial "body.html" . }}
{{ end }}
</body>
</html>