summaryrefslogtreecommitdiffci
path: root/views/partials
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <saya.andy@posteo.com> 2026-05-15 21:09:56 +0700
committerGravatar SayaAndy <saya.andy@posteo.com> 2026-05-15 21:09:56 +0700
commitc07da125bc5b0bb65f58c4edce912874e46f6ed8 (patch)
treec562ba383b7e0227ed97a6560359d8b692cb86e2 /views/partials
parent8b2aeaa3e83a2bc0d70c4d8d803f0dc1ef049c47 (diff)
downloadweb-c07da125bc5b0bb65f58c4edce912874e46f6ed8.tar.gz
web-c07da125bc5b0bb65f58c4edce912874e46f6ed8.zip
feat: subheader for blog pages with medley-related ones
fix: inline shadow now sticks to scrolling feat: multitone backgrounds implementation refactor: convert color vars into oklch
Diffstat (limited to 'views/partials')
-rw-r--r--views/partials/catalogue-blog-cards.html14
1 files changed, 12 insertions, 2 deletions
diff --git a/views/partials/catalogue-blog-cards.html b/views/partials/catalogue-blog-cards.html
index 0a93797..3eebd58 100644
--- a/views/partials/catalogue-blog-cards.html
+++ b/views/partials/catalogue-blog-cards.html
@@ -1,6 +1,6 @@
{{- range .BlogPages }}
<hr class="first-of-type:hidden border-t-2 border-dotted border-main-hard">
-<div class="w-full flex flex-row items-stretch">
+<div {{ if .ToHighlight }}id="blog-page-highlighted"{{ end }} class="w-full flex flex-row items-stretch {{ if .ToHighlight }}bg-accent-light bg-paper{{ end }}">
<div class="relative min-h-24 flex flex-col w-28 overflow-hidden shrink-0 mask-r-from-70% mask-r-to-100%">
<img onclick="return changeUrl('{{ .ArticleLink }}');" class="h-full min-h-24 w-full cursor-pointer select-none object-cover block absolute" src="{{ printf $.ThumbnailBaseUrl .Thumbnail }}">
<div class="w-full h-6 flex flex-row mt-auto relative">
@@ -20,10 +20,20 @@
<span class="font-extrabold">{{ .Title }}</span>
<span class="italic">[{{ .ActionDate }}]</span>
</a>
+ {{- if not $.HidePublishedTime }}
<p class="basis-56 grow text-base italic text-secondary text-right">{{ .PublishedTime }}</p>
+ {{- end }}
</div>
<p class="font-gentium">{{ .ShortDescription }}</p>
+ {{- if not $.HideTags }}
<p class="font-m-plus text-sm">{{ $.L.TagsLabel }} {{ template "catalogue-blog-card-tags.html" . }}</p>
+ {{- end }}
</div>
</div>
-{{- end }} \ No newline at end of file
+{{- if .ToHighlight }}
+<script>
+ element = document.getElementById("blog-page-highlighted");
+ element.scrollIntoView({ behavior: "smooth", block: "center" });
+</script>
+{{- end }}
+{{- end }}