From dab511d87cc83a00cac6be60aada242645d2a5c2 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 26 Sep 2025 07:33:23 +0900 Subject: modified recordings/_index.md, modified recordings/recordings-plain.html --- content/recordings/_index.md | 2 + layouts/recordings/recordings-plain.html | 89 +++++++++++++++++++++++++++++++- 2 files changed, 90 insertions(+), 1 deletion(-) diff --git a/content/recordings/_index.md b/content/recordings/_index.md index a2799bf..8a1887d 100644 --- a/content/recordings/_index.md +++ b/content/recordings/_index.md @@ -6,3 +6,5 @@ type: "recordings" --- 나의 하루하루의 일기들. 매일매일 일기쓰기 도전! + +1207.96.105.2301 diff --git a/layouts/recordings/recordings-plain.html b/layouts/recordings/recordings-plain.html index d06db2c..4c746c4 100644 --- a/layouts/recordings/recordings-plain.html +++ b/layouts/recordings/recordings-plain.html @@ -51,6 +51,45 @@ padding: 2px 6px; margin-left: 6px; } + .folder-section { + margin: 16px 0; + border: 1px solid #ddd; + border-radius: 8px; + background: #f9f9f9; + } + .folder-header { + padding: 8px 12px; + cursor: pointer; + font-weight: 600; + display: flex; + justify-content: space-between; + align-items: center; + } + .folder-header:hover { + background: #f0f0f0; + } + .folder-name { + color: #333; + } + .folder-count { + color: #666; + font-size: 0.9rem; + font-weight: normal; + } + .folder-content { + padding: 0 12px 12px; + margin: 0; + border-top: 1px solid #eee; + background: white; + } + .folder-content li { + margin: 8px 0; + padding: 4px 0; + border-bottom: 1px solid #f0f0f0; + } + .folder-content li:last-child { + border-bottom: none; + } @@ -142,6 +181,52 @@ {{ end }} + + {{ $subfolderFiles := .Resources.Match "**/*.{mp4,mov,jpg,jpeg,png,gif,webp,svg,heic,HEIC}" }} + {{ $.Scratch.Set "folderGroups" (dict) }} + {{ range $f := $subfolderFiles }} + {{ $dir := path.Dir $f.RelPermalink }} + {{ if ne $dir "." }} + {{ $folderName := path.Base $dir }} + {{ $currentGroups := $.Scratch.Get "folderGroups" }} + {{ $folderFiles := index $currentGroups $folderName }} + {{ if $folderFiles }} + {{ $.Scratch.Add (printf "folder_%s" $folderName) (slice $f) }} + {{ else }} + {{ $.Scratch.Set (printf "folder_%s" $folderName) (slice $f) }} + {{ $newGroups := merge $currentGroups (dict $folderName true) }} + {{ $.Scratch.Set "folderGroups" $newGroups }} + {{ end }} + {{ end }} + {{ end }} + + {{ $folderGroups := $.Scratch.Get "folderGroups" }} + {{ range $folderName, $exists := $folderGroups }} + {{ $files := $.Scratch.Get (printf "folder_%s" $folderName) }} +
  • +
    + + {{ $folderName }}/ + ({{ len $files }} items) + + +
    +
  • + {{ end }} + {{ range $p := .Pages.ByDate.Reverse }} {{ $folder := path.Base (printf "%s" $p.File.Dir) }} @@ -185,7 +270,9 @@ note {{ end }} - {{ end }} {{ if and (eq (len $secVids) 0) (eq (len .Pages) 0) }} + {{ end }} + + {{ if and (eq (len $secVids) 0) (eq (len .Pages) 0) }}
  • No items yet.
  • {{ end }} -- cgit v1.2.3