summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-23 21:52:36 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-23 21:52:36 +0900
commitcbae608665261947916dce235fb565ff5aea5598 (patch)
tree29cfcfe2d7651f5be546095083db2332b56fbbd6 /layouts
parentdc930aa9190de6c3cc62c034157349a719e5a99b (diff)
modified recordings/recordings-plain.html
Diffstat (limited to 'layouts')
-rw-r--r--layouts/recordings/recordings-plain.html45
1 files changed, 44 insertions, 1 deletions
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 @@
</div>
<ul id="list">
+ <!-- 페이지 폴더명 -> 페이지 객체 매핑 준비 (예: 250922/index.md → 키: 250922) -->
+ {{ $pagesByFolder := dict }}
+ {{ range $p := .Pages }}
+ {{ $folder := path.Base (printf "%s" $p.File.Dir) }}
+ {{ $pagesByFolder = merge $pagesByFolder (dict $folder $p) }}
+ {{ end }}
+
+ <!-- 이미 인라인으로 붙인 페이지 폴더 추적 (Scratch 사용) -->
+ {{ $.Scratch.Set "usedFolders" (slice) }}
<!-- 1) 섹션 폴더 바로 아래 mp4/mov (섹션 리소스) -->
{{ $secVids := .Resources.Match "*.{mp4,mov}" }}
{{ range $v := $secVids }}
@@ -76,6 +85,39 @@
>
<span class="badge">video</span>
</li>
+ <!-- 동명 폴더 페이지가 있으면 비디오 바로 아래에 함께 표시 (예: 250922.mp4 → 250922/ 페이지) -->
+ {{ $base := replaceRE "\\.[^.]+$" "" $v.Name }}
+ {{ with (index $pagesByFolder $base) }}
+ <li>
+ {{ $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 }}
+ <a href="{{ $vid.RelPermalink }}" data-name="{{ or $p.Title $vid.Name }}" class="vid">
+ {{ with $p.Title }}{{ . }}{{ else }}{{ $vid.Name }}{{ end }}
+ </a>
+ <span class="badge">video</span>
+ <div class="meta">{{ $p.Date.Format "2006-01-02" }}</div>
+ {{ else if $img }}
+ <a href="{{ $img.RelPermalink }}" data-name="{{ or $p.Title $img.Name }}" class="img">
+ {{ with $p.Title }}{{ . }}{{ else }}{{ $img.Name }}{{ end }}
+ </a>
+ <span class="badge">image</span>
+ <div class="meta">{{ $p.Date.Format "2006-01-02" }}</div>
+ {{ else if $heic }}
+ <a href="{{ $heic.RelPermalink }}" data-name="{{ or $p.Title $heic.Name }}" class="heic">
+ {{ with $p.Title }}{{ . }}{{ else }}{{ $heic.Name }}{{ end }}
+ </a>
+ <span class="badge">heic</span>
+ <div class="meta">{{ $p.Date.Format "2006-01-02" }}</div>
+ {{ else }}
+ <a href="{{ $p.RelPermalink }}">{{ $p.Title }}</a>
+ <span class="badge">note</span>
+ {{ end }}
+ </li>
+ {{ $.Scratch.Add "usedFolders" (slice $base) }}
+ {{ end }}
{{ end }}
<!-- 1-3) 섹션 폴더 바로 아래 HEIC (다운로드/새 탭 열기 전용) -->
@@ -102,6 +144,8 @@
<!-- 2) 자식 페이지들 (노트/동영상 페이지) -->
{{ 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 }}
<a href="{{ $p.RelPermalink }}">{{ $p.Title }}</a>
<span class="badge">note</span>
- <div class="meta">{{ $p.Date.Format "2006-01-02" }}</div>
{{ end }}
</li>
{{ end }} {{ if and (eq (len $secVids) 0) (eq (len .Pages) 0) }}