improve renderings
This commit is contained in:
parent
4cd64207fe
commit
0a24223fe8
8 changed files with 175 additions and 113 deletions
|
@ -1,5 +1,6 @@
|
|||
{{ define "title" }}
|
||||
{{ .Page.Title | plainify }} | {{ .Site.Title }}
|
||||
{{ .Page.Title | plainify }} |
|
||||
{{ .Site.Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-class" }}--section layouts-blog-section{{ end }}
|
||||
|
@ -12,38 +13,60 @@
|
|||
|
||||
{{ define "main-header" }}
|
||||
<header class="site-content__header">
|
||||
<h2 class="page-title">{{ .Title | safeHTML }}
|
||||
{{ if eq .Type "blog" }}
|
||||
{{ with .GetPage "blog/posts" }}
|
||||
<h2 class="page-title">
|
||||
{{ .Title | safeHTML }}
|
||||
{{ if eq .Type "blog" }}
|
||||
{{ with .GetPage "blog/posts" }}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed">
|
||||
<img class="feed-icon" alt="RSS feed" src="{{ $.Site.Params.feedIcon }}">
|
||||
<a
|
||||
href="{{ .RelPermalink }}"
|
||||
aria-label="{{ $.Title }} RSS feed"
|
||||
>
|
||||
<img
|
||||
class="feed-icon"
|
||||
alt="RSS feed"
|
||||
src="{{ $.Site.Params.feedIcon }}"
|
||||
/>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed">
|
||||
<img class="feed-icon" alt="RSS feed" src="{{ $.Site.Params.feedIcon }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a
|
||||
href="{{ .RelPermalink }}"
|
||||
aria-label="{{ $.Title }} RSS feed"
|
||||
>
|
||||
<img
|
||||
class="feed-icon"
|
||||
alt="RSS feed"
|
||||
src="{{ $.Site.Params.feedIcon }}"
|
||||
/>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</h2>
|
||||
{{ .Content }}
|
||||
|
||||
|
||||
|
||||
<nav class="page-header__minor-links">
|
||||
<ul class="minor-links__categories">
|
||||
<li><a href="/series"><h3>Series’</h3></a> <p>({{ len .Site.Taxonomies.series }})</p></li>
|
||||
{{ range .Site.Taxonomies.categories }}
|
||||
<li><a href="{{ .Page.RelPermalink }}"><h3>{{ .Page.Title | safeHTML }}</h3></a> <p>({{ len . }})</p></li>
|
||||
{{ end }}
|
||||
<li>
|
||||
<a href="/series"><h3>Series’</h3></a>
|
||||
<p>({{ len .Site.Taxonomies.series }})</p>
|
||||
</li>
|
||||
{{ range .Site.Taxonomies.categories }}
|
||||
<li>
|
||||
<a href="{{ .Page.RelPermalink }}"><h3>{{ .Page.Title | safeHTML }}</h3></a>
|
||||
<p>({{ len . }})</p>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ if eq .Type "blog" }}
|
||||
{{ with .GetPage "blog/posts" }}
|
||||
{{ partial "years-list.html" . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ partial "years-list.html" . }}
|
||||
{{ partial "years-list.html" . }}
|
||||
{{ end }}
|
||||
</nav>
|
||||
</header>
|
||||
|
@ -51,10 +74,10 @@
|
|||
|
||||
{{ define "main-body" }}
|
||||
{{ if eq .Type "blog" }}
|
||||
{{ with .GetPage "blog/posts" }}
|
||||
{{ partial "items-grid.html" . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .GetPage "blog/posts" }}
|
||||
{{ partial "items-grid.html" . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ partial "items-grid.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue