mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
fixed margins in recent articles
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
{{ $recentArticles := 5 }}
|
||||
{{ $showMoreLinkDest := "/posts" }}
|
||||
{{ 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>
|
||||
{{ 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 }}
|
||||
<div class="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">Show More</button>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ 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>
|
||||
<section class="space-y-10 w-max">
|
||||
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages }}
|
||||
{{ partial "article-link.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ if .Site.Params.homepage.showMoreLink | default false }}
|
||||
{{ if index .Site.Params.homepage "showRecentItems" }}
|
||||
{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
|
||||
{{ end }}
|
||||
<div class="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">Show
|
||||
More</button>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user