summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_shortcodes/music.html22
1 files changed, 18 insertions, 4 deletions
diff --git a/layouts/_shortcodes/music.html b/layouts/_shortcodes/music.html
index 31ec45e8..feeb87fb 100644
--- a/layouts/_shortcodes/music.html
+++ b/layouts/_shortcodes/music.html
@@ -1,17 +1,31 @@
{{ $title := .Get "title" }}
{{ $cover := .Get "cover" }}
{{ $artist := .Get "artist" }}
+{{ $isAlbum := .Get "album" }}
+
{{ $platforms := slice "bandcamp" "apple" "spotify" "netease" }}
{{ $page := . }}
<div class="flex flex-col md:flex-row md:justify-between md:items-center gap-2">
<!-- Cover, title, artist -->
<div class="flex gap-5 items-center">
- <img class="w-15 h-15 rounded-lg shadow-lg m-0!"
- alt="{{ $title }} music cover"
- src="{{ $cover }}" loading="lazy" />
+ <div class="relative">
+ <img class="w-15 h-15 rd-lg shadow-lg m-0!"
+ alt="{{ $title }} music cover"
+ src="{{ $cover }}" loading="lazy" />
+ {{ if $isAlbum }}
+ <div class="w-13 h-13 rd-md bg-neutral-400 dark:bg-neutral-600 absolute top-1 left-3 -z-1"></div>
+ {{ end }}
+ </div>
<div>
- <h4 class="m-0 text-size-base">{{ $title }}</h4>
+ <h4 class="m-0 text-size-base flex items-center gap-2">
+ <span>{{ $title }}</span>
+ {{ if $isAlbum }}
+ <span class="font-mono bg-neutral-400 dark:bg-neutral-700 text-white
+ px-1 rd text-xs leading-relaxed hidden sm:inline-block"
+ >{{ T "music.album" }}</span>
+ {{ end }}
+ </h4>
<p class="m-0 text-size-sm text-secondary">{{ $artist }}</p>
</div>
</div>