Files
AriWeb-Suite/modules/webmaker/public/site-admin.html
T

54 lines
7.0 KiB
HTML

<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>사이트 관리자</title>
<style>
/* 사이트 관리자 페이지 (v1.0.3) — 빌더와 별도로 운영 가능한 독립 페이지. ?embed=1 이면 빌더 관리 탭 안에 내장되어 로그인 패널을 생략한다. */
:root { --bg: #f4f5f7; --panel: #fff; --line: #e3e6ea; --text: #1f2933; --muted: #6b7684; --accent: #2f6fed; --ok: #1a8f5a; --warn: #c2410c; }
* { box-sizing: border-box; } body { margin: 0; font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }
header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #0f172a; color: #fff; } header h1 { font-size: 16px; margin: 0; } header .muted { color: #94a3b8; font-size: 12px; } header .spacer { flex: 1; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 16px 0; } .tabs button { border: 1px solid var(--line); background: #fff; border-radius: 8px 8px 0 0; padding: 7px 12px; cursor: pointer; } .tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); } .tabs button .n { font-size: 11px; opacity: .8; margin-left: 4px; }
main { padding: 12px 16px 40px; } .card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
h2 { font-size: 15px; margin: 0 0 10px; } h3 { font-size: 13px; margin: 12px 0 6px; } .muted { color: var(--muted); } .small { font-size: 12px; }
input, select, textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; margin: 3px 0 8px; } textarea { resize: vertical; } label { display: block; font-size: 12px; color: var(--muted); }
button, .btn { font: inherit; padding: 7px 12px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; } button.primary { background: var(--accent); color: #fff; border-color: var(--accent); } button.danger { color: #b91c1c; } button.small { padding: 3px 8px; font-size: 12px; } button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .row > * { flex: 1; min-width: 120px; } .row > button { flex: none; }
table { width: 100%; border-collapse: collapse; font-size: 13px; } th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; } th { color: var(--muted); font-weight: 600; font-size: 12px; } td.act { white-space: nowrap; } td .wrap { max-width: 360px; white-space: pre-wrap; word-break: break-word; }
.table-wrap { overflow: auto; } .pill { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #e5e7eb; } .pill.ok { background: #d1fae5; color: #065f46; } .pill.warn { background: #fef3c7; color: #92400e; } .pill.off { background: #fee2e2; color: #991b1b; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: #d1d5db; position: relative; cursor: pointer; border: 0; padding: 0; flex: none; } .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; } .switch.on { background: var(--accent); } .switch.on::after { left: 18px; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; } .mod { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; grid-template-columns: 1fr auto; gap: 6px; } .mod .d { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.login { max-width: 360px; margin: 60px auto; } .hidden { display: none !important; } .msg { font-size: 12px; color: var(--muted); } .msg.err { color: #b91c1c; } .msg.ok { color: var(--ok); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 10px; align-items: center; } .kv label { margin: 0; }
.q-row { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 6px; display: grid; grid-template-columns: 2fr 1fr auto auto; gap: 6px; align-items: start; } .q-row textarea { grid-column: 1 / -1; }
dialog { border: 1px solid var(--line); border-radius: 10px; max-width: 640px; width: 95vw; } dialog::backdrop { background: rgba(0,0,0,.4); }
.sa-url { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 16px; background: #1e293b; color: #cbd5e1; font-size: 12px; } .sa-url code { color: #e2e8f0; background: transparent; word-break: break-all; } .sa-url .muted { color: #94a3b8; }
/* v1.3.0 메일 탭 */
.mail-banner { padding: 8px 10px; border-radius: 8px; background: #eef2ff; color: #3730a3; font-size: 13px; } .mail-banner.ok { background: #d1fae5; color: #065f46; } .mail-banner.warn { background: #fef3c7; color: #92400e; } .mail-banner.off { background: #fee2e2; color: #991b1b; }
.mail-state { font-weight: 700; margin-bottom: 6px; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; } .switch:disabled { opacity: .4; cursor: not-allowed; }
/* v1.3.10 번역문 줄바꿈 */
html, body { max-width: 100%; overflow-x: hidden; } main, .card, .tabs { min-width: 0; max-width: 100%; } .tabs button, button { white-space: normal; } td, th, p, label { overflow-wrap: anywhere; } .table-wrap { max-width: 100%; overflow-x: auto; }
</style>
<link rel="stylesheet" href="/theme.css"><!-- v1.2.0: 관리자 콘솔에서 정한 화면 색상·외형 -->
</head>
<body>
<header><h1>사이트 관리자</h1><span class="muted" id="hSite"></span><span class="spacer"></span><span class="lang-switch small" style="display:none"><select id="langSelect" title="Language" aria-label="Language"></select></span><span class="muted small" id="hWho"></span><button type="button" class="small" id="btnLogout" hidden>로그아웃</button></header>
<div class="login card hidden" id="loginBox">
<h2>사이트 관리자 로그인</h2>
<p class="muted small">사이트 소유자가 빌더에 로그인되어 있으면 자동으로 들어갑니다. 아니면 사이트 관리자 계정(빌더 관리 화면에서 생성)으로 로그인하세요.</p>
<label>아이디 또는 이메일<input id="lId" autocomplete="username"></label>
<label>비밀번호<input id="lPw" type="password" autocomplete="current-password"></label>
<button type="button" class="primary" id="lGo">로그인</button>
<p class="msg" id="lMsg"></p>
</div>
<div id="app" class="hidden">
<nav class="tabs" id="tabs"></nav>
<main id="main"></main>
</div>
<dialog id="dlg"><form method="dialog" id="dlgForm"><h2 id="dlgTitle"></h2><div id="dlgBody"></div><div class="row"><button type="button" class="primary" id="dlgSave">저장</button><button type="button" id="dlgCancel">취소</button></div><p class="msg" id="dlgMsg"></p></form></dialog>
<script src="/numfmt.js"></script><script src="/i18n.js"></script><script src="/pwrule.js"></script><!-- v1.3.10: 사이트 관리자 페이지도 화면 언어로 (그전에는 런타임이 없어 번역되지 않았음) -->
<script src="/site-admin.js"></script>
</body>
</html>