summaryrefslogtreecommitdiff
path: root/themes/PaperMod/layouts/_default/list.html
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2022-10-21 21:09:12 +0200
committerChristoph Cullmann <cullmann@kde.org>2022-10-21 21:09:12 +0200
commitec19540d9299cd65b3598bcb0acb69a6545c6e10 (patch)
tree7958239128857bf857da542da2360507feccec80 /themes/PaperMod/layouts/_default/list.html
parent9e3457474b73741354cf222eb419e4733c2aac20 (diff)
add simple theme
Diffstat (limited to 'themes/PaperMod/layouts/_default/list.html')
m---------themes/PaperMod0
-rw-r--r--themes/PaperMod/layouts/_default/list.html112
2 files changed, 112 insertions, 0 deletions
diff --git a/themes/PaperMod b/themes/PaperMod
deleted file mode 160000
-Subproject 3a0a4811cbc07c0bea09ef55b3c1bfb39b48cdd
diff --git a/themes/PaperMod/layouts/_default/list.html b/themes/PaperMod/layouts/_default/list.html
new file mode 100644
index 0000000..3a6f316
--- /dev/null
+++ b/themes/PaperMod/layouts/_default/list.html
@@ -0,0 +1,112 @@
+{{- define "main" }}
+
+{{- if (and site.Params.profileMode.enabled .IsHome) }}
+{{- partial "index_profile.html" . }}
+{{- else }} {{/* if not profileMode */}}
+
+{{- if not .IsHome | and .Title }}
+<header class="page-header">
+ {{- partial "breadcrumbs.html" . }}
+ <h1>
+ {{ .Title }}
+ {{- if and (or (eq .Kind `term`) (eq .Kind `section`)) (.Param "ShowRssButtonInSectionTermList") }}
+ <a href="index.xml" 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 }}
+ </h1>
+ {{- if .Description }}
+ <div class="post-description">
+ {{ .Description | markdownify }}
+ </div>
+ {{- end }}
+</header>
+{{- end }}
+
+{{- if .Content }}
+<div class="post-content">
+ {{- if not (.Param "disableAnchoredHeadings") }}
+ {{- partial "anchored_headings.html" .Content -}}
+ {{- else }}{{ .Content }}{{ end }}
+</div>
+{{- end }}
+
+{{- $pages := union .RegularPages .Sections }}
+
+{{- if .IsHome }}
+{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
+{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
+{{- end }}
+
+{{- $paginator := .Paginate $pages }}
+
+{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
+{{- partial "home_info.html" . }}
+{{- end }}
+
+{{- $term := .Data.Term }}
+{{- range $index, $page := $paginator.Pages }}
+
+{{- $class := "post-entry" }}
+
+{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }}
+{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
+{{- $class = "first-entry" }}
+{{- else if $term }}
+{{- $class = "post-entry tag-entry" }}
+{{- end }}
+
+<article class="{{ $class }}">
+ {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }}
+ {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
+ <header class="entry-header">
+ <h2>
+ {{- .Title }}
+ {{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
+ </h2>
+ </header>
+ {{- if (ne (.Param "hideSummary") true) }}
+ <div class="entry-content">
+ <p>{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}</p>
+ </div>
+ {{- end }}
+ {{- if not (.Param "hideMeta") }}
+ <footer class="entry-footer">
+ {{- partial "post_meta.html" . -}}
+ </footer>
+ {{- end }}
+ <a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
+</article>
+{{- end }}
+
+{{- if gt $paginator.TotalPages 1 }}
+<footer class="page-footer">
+ <nav class="pagination">
+ {{- if $paginator.HasPrev }}
+ <a class="prev" href="{{ $paginator.Prev.URL | absURL }}">
+ «&nbsp;{{ i18n "prev_page" }}&nbsp;
+ {{- if (.Param "ShowPageNums") }}
+ {{- sub $paginator.PageNumber 1 }}/{{ $paginator.TotalPages }}
+ {{- end }}
+ </a>
+ {{- end }}
+ {{- if $paginator.HasNext }}
+ <a class="next" href="{{ $paginator.Next.URL | absURL }}">
+ {{- i18n "next_page" }}&nbsp;
+ {{- if (.Param "ShowPageNums") }}
+ {{- add 1 $paginator.PageNumber }}/{{ $paginator.TotalPages }}
+ {{- end }}&nbsp;»
+ </a>
+ {{- end }}
+ </nav>
+</footer>
+{{- end }}
+
+{{- end }}{{/* end profileMode */}}
+
+{{- end }}{{- /* end main */ -}}