2026-05-15 12:04:54 +08:00
|
|
|
<!doctype html>
|
|
|
|
|
<html lang="zh-Hant">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
<title>租屋契約 PDF 產生器</title>
|
|
|
|
|
<link rel="stylesheet" href="/styles.css">
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<main class="app-shell">
|
|
|
|
|
<header class="topbar">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="eyebrow">Word to PDF</p>
|
|
|
|
|
<h1>租屋契約 PDF 產生器</h1>
|
|
|
|
|
</div>
|
2026-05-15 23:02:33 +08:00
|
|
|
<div style="display:flex;gap:10px;align-items:center">
|
|
|
|
|
<a href="/admin.html" class="status-pill" style="text-decoration:none">管理員</a>
|
|
|
|
|
<span id="connectionStatus" class="status-pill">連線中</span>
|
|
|
|
|
</div>
|
2026-05-15 12:04:54 +08:00
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
<section class="workspace" aria-label="租屋契約資料">
|
2026-05-15 23:02:33 +08:00
|
|
|
<div class="left-col">
|
|
|
|
|
<form id="contractForm">
|
|
|
|
|
<div class="tool-panel">
|
|
|
|
|
<label class="field">
|
|
|
|
|
<span>Word 範本</span>
|
|
|
|
|
<select id="template" name="template" required></select>
|
|
|
|
|
</label>
|
2026-05-15 12:04:54 +08:00
|
|
|
|
2026-05-15 23:02:33 +08:00
|
|
|
<button id="submitButton" class="primary-button" type="submit">
|
|
|
|
|
產生 PDF
|
|
|
|
|
</button>
|
2026-05-15 12:04:54 +08:00
|
|
|
|
2026-05-15 23:02:33 +08:00
|
|
|
<div class="result-inline" aria-label="PDF 結果">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="eyebrow">PDF</p>
|
|
|
|
|
<h2 id="resultTitle">尚未產生</h2>
|
|
|
|
|
<p id="message" class="message">請輸入資料後產生 PDF。</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="result-actions">
|
|
|
|
|
<button id="downloadButton" class="secondary-button" type="button" disabled>
|
|
|
|
|
下載 PDF
|
|
|
|
|
</button>
|
|
|
|
|
<button id="shareButton" class="secondary-button" type="button" disabled>
|
|
|
|
|
分享 PDF
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-15 12:04:54 +08:00
|
|
|
|
2026-05-15 23:02:33 +08:00
|
|
|
<div class="tool-panel fields-panel">
|
|
|
|
|
<div class="field-grid">
|
|
|
|
|
<label class="field">
|
|
|
|
|
<span>每月租金</span>
|
|
|
|
|
<input name="monthlyRent" type="number" inputmode="numeric" min="1" step="1" value="8000" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label class="field">
|
|
|
|
|
<span>繳款日期</span>
|
|
|
|
|
<input name="paymentDay" type="number" inputmode="numeric" min="1" max="31" step="1" value="18" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label class="field">
|
|
|
|
|
<span>保證金</span>
|
|
|
|
|
<input name="deposit" type="number" inputmode="numeric" min="1" step="1" value="16000" required>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
2026-05-15 12:04:54 +08:00
|
|
|
|
2026-05-15 23:02:33 +08:00
|
|
|
<div class="field-grid field-grid--2">
|
|
|
|
|
<label class="field">
|
|
|
|
|
<span>租賃開始日</span>
|
|
|
|
|
<input id="leaseStart" name="leaseStart" type="date" required>
|
|
|
|
|
</label>
|
|
|
|
|
<label class="field">
|
|
|
|
|
<span>租賃結束日</span>
|
|
|
|
|
<input id="leaseEnd" name="leaseEnd" type="date" required>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
2026-05-15 12:04:54 +08:00
|
|
|
|
2026-05-15 23:02:33 +08:00
|
|
|
<div class="right-col">
|
|
|
|
|
<div class="preview-panel">
|
|
|
|
|
<p class="eyebrow">Word 預覽</p>
|
|
|
|
|
<div class="preview-wrap">
|
|
|
|
|
<iframe id="previewFrame" src="about:blank" title="Word 範本預覽"></iframe>
|
|
|
|
|
<div id="previewLoading" class="preview-loading" hidden>
|
|
|
|
|
<div class="preview-spinner"></div>
|
|
|
|
|
<span>載入中</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-15 12:04:54 +08:00
|
|
|
</div>
|
2026-05-15 23:02:33 +08:00
|
|
|
</div>
|
2026-05-15 12:04:54 +08:00
|
|
|
</section>
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
<script src="/app.js" defer></script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|