- routes/op.ts: editor / upload / youtube-start reject when folder.parentId === null - op/folder.ejs: at depth 1 show only "하위 폴더 추가"; at depth 2 show "영상 추가" + "플레이리스트 추가". Video grid and sub-folder modal rendered conditionally. - folder.ejs (public): at depth 1 render only sub-folder grid; at depth 2 render only video grid. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
68 lines
2.4 KiB
Plaintext
68 lines
2.4 KiB
Plaintext
<!doctype html>
|
|
<html lang="ko">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title><%= folder.name %> · 비디오 사이트</title>
|
|
<link rel="stylesheet" href="/static/styles.css" />
|
|
</head>
|
|
<body class="siteBody">
|
|
<header class="publicNav">
|
|
<a class="navBrand" href="/">
|
|
<span class="navLogo">🎬</span>
|
|
<span class="navTitle">비디오 사이트</span>
|
|
</a>
|
|
<a class="secondaryButton" href="/op">관리자</a>
|
|
</header>
|
|
|
|
<%
|
|
// 현재 폴더까지의 경로 prefix (영상/하위폴더 URL 조립용)
|
|
var folderPathEnc = breadcrumb.map(function (s) { return encodeURIComponent(s) }).join('/')
|
|
var parentHref = isSubFolder ? '/folder/' + encodeURIComponent(breadcrumb[0]) : '/'
|
|
var parentLabel = isSubFolder ? '← ' + breadcrumb[0] : '← 폴더 목록'
|
|
%>
|
|
|
|
<main class="pageWrap">
|
|
<section class="hero">
|
|
<a class="muted" href="<%= parentHref %>"><%= parentLabel %></a>
|
|
<h1>📁 <%= breadcrumb.join(' / ') %></h1>
|
|
</section>
|
|
|
|
<% if (!isSubFolder) { %>
|
|
<section class="folderGrid">
|
|
<% if (!subFolders || subFolders.length === 0) { %>
|
|
<p class="muted">아직 하위 폴더가 없습니다.</p>
|
|
<% } %>
|
|
<% (subFolders || []).forEach(function (sf) { %>
|
|
<a class="folderCard" href="/folder/<%= folderPathEnc %>/<%= encodeURIComponent(sf.name) %>">
|
|
<span class="folderIcon">📁</span>
|
|
<span class="folderName"><%= sf.name %></span>
|
|
</a>
|
|
<% }) %>
|
|
</section>
|
|
<% } else { %>
|
|
<section class="videoGrid">
|
|
<% if (videos.length === 0) { %>
|
|
<p class="muted">이 폴더에 영상이 없습니다.</p>
|
|
<% } %>
|
|
<% videos.forEach(function (v) {
|
|
var shareUrl = '/video/' + folderPathEnc + '/' + encodeURIComponent(v.id)
|
|
%>
|
|
<a class="videoCard" href="<%= shareUrl %>"
|
|
data-video-id="<%= v.id %>" data-share-url="<%= shareUrl %>">
|
|
<div class="videoThumb">▶</div>
|
|
<div class="videoTitle"><%= v.title %></div>
|
|
</a>
|
|
<% }) %>
|
|
</section>
|
|
<% } %>
|
|
</main>
|
|
|
|
<div class="ctxMenu" id="ctxMenu" hidden>
|
|
<button type="button" data-action="copyUrl">영상 주소 복사</button>
|
|
</div>
|
|
|
|
<script src="/static/public-folder.js"></script>
|
|
</body>
|
|
</html>
|