Files
make_video_site/public/styles.css
Claude (owner) 042d9f7059 feat: 플레이리스트 추가 화면 임시저장(draft) 기능
다운로드 시작 전, 수정해둔 값(플레이리스트 URL + 항목별 제목/ID/시작/길이/
ID모드/자릿수채우기)을 폴더당 1개 저장하고 나중에 불러올 수 있게 함.

- db: playlist_drafts 테이블 (folder_id PK, JSON data, updated_at)
- storeDb: savePlaylistDraft/getPlaylistDraft/deletePlaylistDraft
- op: GET/POST/POST(delete) /playlist/draft (하위 폴더 한정)
- UI: 임시저장 / 불러오기 / 삭제 버튼 + 진입 시 기존 draft 자동 감지

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-06 16:22:42 +09:00

525 lines
20 KiB
CSS

:root {
color-scheme: dark;
--bg: #0d1117;
--bg-alt: #161b22;
--bg-card: #1f242c;
--border: #30363d;
--text: #e6edf3;
--text-muted: #8b949e;
--accent: #2f81f7;
--accent-hover: #1f6feb;
--danger: #f85149;
--success: #3fb950;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* display: flex 등이 걸린 오버레이/모달이라도 hidden 속성을 항상 우선시킨다. */
[hidden] { display: none !important; }
body.siteBody {
font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
}
body.siteBody.centerLayout { display: flex; align-items: center; justify-content: center; }
.pageWrap { max-width: 1200px; margin: 0 auto; padding: 32px 24px 80px; }
/* nav */
.topNav, .publicNav {
display: flex; align-items: center; justify-content: space-between;
padding: 16px 32px; background: var(--bg-alt);
border-bottom: 1px solid var(--border);
}
.navBrand {
display: inline-flex; align-items: center; gap: 10px;
text-decoration: none; color: inherit; font-weight: 600;
}
.navLogo { font-size: 22px; }
.navTitle { font-size: 16px; }
.navUser { position: relative; }
.navUserButton {
background: transparent; border: 1px solid var(--border); color: var(--text);
padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.navUserButton:hover { background: var(--bg-card); }
.navUserMenu {
position: absolute; right: 0; top: calc(100% + 6px);
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; padding: 8px; min-width: 160px;
box-shadow: 0 12px 24px rgba(0,0,0,0.4); z-index: 50;
}
.navUserMenu form { margin: 0; }
.dangerLink {
background: transparent; border: none; color: var(--danger); cursor: pointer;
padding: 6px 8px; font-size: 14px; width: 100%; text-align: left;
}
.dangerLink:hover { background: rgba(248,81,73,0.1); border-radius: 6px; }
/* generic */
.hero h1 { margin: 8px 0 8px; font-size: 30px; }
.hero p { color: var(--text-muted); margin: 0 0 24px; }
.muted { color: var(--text-muted); font-size: 13px; text-decoration: none; }
.primaryButton, .secondaryButton, .dangerButton {
border-radius: 8px; padding: 9px 16px; font-size: 14px; cursor: pointer;
border: 1px solid transparent; text-decoration: none; display: inline-block;
}
.primaryButton { background: var(--accent); color: white; }
.primaryButton:hover { background: var(--accent-hover); }
.secondaryButton { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.secondaryButton:hover { background: var(--bg-alt); }
.dangerButton { background: var(--danger); color: white; }
.dashboardHeader {
display: flex; justify-content: space-between; align-items: flex-end;
margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.dashboardActions { display: flex; gap: 8px; flex-wrap: wrap; }
/* folder grid */
.folderGrid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 16px;
}
.folderCard {
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 12px; text-decoration: none; color: var(--text);
display: flex; flex-direction: column; align-items: stretch;
cursor: pointer; transition: transform .08s ease;
}
.folderCard:hover { transform: translateY(-2px); border-color: var(--accent); }
/* 공개 화면: 카드 자체가 <a> 라 패딩을 직접 적용 */
.folderCard:not(.adminFolder) { padding: 18px; align-items: center; gap: 8px; }
/* 관리자 화면: 카드는 .adminFolder div, 내부 a 가 카드 전체를 채워 클릭 영역이 됨 */
.folderCardLink {
display: flex; flex-direction: column; align-items: center; gap: 8px;
text-decoration: none; color: inherit;
padding: 18px; flex: 1 1 auto;
}
.folderIcon { font-size: 40px; }
.folderName { font-size: 15px; word-break: break-all; text-align: center; }
/* tools (ffmpeg / yt-dlp) */
.toolsSection { margin-top: 40px; }
.toolsSection h2 { margin-bottom: 6px; }
.toolsSection .muted { margin-bottom: 16px; }
.toolGrid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 16px;
}
.toolCard {
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.toolHead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.toolName { font-size: 16px; font-weight: 600; }
.toolVersion { font-size: 13px; color: var(--accent); text-align: right; }
.toolPath { font-size: 12px; word-break: break-all; }
.toolRow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolStatus { font-size: 12px; }
/* video grid */
.videoGrid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 18px;
}
.videoCard {
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; overflow: hidden; cursor: pointer; color: var(--text);
display: flex; flex-direction: column; padding: 0; text-align: left;
font: inherit;
}
.videoCard:hover { border-color: var(--accent); }
.videoThumb {
position: relative;
aspect-ratio: 16/9; background: linear-gradient(135deg, #1f242c, #0d1117);
display: flex; align-items: center; justify-content: center;
font-size: 36px; color: var(--accent);
}
.videoThumbImg {
position: absolute; inset: 0; width: 100%; height: 100%;
object-fit: cover; display: block; background: #0d1117; z-index: 1;
}
.videoThumbPlay { position: relative; z-index: 0; }
.videoTitle { padding: 10px 12px; font-size: 14px; }
/* login */
.loginCard {
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 14px; padding: 32px; min-width: 320px;
}
.loginForm { display: flex; flex-direction: column; gap: 14px; }
.loginForm label { display: flex; flex-direction: column; gap: 6px; }
.loginForm input {
background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
color: var(--text); padding: 10px 12px; font-size: 14px;
}
.errorBanner {
background: rgba(248,81,73,0.15); border: 1px solid var(--danger);
color: #ffb1ab; padding: 10px 12px; border-radius: 8px; font-size: 13px;
}
/* context menu */
.ctxMenu {
position: fixed; z-index: 100; background: var(--bg-card);
border: 1px solid var(--border); border-radius: 8px; padding: 6px;
box-shadow: 0 12px 24px rgba(0,0,0,0.4); min-width: 160px;
}
.ctxMenu button {
display: block; width: 100%; text-align: left; background: transparent;
border: none; color: var(--text); padding: 8px 10px; font-size: 13px;
border-radius: 6px; cursor: pointer;
}
.ctxMenu button:hover { background: var(--bg-alt); }
.flashToast {
position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 12px);
background: var(--bg-card); color: var(--text);
border: 1px solid var(--border); border-radius: 8px;
padding: 10px 18px; font-size: 14px;
box-shadow: 0 8px 20px rgba(0,0,0,0.4);
opacity: 0; transition: opacity 180ms ease, transform 180ms ease;
z-index: 300; pointer-events: none;
}
.flashToast.show { opacity: 1; transform: translate(-50%, 0); }
/* modal */
.modalOverlay {
position: fixed; inset: 0; background: rgba(0,0,0,0.6);
display: flex; align-items: center; justify-content: center; z-index: 200;
}
.modalCard {
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 14px; padding: 24px; min-width: 320px;
}
.modalCard h2 { margin: 0 0 16px; font-size: 18px; }
.modalCard label { display: flex; flex-direction: column; gap: 6px; }
.modalCard input[type="text"] {
background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
color: var(--text); padding: 10px 12px; font-size: 14px;
}
.modalActions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* player modal */
.playerOverlay {
position: fixed; inset: 0; background: rgba(0,0,0,0.85);
display: flex; align-items: center; justify-content: center; z-index: 300;
}
.playerModal {
position: relative; background: #000; border-radius: 12px;
width: min(960px, 92vw); max-height: 92vh; padding: 16px;
display: flex; flex-direction: column; gap: 10px;
}
.playerClose {
position: absolute; top: 8px; right: 12px; background: transparent;
border: none; color: white; font-size: 22px; cursor: pointer; z-index: 1;
}
.playerTitle { color: white; font-size: 16px; margin-right: 36px; }
.playerModal video { width: 100%; max-height: 80vh; background: #000; }
.standalonePlayer { background: #000; border-radius: 10px; padding: 12px; }
.standalonePlayer video { width: 100%; max-height: 80vh; }
/* editor */
.editorNav {
display: flex; justify-content: space-between; align-items: center;
padding: 12px 24px; background: var(--bg-alt);
border-bottom: 1px solid var(--border); gap: 12px;
}
.editorNavLeft { display: flex; align-items: center; gap: 16px; flex: 1; }
.editorNavRight { display: flex; gap: 8px; }
.titleInput {
background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
color: var(--text); padding: 8px 12px; font-size: 15px; min-width: 280px;
flex: 1; max-width: 480px;
}
.editorMain { padding: 24px; }
.editorStage { max-width: 1200px; margin: 0 auto; }
.dropZone {
background: var(--bg-card); border: 2px dashed var(--border);
border-radius: 12px; padding: 40px; text-align: center;
display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.dropZone.dragOver { border-color: var(--accent); background: rgba(47,129,247,0.08); }
.dropTitle { font-size: 18px; margin: 0; }
.ytRow {
display: flex; gap: 8px; width: 100%; max-width: 640px; flex-wrap: wrap;
}
.ytRow input {
flex: 1; background: var(--bg); border: 1px solid var(--border);
border-radius: 8px; color: var(--text); padding: 10px 12px; font-size: 14px;
min-width: 240px;
}
#downloadProgress { width: 100%; max-width: 640px; height: 8px; }
.videoPanel { display: flex; flex-direction: column; gap: 16px; }
.videoPanel video {
width: 100%; max-height: 60vh; background: #000; border-radius: 10px;
}
.videoIdRow {
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; padding: 10px 14px;
}
.videoIdRow label { color: var(--text-muted); font-size: 13px; }
.videoIdRow input[type="text"] {
background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
color: var(--text); padding: 6px 10px; font-family: ui-monospace, monospace;
font-size: 14px; min-width: 260px; flex: 1; max-width: 420px;
}
.idStatus { font-size: 13px; min-width: 90px; }
.idStatusOk { color: #5dd28a; }
.idStatusBad { color: #e57373; }
.trimTimeline {
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; padding: 16px;
display: flex; flex-direction: column; gap: 14px;
}
.trimTimelineHeader {
display: flex; justify-content: space-between; align-items: center;
gap: 12px; flex-wrap: wrap;
}
.timeReadout {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 14px; color: var(--text);
}
.trimTimelineActions { display: flex; gap: 6px; flex-wrap: wrap; }
.trimTimelineActions button {
background: var(--bg); border: 1px solid var(--border); color: var(--text);
padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.trimTimelineActions button:hover { background: var(--bg-alt); border-color: var(--accent); }
.trimBar {
position: relative; height: 44px; margin: 8px 14px;
background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
user-select: none; touch-action: none; cursor: pointer;
}
.trimRangeFill {
position: absolute; top: 0; bottom: 0;
background: rgba(47, 129, 247, 0.22);
border-left: 2px solid var(--accent);
border-right: 2px solid var(--accent);
pointer-events: none;
}
.trimHandle {
position: absolute; top: -6px; bottom: -6px;
width: 14px; margin-left: -7px;
background: var(--accent); border-radius: 4px;
cursor: ew-resize;
display: flex; align-items: center; justify-content: center;
box-shadow: 0 1px 4px rgba(0,0,0,0.4);
z-index: 2;
}
.trimHandle:hover, .trimHandle.dragging { background: var(--accent-hover); }
.trimHandle::before {
content: ''; width: 2px; height: 60%; background: rgba(255,255,255,0.85);
border-radius: 1px;
}
.trimPlayhead {
position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px;
background: #ffffff; pointer-events: none;
box-shadow: 0 0 4px rgba(255,255,255,0.45);
z-index: 1;
}
.trimNumericRow {
display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.trimNumericRow label {
display: flex; align-items: center; gap: 8px;
font-size: 13px; color: var(--text-muted);
}
.trimNumericRow input {
background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
color: var(--text); padding: 6px 10px; font-size: 14px; width: 110px;
}
.trimDuration {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 13px; color: var(--text-muted);
}
.adminFolder { position: relative; }
.adminVideo { position: relative; }
/* ─── 플레이리스트 import ────────────────────────────────────────────── */
.playlistProbeSection {
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 12px; padding: 18px 20px;
}
.playlistProbeRow {
display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap;
}
.playlistProbeRow input[type="text"] {
flex: 1; min-width: 320px;
background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
color: var(--text); padding: 8px 12px; font-size: 14px;
}
.playlistDraftRow {
display: flex; gap: 10px; margin-top: 12px; align-items: center; flex-wrap: wrap;
}
.playlistEntriesSection {
margin-top: 18px;
display: flex; flex-direction: column; gap: 14px;
}
.playlistControlsRow {
display: flex; align-items: center; justify-content: space-between;
flex-wrap: wrap; gap: 12px;
}
.idModeBox {
display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; padding: 10px 14px;
}
.idModeLabel { color: var(--text-muted); font-size: 13px; }
.idModeBox label { color: var(--text); font-size: 14px; cursor: pointer; }
.zeroPadWrap { margin-left: 8px; color: var(--text-muted) !important; font-size: 13px; }
.playlistSummary { color: var(--text-muted); font-size: 13px; }
.playlistEntryList {
list-style: none; margin: 0; padding: 0;
display: flex; flex-direction: column; gap: 6px;
}
.playlistEntryRow {
display: grid;
grid-template-columns: 24px 28px 90px minmax(0, 1fr) 210px 60px 26px;
align-items: center; gap: 10px;
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; padding: 8px 10px;
}
.playlistEntryRow.dragGhost { opacity: 0.5; }
.dragHandle {
cursor: grab; color: var(--text-muted); font-size: 18px;
user-select: none; text-align: center;
}
.entryNum {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
color: var(--text-muted); font-size: 13px; text-align: right;
}
.entryThumb {
width: 90px; aspect-ratio: 16 / 9;
border-radius: 6px; overflow: hidden; position: relative;
background: var(--bg); border: 1px solid var(--border);
cursor: pointer;
}
.entryThumb::after {
content: '▶'; position: absolute; inset: 0;
display: flex; align-items: center; justify-content: center;
color: #fff; font-size: 18px; text-shadow: 0 1px 4px rgba(0,0,0,0.7);
opacity: 0; transition: opacity 120ms ease; pointer-events: none;
}
.entryThumb:hover::after { opacity: 1; }
.entryThumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entryThumbEmpty { opacity: 0.6; }
.entryFields {
display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.entryTitleInput {
background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
color: var(--text); padding: 5px 8px; font-size: 14px; width: 100%;
}
.entryIdRow {
display: flex; align-items: center; gap: 8px;
}
.entryIdInput {
background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
color: var(--text); padding: 4px 8px; font-size: 13px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
width: 240px; max-width: 100%;
}
.entryIdStatus { font-size: 12px; }
.entryDuration {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px; text-align: right;
}
.entryRemove {
background: transparent; border: 1px solid var(--border);
color: var(--text-muted); border-radius: 6px; cursor: pointer;
width: 28px; height: 28px; padding: 0; font-size: 14px;
}
.entryRemove:hover { color: #e57373; border-color: #e57373; }
/* 항목별 시작/종료 시간 입력 (제목 오른쪽 절반 공간) */
.entryTrim {
display: flex; flex-direction: column; gap: 4px;
}
.entryTrim label {
display: flex; align-items: center; gap: 6px;
font-size: 12px; color: var(--text-muted);
}
.entryTrim input {
flex: 1; min-width: 0;
background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
color: var(--text); padding: 3px 6px; font-size: 12px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* 일괄 시작/종료 + 적용/초기화 */
.bulkTrimBox {
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; padding: 10px 14px;
}
.bulkTrimBox label {
display: flex; align-items: center; gap: 6px;
color: var(--text); font-size: 13px;
}
.bulkTrimBox input {
width: 70px;
background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
color: var(--text); padding: 4px 8px; font-size: 13px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* YouTube 임베드 (미리보기 / 자르기 모달) */
.ytEmbedWrap {
position: relative; width: 100%; aspect-ratio: 16 / 9;
background: #000; border-radius: 8px; overflow: hidden;
}
.ytEmbedWrap iframe, .ytEmbedWrap > div {
position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.trimModal { width: min(900px, 94vw); gap: 12px; }
.trimModal .trimTimeline { background: var(--bg-alt); }
.playlistFooter {
display: flex; align-items: center; justify-content: space-between;
gap: 12px; flex-wrap: wrap; margin-top: 8px;
}
/* ─── 플레이리스트 다운로드 진행 화면 ─────────────────────────────── */
.playlistProgressSection {
margin-top: 18px;
display: flex; flex-direction: column; gap: 14px;
}
.progressHeader {
display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; padding: 12px 16px;
}
.progressHeader #progressSummary { font-size: 14px; color: var(--text); }
.progressHeader #progressOverall { flex: 1; min-width: 200px; height: 12px; }
.progressList { list-style: none; margin: 0; padding: 0;
display: flex; flex-direction: column; gap: 8px; }
.progressRow {
display: grid; grid-template-columns: 1fr 180px auto; align-items: center;
gap: 12px; background: var(--bg-card); border: 1px solid var(--border);
border-radius: 10px; padding: 10px 14px;
}
.progressName {
color: var(--text); font-size: 14px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.progressBar { width: 100%; height: 10px; }
.progressBar.progressBarError::-webkit-progress-value { background: #e5534b; }
.progressMsg { font-size: 12px; white-space: nowrap; text-align: right; }
.progressRowDone { border-color: #2ea043; }
.progressRowError { border-color: #e5534b; }
@media (max-width: 640px) {
.progressRow { grid-template-columns: 1fr; gap: 6px; }
.progressMsg { text-align: left; }
}