working draft of thoughts
This commit is contained in:
61
layouts/thoughts/list.html
Normal file
61
layouts/thoughts/list.html
Normal file
@@ -0,0 +1,61 @@
|
||||
{{- define "main" }}
|
||||
|
||||
<header class="page-header">
|
||||
<h1>
|
||||
{{ .Title }} {{- if (.Param "ShowRssButtonInSectionTermList") }} {{- with
|
||||
.OutputFormats.Get "rss" }}
|
||||
<a href="{{ .RelPermalink }}" title="RSS" aria-label="RSS">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
height="23"
|
||||
>
|
||||
<path d="M4 11a9 9 0 0 1 9 9" />
|
||||
<path d="M4 4a16 16 0 0 1 16 16" />
|
||||
<circle cx="5" cy="19" r="1" />
|
||||
</svg>
|
||||
</a>
|
||||
{{- end }} {{- end }}
|
||||
</h1>
|
||||
<!-- prettier-ignore -->
|
||||
{{- with (.Description | default "Things undeserving of being a whole article") }}
|
||||
<div class="post-description">{{ . | markdownify }}</div>
|
||||
{{- end }}
|
||||
</header>
|
||||
|
||||
{{- if .Content }}
|
||||
<div class="post-content md-content">
|
||||
{{- if not (.Param "disableAnchoredHeadings") }} {{- partial
|
||||
"anchored_headings.html" .Content -}} {{- else }}{{ .Content }}{{ end }}
|
||||
</div>
|
||||
{{- end }} {{- $thoughts := where site.RegularPages "Type" "thoughts" }} {{-
|
||||
$thoughts = $thoughts.ByDate.Reverse }} {{- $paginator := .Paginate $thoughts 50
|
||||
}} {{- if $paginator.Pages }}
|
||||
<div class="thought-timeline" id="thought-timeline">
|
||||
{{- range $paginator.Pages }} {{- partial "thought_timeline_entry.html" . }}
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{- if $paginator.HasNext }}
|
||||
<div class="thought-timeline-more">
|
||||
<button
|
||||
class="thought-load-more"
|
||||
type="button"
|
||||
data-next="{{ $paginator.Next.URL }}"
|
||||
>
|
||||
Load older thoughts
|
||||
</button>
|
||||
<noscript>
|
||||
<a class="thought-load-more" href="{{ $paginator.Next.URL }}"
|
||||
>Load older thoughts</a
|
||||
>
|
||||
</noscript>
|
||||
</div>
|
||||
{{- end }} {{- else }}
|
||||
<p class="thought-empty">No thoughts yet.</p>
|
||||
{{- end }} {{- end }}
|
||||
Reference in New Issue
Block a user