40 lines
1.4 KiB
HTML
40 lines
1.4 KiB
HTML
|
|
<aside class="read-next outer">
|
|
<div class="inner">
|
|
<header class="read-next-section-header">
|
|
<h3><span>More in</span> <a href="{{ .CurrentSection.Permalink }}">{{ .Section }}</a></h3>
|
|
</header>
|
|
<div class="read-next-feed">
|
|
|
|
|
|
<!-- {{- partial "read-next.html" . -}} -->
|
|
|
|
{{ if and (.PrevInSection) (.NextInSection) }} <!-- if both exist, display both normal cards -->
|
|
|
|
{{ with .PrevInSection}}
|
|
{{- partial "post-card.html" (dict "context" . "index" 1 "isMoreCard" "yes") -}}
|
|
{{end}}
|
|
|
|
{{ with .NextInSection}}
|
|
{{- partial "post-card.html" (dict "context" . "index" 1 "isMoreCard" "yes") -}}
|
|
{{end}}
|
|
|
|
{{ else }} <!-- otherwise check for each one and print a large card for whichever one exists -->
|
|
|
|
{{ if .PrevInSection }}
|
|
{{ with .PrevInSection}}
|
|
{{- partial "post-card.html" (dict "context" . "index" 1 "isMoreCard" "yes" "isLarge" "post-card-large") -}}
|
|
{{end}}
|
|
{{ end }}
|
|
|
|
{{ if .NextInSection }}
|
|
{{ with .NextInSection}}
|
|
{{- partial "post-card.html" (dict "context" . "index" 1 "isMoreCard" "yes" "isLarge" "post-card-large") -}}
|
|
{{end}}
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</aside>
|