Move partials under paige directory

master
Will Faught 3 years ago
parent 2340651c82
commit 2ece967314

@ -479,22 +479,22 @@ These are the rest of the named parameters:
## Customization ## Customization
If `partials/paige-head-last.html` exists in the site, it is included at the end of the head tag. If `partials/paige/head-last.html` exists in the site, it is included at the end of the head tag.
If `partials/paige-body-last.html` exists in the site, it is included at the end of the body tag. If `partials/paige/body-last.html` exists in the site, it is included at the end of the body tag.
Most code is in partial templates that are included by the default layouts. Most code is in partial templates that are included by the default layouts.
Elements can easily be added, changed, or removed by overriding the corresponding default layout or partial template. Elements can be added, changed, or removed easily by overriding the corresponding default layout or partial template.
For example, the default layouts For example, the default layouts
`home.html`, `list.html`, `single.html`, `taxonomy.html`, and `term.html` `home.html`, `list.html`, `single.html`, `taxonomy.html`, and `term.html`
include the partial template `paige-article.html`, include the partial template `paige/article.html`.
which includes the partial templates `paige/article.html` includes the partial templates `paige/metadata.html`, `paige/toc.html`, and `paige/content.html`.
`paige-title.html`, `paige-description.html`, `paige-metadata.html`, `paige-toc.html`, and `paige-content.html`. `paige/metadata.html` includes the partial templates `paige/title.html`, `paige/description.html`, and `paige/other.html`.
To change the page title for those default layouts, change `paige-title.html`. To change the page title for those default layouts, change `paige/title.html`.
To change the page title for `single.html`, To change the page title for `single.html`,
replace the use of `paige-article.html` in `single.html` with the use of replace the use of `paige/article.html` in `single.html` with the use of
`paige-title.html`, `paige-description.html`, `paige-metadata.html`, `paige-toc.html`, and `paige-content.html`, `paige/title.html`, `paige/description.html`, `paige/other.html`, `paige/toc.html`, and `paige/content.html`,
then replace that use of `paige-title.html` with your own design. then replace that use of `paige/title.html` with your own design.
## Design ## Design

@ -2,22 +2,22 @@
{{ $rtl := eq .Language.LanguageDirection "rtl" }} {{ $rtl := eq .Language.LanguageDirection "rtl" }}
{{ $lang := .Site.LanguageCode | default .Site.Language.Lang }} {{ $lang := .Site.LanguageCode | default .Site.Language.Lang }}
<html{{ if $rtl }} dir="rtl"{{ end }}{{ with $lang }} lang="{{ . }}"{{ end }}> <html{{ if $rtl }} dir="rtl"{{ end }}{{ with $lang }} lang="{{ . }}"{{ end }}>
{{ partial "paige-head.html" . }} {{ partial "paige/head.html" . }}
<body class="d-flex flex-column"> <body class="d-flex flex-column">
<div class="container flex-fill"> <div class="container flex-fill">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
{{ partial "paige-header.html" . }} {{ partial "paige/header.html" . }}
<main> <main>
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</main> </main>
{{ partial "paige-footer.html" . }} {{ partial "paige/footer.html" . }}
</div> </div>
</div> </div>
</div> </div>
{{ partial "paige-script.html" . }} {{ partial "paige/script.html" . }}
{{ if templates.Exists "partials/paige-body-last.html" }} {{ if templates.Exists "partials/paige-body-last.html" }}
{{ partial "paige-body-last.html" . }} {{ partial "paige/body-last.html" . }}
{{ end }} {{ end }}
</body> </body>
</html> </html>

@ -1,6 +1,6 @@
{{ define "main" }} {{ define "main" }}
<article> <article>
{{ partial "paige-metadata.html" . }} {{ partial "paige/metadata.html" . }}
<section> <section>
{{ with .Params.stretch }} {{ with .Params.stretch }}
<div class="mb-3 mw-100 rounded-4 shadow" style="background-image: url('{{ relLangURL . }}'); background-position: center; background-size: cover; height: 20rem"></div> <div class="mb-3 mw-100 rounded-4 shadow" style="background-image: url('{{ relLangURL . }}'); background-position: center; background-size: cover; height: 20rem"></div>
@ -23,8 +23,8 @@
</div> </div>
{{ end }} {{ end }}
</section> </section>
{{ partial "paige-toc.html" . }} {{ partial "paige/toc.html" . }}
{{ partial "paige-content.html" . }} {{ partial "paige/content.html" . }}
{{ partial "paige-social.html" . }} {{ partial "paige/social.html" . }}
</article> </article>
{{ end }} {{ end }}

@ -1,6 +1,6 @@
{{ define "main" }} {{ define "main" }}
{{ if not .Params.paige.show_full_pages }} {{ if not .Params.paige.show_full_pages }}
{{ partial "paige-article.html" . }} {{ partial "paige/article.html" . }}
{{ end }} {{ end }}
{{ partial "paige-pages.html" . }} {{ partial "paige/pages.html" . }}
{{ end }} {{ end }}

@ -1,4 +1,4 @@
{{ define "main" }} {{ define "main" }}
{{ partial "paige-article.html" . }} {{ partial "paige/article.html" . }}
{{ partial "paige-search.html" . }} {{ partial "paige/search.html" . }}
{{ end }} {{ end }}

