{{ partial "partials/home/card.html" . }}
+
{{ partial "partials/home/page.html" . }}
+
+ {{ partial "recent-articles-demo.html" . }}
+
diff --git a/exampleSite/layouts/partials/recent-articles-demo.html b/exampleSite/layouts/partials/recent-articles-demo.html
new file mode 100644
index 00000000..d2d79088
--- /dev/null
+++ b/exampleSite/layouts/partials/recent-articles-demo.html
@@ -0,0 +1,64 @@
+{{ $recentArticles := 5 }}
+{{ $showMoreLinkDest := "/posts" }}
+{{ if index .Site.Params.homepage "showRecentItems" }}
+{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
+{{ end }}
+
+
+
+
+
+ This is a demo of theme's list configurations: card view with constrained width
+
+
+
+
+
+
+
+ {{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
+ .Site.Params.mainSections)).Pages }}
+
+ {{ partial "article-link-card.html" . }}
+
+ {{ end }}
+
+
+
+
+
+
+ {{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
+ .Site.Params.mainSections)).Pages }}
+
+ {{ partial "article-link-card.html" . }}
+
+ {{ end }}
+
+
+
+
+
+ {{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
+ .Site.Params.mainSections)).Pages
+ }}
+ {{ partial "article-link.html" . }}
+ {{ end }}
+
+
+
+{{ if .Site.Params.homepage.showMoreLink | default false }}
+{{ if index .Site.Params.homepage "showRecentItems" }}
+{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
+{{ end }}
+
+{{ end }}
\ No newline at end of file
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 4462abef..ab916162 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,49 +1,111 @@
{{ define "main" }}
- {{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in .TableOfContents "
- {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }}
- {{ partial "breadcrumbs.html" . }}
- {{ end }}
-
+{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in
+.TableOfContents "
+ {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }}
+ {{ partial "breadcrumbs.html" . }}
+ {{ end }}
+
-
+ {{- end }} prose flex max-w-full flex-col dark:prose-invert lg:flex-row">
{{ if $toc }}
-
-
- {{ partial "toc.html" . }}
-
+
+
+ {{ partial "toc.html" . }}
+
{{ end }}
{{ .Content | emojify }}
{{ if gt .Pages 0 }}
-
- {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
- {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
-
+
+ {{ if .Site.Params.list.cardView | default false }}
+
+ {{ $cardViewScreenWidth := .Site.Params.list.cardViewScreenWidth}}
+
+ {{ if not $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
+
+ {{ if $cardViewScreenWidth }}
+
+
+ {{ else }}
+
+
+ {{ end }}
+
+ {{ end }}
+
+
+
+ {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
+ {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
+
{{ .Key }}
-
- {{ end }}
- {{ range .Pages }}
- {{ partial "article-link.html" . }}
- {{ end }}
- {{ end }}
-
- {{ partial "pagination.html" . }}
- {{ else }}
-
-
- {{ i18n "list.no_articles" | emojify }}
-
-
- {{ end }}
-{{ end }}
+ {{ else }}
+ {{ end }}
+
+ {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
+
+ {{ if $cardViewScreenWidth}}
+