Files
rental-contract-pdf/public/admin.html
JianMiau 89a4f891c2 新增管理員頁面、Word PDF 預覽、租賃日期欄位、SSL docker-compose
- 新增 /admin.html:上傳/刪除範本,HTTP Basic Auth 保護
- Word 預覽改用 LibreOffice PDF 轉換,帶入表單參數即時顯示
- 新增租賃開始/結束年月日、租期年數佔位符支援
- 預覽 loading 遮罩,修正 hidden 被 CSS display:flex 覆蓋的問題
- 左右欄 UI 重構,右欄固定顯示 Word 預覽
- 新增 docker-compose.yml + nginx SSL reverse proxy
- admin 密碼改由 ADMIN_PASSWORD 環境變數設定

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 23:02:33 +08:00

63 lines
2.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="zh-Hant">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>管理員 — 租屋契約範本</title>
<link rel="stylesheet" href="/styles.css">
</head>
<body>
<main class="app-shell">
<header class="topbar">
<div>
<p class="eyebrow">Admin</p>
<h1>範本管理</h1>
</div>
<a href="/" class="status-pill" style="text-decoration:none">← 返回</a>
</header>
<div id="loginSection">
<div class="tool-panel" style="max-width:360px">
<div>
<p class="eyebrow">管理員登入</p>
<h2>輸入密碼</h2>
</div>
<label class="field">
<span>密碼</span>
<input id="passwordInput" type="password" autocomplete="current-password">
</label>
<button id="loginButton" class="primary-button">登入</button>
<p id="loginError" class="message"></p>
</div>
</div>
<div id="adminSection" hidden>
<section class="workspace" style="grid-template-columns: 1fr 1fr">
<div class="tool-panel">
<div>
<p class="eyebrow">上傳範本</p>
<h2>新增 / 覆蓋</h2>
</div>
<label class="field">
<span>選擇檔案(.docx / .doc</span>
<input id="uploadInput" type="file" accept=".doc,.docx">
</label>
<button id="uploadButton" class="primary-button">上傳</button>
<p id="uploadMessage" class="message"></p>
</div>
<div class="tool-panel">
<div>
<p class="eyebrow">現有範本</p>
<h2>刪除</h2>
</div>
<div id="templateList"><p class="message">載入中…</p></div>
</div>
</section>
</div>
</main>
<script src="/admin.js" defer></script>
</body>
</html>