♻️ refactor article links, cards, and recent articles partials

This commit is contained in:
Nuno Coração
2022-12-31 15:58:20 +00:00
parent 963310a713
commit 6bccf5c7d9
25 changed files with 119 additions and 119 deletions
@@ -48,7 +48,7 @@
{{ end }}
<div class="text-sm text-neutral-500 dark:text-neutral-400">
{{ partial "article-meta.html" . }}
{{ partial "article-meta/basic.html" . }}
</div>
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
@@ -69,7 +69,7 @@
{{ end }}
</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">
{{ partial "article-meta.html" . }}
{{ partial "article-meta/basic.html" . }}
</div>
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
<div class="py-1 prose dark:prose-invert">
+1 -1
View File
@@ -54,7 +54,7 @@
</div>
</article>
<section>
{{ partial "recent-articles.html" . }}
{{ partial "recent-articles/main.html" . }}
</section>
{{ if .Site.Params.homepage.layoutBackgroundBlur | default false }}
<div id="background-blur" class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
+1 -1
View File
@@ -27,5 +27,5 @@
</div>
</div>
<section>
{{ partial "recent-articles.html" . }}
{{ partial "recent-articles/main.html" . }}
</section>
+1 -1
View File
@@ -51,5 +51,5 @@
</div>
</article>
<section>
{{ partial "recent-articles.html" . }}
{{ partial "recent-articles/main.html" . }}
</section>
+1 -1
View File
@@ -7,5 +7,5 @@
<section>{{ .Content | emojify }}</section>
</article>
<section>
{{ partial "recent-articles.html" . }}
{{ partial "recent-articles/main.html" . }}
</section>
+1 -1
View File
@@ -32,5 +32,5 @@
<section class="prose dark:prose-invert">{{ .Content | emojify }}</section>
</article>
<section>
{{ partial "recent-articles.html" . }}
{{ partial "recent-articles/main.html" . }}
</section>
@@ -6,7 +6,7 @@
class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
{{ partial "article-link-card.html" . }}
{{ partial "article-link/card.html" . }}
{{ end }}
</section>
</div>
@@ -4,6 +4,6 @@
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
{{ partial "article-link-card.html" . }}
{{ partial "article-link/card.html" . }}
{{ end }}
</section>
@@ -4,6 +4,6 @@
<section class="space-y-10 w-full">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages
}}
{{ partial "article-link.html" . }}
{{ partial "article-link/simple.html" . }}
{{ end }}
</section>
@@ -7,11 +7,11 @@
<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" . }}
{{ partial "recent-articles/cardview.html" . }}
{{ else if and .Site.Params.homepage.cardView .Site.Params.homepage.cardViewScreenWidth | default false }}
{{ partial "recent-articles-cardview-fullwidth.html" . }}
{{ partial "recent-articles/cardview-fullwidth.html" . }}
{{ else }}
{{ partial "recent-articles-list.html" . }}
{{ partial "recent-articles/list.html" . }}
{{ end }}
{{ if .Site.Params.homepage.showMoreLink | default false }}