Add first, last page header includes
This commit is contained in:
@@ -913,6 +913,8 @@ Body: None.
|
|||||||
| `yoursite/layouts/partials/paige/head-last.html` | The end of the head tag |
|
| `yoursite/layouts/partials/paige/head-last.html` | The end of the head tag |
|
||||||
| `yoursite/layouts/partials/paige/main-first.html` | The beginning of the main tag |
|
| `yoursite/layouts/partials/paige/main-first.html` | The beginning of the main tag |
|
||||||
| `yoursite/layouts/partials/paige/main-last.html` | The end of the main tag |
|
| `yoursite/layouts/partials/paige/main-last.html` | The end of the main tag |
|
||||||
|
| `yoursite/layouts/partials/paige/page-header-first.html` | The beginning of the page header tag |
|
||||||
|
| `yoursite/layouts/partials/paige/page-header-last.html` | The end of the page header tag |
|
||||||
| `yoursite/layouts/partials/paige/site-header-first.html` | The beginning of the site header tag |
|
| `yoursite/layouts/partials/paige/site-header-first.html` | The beginning of the site header tag |
|
||||||
| `yoursite/layouts/partials/paige/site-header-last.html` | The end of the site header tag |
|
| `yoursite/layouts/partials/paige/site-header-last.html` | The end of the site header tag |
|
||||||
| `yoursite/layouts/partials/paige/style-first.css` | The beginning of the style tag |
|
| `yoursite/layouts/partials/paige/style-first.css` | The beginning of the style tag |
|
||||||
|
@@ -6,6 +6,8 @@
|
|||||||
{{ $date := and $page.IsPage $page.PublishDate }}
|
{{ $date := and $page.IsPage $page.PublishDate }}
|
||||||
{{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }}
|
{{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }}
|
||||||
{{ $description := $page.Description | markdownify }}
|
{{ $description := $page.Description | markdownify }}
|
||||||
|
{{ $first := templates.Exists "partials/paige/page-header-first.html" }}
|
||||||
|
{{ $last := templates.Exists "partials/paige/page-header-last.html" }}
|
||||||
{{ $link := $page.Params.link }}
|
{{ $link := $page.Params.link }}
|
||||||
{{ $readingtime := $page.ReadingTime }}
|
{{ $readingtime := $page.ReadingTime }}
|
||||||
{{ $series := $page.GetTerms "series" }}
|
{{ $series := $page.GetTerms "series" }}
|
||||||
@@ -16,8 +18,12 @@
|
|||||||
|
|
||||||
{{ $keywords := sort (append $categories $tags) "Title" }}
|
{{ $keywords := sort (append $categories $tags) "Title" }}
|
||||||
|
|
||||||
{{ if or $authors $date $description $keywords $readingtime $series $table $title }}
|
{{ if or $authors $date $description $first $keywords $last $readingtime $series $table $title }}
|
||||||
<header class="align-items-center d-flex flex-column mw-100" id="paige-page-header">
|
<header class="align-items-center d-flex flex-column mw-100" id="paige-page-header">
|
||||||
|
{{ if $first }}
|
||||||
|
{{ partial "paige/page-header-first.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ with $title }}
|
{{ with $title }}
|
||||||
<h1 class="fw-bold text-center" id="paige-title">{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
|
<h1 class="fw-bold text-center" id="paige-title">{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -87,5 +93,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $last }}
|
||||||
|
{{ partial "paige/page-header-last.html" . }}
|
||||||
|
{{ end }}
|
||||||
</header>
|
</header>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Reference in New Issue
Block a user