@ -13,7 +13,7 @@
{{ $pages = $pages | first $limit }} {{ $pages = $pages | first $limit }}
{{ end }} {{ end }}
{{ $pages = where $pages "Params.paige.hide_rss" "ne" true }} {{ $pages = where $pages "Params.paige.hide_rss" "ne" true }}
{{ $title := partial "paige-func-title.html" . }} {{ $title := partial "paige/func-title.html" . }}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
@ -42,7 +42,7 @@
{{ end }} {{ end }}
{{ range $pages }} {{ range $pages }}
<item> <item>
{{ with partial "paige-func-authors.html" . }} {{ with partial "paige/func-authors.html" . }}
<author>{{ . }}</author> <author>{{ . }}</author>
{{ end }} {{ end }}
{{ if .Content }} {{ if .Content }}

@ -1,4 +1,4 @@
{{ define "main" }} {{ define "main" }}
{{ partial "paige-article.html" . }} {{ partial "paige/article.html" . }}
{{ partial "paige-comments.html" . }} {{ partial "paige/comments.html" . }}
{{ end }} {{ end }}

@ -1,5 +1,5 @@
{{ define "main" }} {{ define "main" }}
{{ partial "paige-article.html" . }} {{ partial "paige/article.html" . }}
{{ if .Pages }} {{ if .Pages }}
<article> <article>
<ul class="list-inline text-center"> <ul class="list-inline text-center">

@ -1,4 +1,4 @@
{{ define "main" }} {{ define "main" }}
{{ partial "paige-article.html" . }} {{ partial "paige/article.html" . }}
{{ partial "paige-pages.html" . }} {{ partial "paige/pages.html" . }}
{{ end }} {{ end }}

@ -1,5 +0,0 @@
<article>
{{ partial "paige-metadata.html" . }}
{{ partial "paige-toc.html" . }}
{{ partial "paige-content.html" . }}
</article>

@ -1,9 +0,0 @@
<head>
{{ partial "paige-meta.html" . }}
<title>{{ partial "paige-func-title.html" . }}</title>
{{ partial "paige-link.html" . }}
{{ partial "paige-style.html" . }}
{{ if templates.Exists "partials/paige-head-last.html" }}
{{ partial "paige-head-last.html" . }}
{{ end }}
</head>

@ -1,5 +0,0 @@
<section>
{{ partial "paige-title.html" . }}
{{ partial "paige-description.html" . }}
{{ partial "paige-other.html" . }}
</section>

@ -0,0 +1,5 @@
<article>
{{ partial "paige/metadata.html" . }}
{{ partial "paige/toc.html" . }}
{{ partial "paige/content.html" . }}
</article>

@ -0,0 +1,9 @@
<head>
{{ partial "paige/meta.html" . }}
<title>{{ partial "paige/func-title.html" . }}</title>
{{ partial "paige/link.html" . }}
{{ partial "paige/style.html" . }}
{{ if templates.Exists "partials/paige-head-last.html" }}
{{ partial "paige/head-last.html" . }}
{{ end }}
</head>

@ -1,5 +1,5 @@
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
<header> <header>
{{ partial "paige-menu.html" . }} {{ partial "paige/menu.html" . }}
</header> </header>
{{ end }} {{ end }}

@ -30,7 +30,7 @@
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" rel="stylesheet"> <link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" rel="stylesheet">
{{ end }} {{ end }}
{{ if .AlternativeOutputFormats }} {{ if .AlternativeOutputFormats }}
{{ $title := partial "paige-func-title.html" . }} {{ $title := partial "paige/func-title.html" . }}
{{ range .AlternativeOutputFormats }} {{ range .AlternativeOutputFormats }}
<link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $title }}" type="{{ .MediaType.Type }}"> <link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $title }}" type="{{ .MediaType.Type }}">
{{ end }} {{ end }}

@ -1,5 +1,5 @@
<meta charset="utf-8"> <meta charset="utf-8">
{{ with partial "paige-func-authors.html" . }} {{ with partial "paige/func-authors.html" . }}
<meta content="{{ . }}" name="author"> <meta content="{{ . }}" name="author">
{{ end }} {{ end }}
{{ with .Description }} {{ with .Description }}

@ -0,0 +1,5 @@
<section>
{{ partial "paige/title.html" . }}
{{ partial "paige/description.html" . }}
{{ partial "paige/other.html" . }}
</section>

@ -1,4 +1,4 @@
{{ $authors := partial "paige-func-authors.html" . }} {{ $authors := partial "paige/func-authors.html" . }}
{{ if or $authors .PublishDate}} {{ if or $authors .PublishDate}}
<p class="text-center text-muted"> <p class="text-center text-muted">
{{- with $authors }}{{ . }}{{ end -}} {{- with $authors }}{{ . }}{{ end -}}

@ -3,12 +3,12 @@
{{ $p := .Paginate .Pages }} {{ $p := .Paginate .Pages }}
{{ range $p.Pages }} {{ range $p.Pages }}
{{ .Scratch.Set "paige_show_full_pages" true }} {{ .Scratch.Set "paige_show_full_pages" true }}
{{ partial "paige-article.html" . }} {{ partial "paige/article.html" . }}
{{ end }} {{ end }}
{{ if or $p.HasPrev $p.HasNext }} {{ if or $p.HasPrev $p.HasNext }}
<section> <section>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
{{ partial "paige-pagination.html" . }} {{ partial "paige/pagination.html" . }}
</div> </div>
</section> </section>
{{ end }} {{ end }}
@ -27,7 +27,7 @@
{{ if or $p.HasPrev $p.HasNext }} {{ if or $p.HasPrev $p.HasNext }}
<section> <section>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
{{ partial "paige-pagination.html" . }} {{ partial "paige/pagination.html" . }}
</div> </div>
</section> </section>
{{ end }} {{ end }}
Loading…
Cancel
Save