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" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<main class="container">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{{ define "main" }}
|
||||
<main class="container">
|
||||
<header>
|
||||
<h1>{{.Title}}</h1>
|
||||
</header>
|
||||
|
@ -9,10 +8,11 @@
|
|||
<!-- Ranges through content/posts/*.md -->
|
||||
{{ range .Pages }}
|
||||
<article>
|
||||
<a href="{{.Permalink}}">{{.Title}}</a>
|
||||
— {{.PublishDate.Format "2006-01-02"}}
|
||||
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> —
|
||||
{{ if isset .Params "publishdate" }}
|
||||
{{.PublishDate.Format "2006-01-02"}}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{{ define "main" }}
|
||||
<main class="container">
|
||||
<header>
|
||||
<h1>{{.Title}}</h1>
|
||||
</header>
|
||||
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
|
||||
{{.Content }}
|
||||
{{ range .Paginator.Pages }}
|
||||
<article>
|
||||
|
@ -15,6 +18,5 @@
|
|||
</article>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{{ define "main" }}
|
||||
<main id="main" class="container">
|
||||
<header class="post-header">
|
||||
<h1 id="title">{{ .Title }}</h1>
|
||||
{{- partial "post-info.html" . -}}
|
||||
|
@ -7,6 +6,5 @@
|
|||
<article id="content">
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</main>
|
||||
{{ 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;
|
||||
margin: .2rem 0;
|
||||
}
|
||||
|
||||
.terms {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.term {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue