Split baseof.html into more templates
parent
bdbd7ec8df
commit
158f9d1d5d
@ -1,85 +1,23 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{ if .Site.Author.name }}
|
||||
<meta content="{{ .Site.Author.name }}" name="author">
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<meta content="{{ .Description }}" name="description">
|
||||
{{ end }}
|
||||
{{ if or .Keywords .Params.tags .Params.categories }}
|
||||
<meta content="{{ delimit (sort (union (union .Keywords .Params.tags) .Params.categories)) `, ` }}" name="keywords">
|
||||
{{ end }}
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ if and (and .Title .Site.Title) (or (not (eq .Title .Site.Title)) (not .IsHome)) }}
|
||||
<title>{{ .Title | markdownify | plainify | htmlUnescape }} · {{ .Site.Title | markdownify | plainify | htmlUnescape }}</title>
|
||||
{{ else if .Title }}
|
||||
<title>{{ .Title | markdownify | plainify | htmlUnescape }}</title>
|
||||
{{ else if .Site.Title }}
|
||||
<title>{{ .Site.Title | markdownify | plainify | htmlUnescape }}</title>
|
||||
{{ end }}
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" rel="stylesheet">
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" rel="stylesheet">
|
||||
{{ if or .Site.Params.math .Params.math }}
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" rel="stylesheet">
|
||||
{{ end }}
|
||||
{{ range .AlternativeOutputFormats }}
|
||||
<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;
|
||||
border-right: 0.25rem solid white;
|
||||
}
|
||||
|
||||
blockquote p:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
{{ if templates.Exists "partials/head.html" }}
|
||||
{{ partial "head.html" . }}
|
||||
{{ end }}
|
||||
</head>
|
||||
{{ partial "paige_head.html" . }}
|
||||
<body class="d-flex flex-column">
|
||||
<div class="container flex-fill">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{ if .Site.Menus.main }}
|
||||
<header>
|
||||
{{ partial "paige_menu.html" . }}
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ partial "paige_header.html" . }}
|
||||
<main>
|
||||
<article>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</article>
|
||||
</main>
|
||||
{{ if .Site.Copyright }}
|
||||
<footer>
|
||||
<p class="text-center text-muted">{{ .Site.Copyright | markdownify }}</p>
|
||||
</footer>
|
||||
{{ end }}
|
||||
{{ partial "paige_footer.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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 }}
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
{{ if templates.Exists "partials/body.html" }}
|
||||
{{ partial "body.html" . }}
|
||||
{{ partial "paige_script.html" . }}
|
||||
{{ if templates.Exists "partials/paige_body_last.html" }}
|
||||
{{ partial "paige_body_last.html" . }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "paige_content.html" . }}
|
||||
{{ partial "paige_page.html" . }}
|
||||
{{ partial "paige_pages.html" . }}
|
||||
{{ end }}
|
||||
|
@ -1,3 +1,3 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "paige_content.html" . }}
|
||||
{{ partial "paige_page.html" . }}
|
||||
{{ end }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "paige_content.html" . }}
|
||||
{{ partial "paige_page.html" . }}
|
||||
{{ partial "paige_pages.html" . }}
|
||||
{{ end }}
|
||||
|
@ -0,0 +1,5 @@
|
||||
{{ if .Site.Copyright }}
|
||||
<footer>
|
||||
<p class="text-center text-muted">{{ .Site.Copyright | markdownify }}</p>
|
||||
</footer>
|
||||
{{ end }}
|
@ -0,0 +1,9 @@
|
||||
<head>
|
||||
{{ partial "paige_meta.html" . }}
|
||||
{{ partial "paige_title.html" . }}
|
||||
{{ partial "paige_link.html" . }}
|
||||
{{ partial "paige_style.html" . }}
|
||||
{{ if templates.Exists "partials/paige_head_last.html" }}
|
||||
{{ partial "paige_head_last.html" . }}
|
||||
{{ end }}
|
||||
</head>
|
@ -0,0 +1,5 @@
|
||||
{{ if .Site.Menus.main }}
|
||||
<header>
|
||||
{{ partial "paige_menu.html" . }}
|
||||
</header>
|
||||
{{ end }}
|
@ -0,0 +1,8 @@
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" rel="stylesheet">
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" rel="stylesheet">
|
||||
{{ if or .Site.Params.math .Params.math }}
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" rel="stylesheet">
|
||||
{{ end }}
|
||||
{{ range .AlternativeOutputFormats }}
|
||||
<link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $.Site.Title }}" type="{{ .MediaType.Type }}">
|
||||
{{ end }}
|
@ -0,0 +1,13 @@
|
||||
<meta charset="utf-8">
|
||||
{{ if .Site.Author.name }}
|
||||
<meta content="{{ .Site.Author.name }}" name="author">
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<meta content="{{ .Description }}" name="description">
|
||||
{{ end }}
|
||||
{{ if or .Keywords .Params.tags .Params.categories }}
|
||||
<meta content="{{ delimit (sort (union (union .Keywords .Params.tags) .Params.categories)) `, ` }}" name="keywords">
|
||||
{{ end }}
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
@ -0,0 +1,8 @@
|
||||
<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 }}
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
@ -0,0 +1,15 @@
|
||||
<style>
|
||||
article > div {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 0.5rem 1rem;
|
||||
border-left: 0.25rem solid #e9ecef;
|
||||
border-right: 0.25rem solid white;
|
||||
}
|
||||
|
||||
blockquote p:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,7 @@
|
||||
{{ if and (and .Title .Site.Title) (or (not (eq .Title .Site.Title)) (not .IsHome)) }}
|
||||
<title>{{ .Title | markdownify | plainify | htmlUnescape }} · {{ .Site.Title | markdownify | plainify | htmlUnescape }}</title>
|
||||
{{ else if .Title }}
|
||||
<title>{{ .Title | markdownify | plainify | htmlUnescape }}</title>
|
||||
{{ else if .Site.Title }}
|
||||
<title>{{ .Site.Title | markdownify | plainify | htmlUnescape }}</title>
|
||||
{{ end }}
|
Loading…
Reference in New Issue