Blog: Move blog styles and content templates to the base repo
This commit is contained in:
parent
2e37336f5e
commit
ea26f5f68b
5 changed files with 101 additions and 5 deletions
21
layouts/blog/list.html
Normal file
21
layouts/blog/list.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{{ define "head_css" }}
|
||||
{{ partialCached "blog/css.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main class="main--list">
|
||||
<header class="page-header">
|
||||
{{ partial "page_header.html" (dict "page" .) }}
|
||||
</header>
|
||||
|
||||
<div class="main--list__content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<div class="main--list__page-list">
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
{{ .Render "page_summary" }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
18
layouts/blog/single.html
Normal file
18
layouts/blog/single.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{ define "head_css" }}
|
||||
{{ partialCached "blog/css.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<article class="content">
|
||||
<header class="page-header">
|
||||
{{ partial "page_header.html" (dict "page" .) }}
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<footer class="page-footer">
|
||||
{{ partial "page/footer.html" . }}
|
||||
{{ partial "page/prev_next_navigation.html" . }}
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
20
layouts/partials/page/prev_next_navigation.html
Normal file
20
layouts/partials/page/prev_next_navigation.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{ if .Section }}
|
||||
{{- $previousInSection := .PrevInSection -}}
|
||||
{{- $nextInSection := .NextInSection -}}
|
||||
|
||||
{{ if or $previousInSection $nextInSection }}
|
||||
<ul class="page-navigation">
|
||||
{{ with $nextInSection -}}
|
||||
<li class="previous-page">
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{ with $previousInSection -}}
|
||||
<li class="next-page">
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1,11 +1,13 @@
|
|||
{{/*
|
||||
Generates a list of the terms for a given taxonomy.
|
||||
{{- /*
|
||||
Generates a list of the terms for a given taxonomy.
|
||||
|
||||
@param {Page} .page The current page
|
||||
@param {String} .taxonomy The name of the taxonomy
|
||||
*/}}
|
||||
@context {Page} .page The current page
|
||||
@context {String} .taxonomy The name of the taxonomy
|
||||
|
||||
*/ -}}
|
||||
|
||||
{{- $taxonomy := .taxonomy -}}
|
||||
|
||||
{{ with .page.GetTerms $taxonomy }}
|
||||
{{- $name := $taxonomy -}}
|
||||
{{- with T $taxonomy (len .) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue