diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-10-07 22:10:31 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-10-07 22:10:31 +0900 |
| commit | d01e4cd709d35d6e722b8a863322750b25b049ff (patch) | |
| tree | 07e478ef5f08089f01fa8767e6b794eebc00b491 | |
| parent | c778f0e87e61dafbbc0920fa3fc7dfc765a9996f (diff) | |
modified recordings/recordings-plain.html
| -rw-r--r-- | layouts/recordings/recordings-plain.html | 54 |
1 files 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 @@ </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 }} @@ -124,39 +116,6 @@ > <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 (다운로드/새 탭 열기 전용) --> @@ -229,8 +188,6 @@ <!-- 2) 자식 페이지들 (노트/동영상 페이지) --> {{ 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 }} </a> <span class="badge">video</span> - <div class="meta">{{ $p.Date.Format "2006-01-02" }}</div> + {{ $d := $p.Date.Format "2006-01-02" }}{{ if ne $d "0001-01-01" }}<div class="meta">{{ $d }}</div>{{ end }} {{ else if $img }} <a href="{{ $img.RelPermalink }}" @@ -255,7 +212,7 @@ {{ with $p.Title }}{{ . }}{{ else }}{{ $img.Name }}{{ end }} </a> <span class="badge">image</span> - <div class="meta">{{ $p.Date.Format "2006-01-02" }}</div> + {{ $d := $p.Date.Format "2006-01-02" }}{{ if ne $d "0001-01-01" }}<div class="meta">{{ $d }}</div>{{ end }} {{ else if $heic }} <a href="{{ $heic.RelPermalink }}" @@ -265,9 +222,10 @@ {{ with $p.Title }}{{ . }}{{ else }}{{ $heic.Name }}{{ end }} </a> <span class="badge">heic</span> - <div class="meta">{{ $p.Date.Format "2006-01-02" }}</div> + {{ $d := $p.Date.Format "2006-01-02" }}{{ if ne $d "0001-01-01" }}<div class="meta">{{ $d }}</div>{{ end }} {{ else }} - <a href="{{ $p.RelPermalink }}">{{ $p.Date.Format "2006-01-02" }} {{ $p.Title }}</a> + {{ $d := $p.Date.Format "2006-01-02" }} + <a href="{{ $p.RelPermalink }}">{{ if ne $d "0001-01-01" }}{{ $d }} {{ end }}{{ $p.Title }}</a> <span class="badge">note</span> {{ end }} </li> |
