From d01e4cd709d35d6e722b8a863322750b25b049ff Mon Sep 17 00:00:00 2001
From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>
Date: Tue, 7 Oct 2025 22:10:31 +0900
Subject: modified recordings/recordings-plain.html
---
layouts/recordings/recordings-plain.html | 54 ++++----------------------------
1 file changed, 6 insertions(+), 48 deletions(-)
diff --git a/layouts/recordings/recordings-plain.html b/layouts/recordings/recordings-plain.html
index d72fdcd..8528c45 100644
--- a/layouts/recordings/recordings-plain.html
+++ b/layouts/recordings/recordings-plain.html
@@ -106,15 +106,7 @@
-
- {{ $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 }}
@@ -124,39 +116,6 @@
>
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 }}
@@ -229,8 +188,6 @@
{{ range $p := .Pages.ByDate.Reverse }}
- {{ $folder := path.Base (printf "%s" $p.File.Dir) }}
- {{ if in ($.Scratch.Get "usedFolders") $folder }}{{ continue }}{{ end }}
{{ if eq $p.File.BaseFileName "whoareyou" }}{{ continue }}{{ end }}
{{ $vid := $p.Resources.GetMatch "*.{mp4,mov}" }}
{{ $img := $p.Resources.GetMatch "*.{jpg,jpeg,png,gif,webp,svg}" }}
@@ -245,7 +202,7 @@
{{ with $p.Title }}{{ . }}{{ else }}{{ $vid.Name }}{{ end }}
video
- {{ $p.Date.Format "2006-01-02" }}
+ {{ $d := $p.Date.Format "2006-01-02" }}{{ if ne $d "0001-01-01" }}{{ $d }}
{{ end }}
{{ else if $img }}
image
- {{ $p.Date.Format "2006-01-02" }}
+ {{ $d := $p.Date.Format "2006-01-02" }}{{ if ne $d "0001-01-01" }}{{ $d }}
{{ end }}
{{ else if $heic }}
heic
- {{ $p.Date.Format "2006-01-02" }}
+ {{ $d := $p.Date.Format "2006-01-02" }}{{ if ne $d "0001-01-01" }}{{ $d }}
{{ end }}
{{ else }}
- {{ $p.Date.Format "2006-01-02" }} {{ $p.Title }}
+ {{ $d := $p.Date.Format "2006-01-02" }}
+ {{ if ne $d "0001-01-01" }}{{ $d }} {{ end }}{{ $p.Title }}
note
{{ end }}
--
cgit v1.2.3