layout: improve taxonomies pages
* NEW Adds a templates for categories and tags lists. * NEW Styles (not so well…) the categories and tags lists. * BETTER Improves includes in the _default templates. Co-Authored-by: Igor Milhit <igor@milhit.ch>pull/31/head
parent
09fbaa06f9
commit
b5dc64935a
|
@ -3,7 +3,9 @@
|
||||||
{{- partial "head.html" . -}}
|
{{- partial "head.html" . -}}
|
||||||
<body>
|
<body>
|
||||||
{{- partial "header.html" . -}}
|
{{- partial "header.html" . -}}
|
||||||
|
<main class="container">
|
||||||
{{- block "main" . }}{{- end }}
|
{{- block "main" . }}{{- end }}
|
||||||
|
</main>
|
||||||
{{- partial "footer.html" . -}}
|
{{- partial "footer.html" . -}}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main class="container">
|
|
||||||
<header>
|
<header>
|
||||||
<h1>{{.Title}}</h1>
|
<h1>{{.Title}}</h1>
|
||||||
</header>
|
</header>
|
||||||
|
@ -9,10 +8,11 @@
|
||||||
<!-- Ranges through content/posts/*.md -->
|
<!-- Ranges through content/posts/*.md -->
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<article>
|
<article>
|
||||||
<a href="{{.Permalink}}">{{.Title}}</a>
|
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> —
|
||||||
— {{.PublishDate.Format "2006-01-02"}}
|
{{ if isset .Params "publishdate" }}
|
||||||
|
{{.PublishDate.Format "2006-01-02"}}
|
||||||
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
</main>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main class="container">
|
<header>
|
||||||
{{ .Content }}
|
<h1>{{.Title}}</h1>
|
||||||
|
</header>
|
||||||
|
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
|
||||||
|
{{.Content }}
|
||||||
{{ range .Paginator.Pages }}
|
{{ range .Paginator.Pages }}
|
||||||
<article>
|
<article>
|
||||||
<a href="{{ .Permalink }}">
|
<a href="{{ .Permalink }}">
|
||||||
|
@ -15,6 +18,5 @@
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</main>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main id="main" class="container">
|
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
<h1 id="title">{{ .Title }}</h1>
|
<h1 id="title">{{ .Title }}</h1>
|
||||||
{{- partial "post-info.html" . -}}
|
{{- partial "post-info.html" . -}}
|
||||||
|
@ -7,6 +6,5 @@
|
||||||
<article id="content">
|
<article id="content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</article>
|
</article>
|
||||||
</main>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<header>
|
||||||
|
<h1>{{.Title}}</h1>
|
||||||
|
</header>
|
||||||
|
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
|
||||||
|
{{.Content}}
|
||||||
|
<article class="terms">
|
||||||
|
{{ range .Data.Terms.Alphabetical }}
|
||||||
|
<article class="term">
|
||||||
|
<p><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> ({{ .Count }})</p>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -196,3 +196,12 @@ figure p {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: .2rem 0;
|
margin: .2rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.terms {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.term {
|
||||||
|
margin-right: 1rem;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue