From cbae608665261947916dce235fb565ff5aea5598 Mon Sep 17 00:00:00 2001
From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>
Date: Tue, 23 Sep 2025 21:52:36 +0900
Subject: modified recordings/recordings-plain.html
---
layouts/recordings/recordings-plain.html | 45 +++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/layouts/recordings/recordings-plain.html b/layouts/recordings/recordings-plain.html
index 7a5f752..d06db2c 100644
--- a/layouts/recordings/recordings-plain.html
+++ b/layouts/recordings/recordings-plain.html
@@ -67,6 +67,15 @@
+
+ {{ $pagesByFolder := dict }}
+ {{ range $p := .Pages }}
+ {{ $folder := path.Base (printf "%s" $p.File.Dir) }}
+ {{ $pagesByFolder = merge $pagesByFolder (dict $folder $p) }}
+ {{ end }}
+
+
+ {{ $.Scratch.Set "usedFolders" (slice) }}
{{ $secVids := .Resources.Match "*.{mp4,mov}" }}
{{ range $v := $secVids }}
@@ -76,6 +85,39 @@
>
video
+
+ {{ $base := replaceRE "\\.[^.]+$" "" $v.Name }}
+ {{ with (index $pagesByFolder $base) }}
+ -
+ {{ $p := . }}
+ {{ $vid := $p.Resources.GetMatch "*.{mp4,mov}" }}
+ {{ $img := $p.Resources.GetMatch "*.{jpg,jpeg,png,gif,webp,svg}" }}
+ {{ $heic := $p.Resources.GetMatch "*.{heic,HEIC}" }}
+ {{ if $vid }}
+
+ {{ with $p.Title }}{{ . }}{{ else }}{{ $vid.Name }}{{ end }}
+
+ video
+
{{ $p.Date.Format "2006-01-02" }}
+ {{ else if $img }}
+
+ {{ with $p.Title }}{{ . }}{{ else }}{{ $img.Name }}{{ end }}
+
+ image
+ {{ $p.Date.Format "2006-01-02" }}
+ {{ else if $heic }}
+
+ {{ with $p.Title }}{{ . }}{{ else }}{{ $heic.Name }}{{ end }}
+
+ heic
+ {{ $p.Date.Format "2006-01-02" }}
+ {{ else }}
+ {{ $p.Title }}
+ note
+ {{ end }}
+
+ {{ $.Scratch.Add "usedFolders" (slice $base) }}
+ {{ end }}
{{ end }}
@@ -102,6 +144,8 @@
{{ range $p := .Pages.ByDate.Reverse }}
+ {{ $folder := path.Base (printf "%s" $p.File.Dir) }}
+ {{ if in ($.Scratch.Get "usedFolders") $folder }}{{ continue }}{{ end }}
{{ $vid := $p.Resources.GetMatch "*.{mp4,mov}" }}
{{ $img := $p.Resources.GetMatch "*.{jpg,jpeg,png,gif,webp,svg}" }}
{{ $heic := $p.Resources.GetMatch "*.{heic,HEIC}" }}
@@ -139,7 +183,6 @@
{{ else }}
{{ $p.Title }}
note
- {{ $p.Date.Format "2006-01-02" }}
{{ end }}
{{ end }} {{ if and (eq (len $secVids) 0) (eq (len .Pages) 0) }}
--
cgit v1.2.3