Fix leaf bundle rendering for singles type
This commit is contained in:
@@ -1,16 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<div class="container list-posts">
|
||||
|
||||
<h2 class="list-title">{{ .Name }}</h2>
|
||||
|
||||
{{ range (where .Site.Pages "Params.type" "post" ).GroupByDate "2006" }}
|
||||
|
||||
<h2 class="posts-year">{{ .Key }}</h2>
|
||||
|
||||
{{- range .Pages -}}
|
||||
{{- partial "list-posts.html" . -}}
|
||||
{{ define "main" }}
|
||||
{{ if eq .Type "singles" }}
|
||||
{{- partial "single.html" . -}}
|
||||
{{ else }}
|
||||
{{- partial "list.html" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{{ define "main" }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{- partial "post.html" . -}}
|
||||
{{- partial "post.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Type "singles" }}
|
||||
{{- partial "single.html" . -}}
|
||||
{{- partial "single.html" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Jost&family=Arvo&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
|
||||
integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w=="
|
||||
|
||||
14
themes/gokarna/layouts/partials/list.html
Normal file
14
themes/gokarna/layouts/partials/list.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="container list-posts">
|
||||
|
||||
<h1 class="list-title">{{ .Name }}</h2>
|
||||
|
||||
{{ range (where .Site.Pages "Params.type" "post" ).GroupByDate "2006" }}
|
||||
|
||||
<h2 class="posts-year">{{ .Key }}</h2>
|
||||
|
||||
{{- range .Pages -}}
|
||||
{{- partial "list-posts.html" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user