2024-04-28 17:33:09 +02:00
|
|
|
{{ $recentArticles := 5 }}
|
2024-08-28 22:54:34 +02:00
|
|
|
{{ $showMoreLinkDest := "/posts/" }}
|
2024-04-28 17:33:09 +02:00
|
|
|
{{ if .Site.Params.homepage.showRecent | default false }}
|
|
|
|
{{ if index .Site.Params.homepage "showRecentItems" }}
|
|
|
|
{{ $recentArticles = .Site.Params.homepage.showRecentItems }}
|
|
|
|
{{ end }}
|
|
|
|
<h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
|
|
|
|
|
|
|
|
{{ if and .Site.Params.homepage.cardView (not .Site.Params.homepage.cardViewScreenWidth) | default false }}
|
|
|
|
{{ partial "recent-articles/cardview.html" . }}
|
|
|
|
{{ else if and .Site.Params.homepage.cardView .Site.Params.homepage.cardViewScreenWidth | default false }}
|
|
|
|
{{ partial "recent-articles/cardview-fullwidth.html" . }}
|
|
|
|
{{ else }}
|
|
|
|
{{ partial "recent-articles/list.html" . }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if .Site.Params.homepage.showMoreLink | default false }}
|
|
|
|
{{ if index .Site.Params.homepage "showRecentItems" }}
|
|
|
|
{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
|
|
|
|
{{ end }}
|
|
|
|
<div class="mt-10 flex justify-center">
|
|
|
|
<a href="{{ $showMoreLinkDest }}">
|
|
|
|
<button
|
|
|
|
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">
|
2024-06-26 21:44:28 +02:00
|
|
|
{{ i18n "recent.show_more" | markdownify }}
|
2024-04-28 17:33:09 +02:00
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2024-06-26 21:44:28 +02:00
|
|
|
{{ end }}
|