|
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | 6 | <title>站点设置</title> |
7 | | - <link rel="stylesheet" href="../assets/css/common.css?v=20260512"> |
8 | | - <link rel="stylesheet" href="../assets/css/admin.css?v=20260512"> |
| 7 | + <link rel="stylesheet" href="../assets/css/common.css?v=20260513"> |
| 8 | + <link rel="stylesheet" href="../assets/css/admin.css?v=20260513"> |
9 | 9 | <script>(function(){var t=localStorage.getItem('blog_theme')||'auto';var d=t==='auto'?window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light':t;document.documentElement.setAttribute('data-theme',d);document.documentElement.dataset.themeChoice=t;})();</script> |
10 | 10 | </head> |
11 | 11 | <body class="admin-page"> |
12 | | - <header class="nav"> |
13 | | - <div class="nav-inner"> |
14 | | - <a class="nav-logo" href="../"> |
15 | | - <svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.18L19.82 8 12 11.82 4.18 8 12 4.18zM4 9.27l7 3.5v7.46l-7-3.5V9.27zm9 10.96v-7.46l7-3.5v7.46l-7 3.5z"/></svg> |
16 | | - <span>站点设置</span> |
17 | | - </a> |
18 | | - <a class="nav-link" href="./">文章</a> |
19 | | - <a class="nav-link active" href="settings.html">设置</a> |
20 | | - <a class="nav-link" href="diagnose.html">诊断</a> |
21 | | - <div class="nav-spacer"></div> |
22 | | - <button class="btn btn-primary" id="saveTop">保存设置</button> |
23 | | - </div> |
24 | | - </header> |
| 12 | + <div id="app"></div> |
25 | 13 |
|
26 | | - <main class="admin-layout"> |
27 | | - <div class="admin-toolbar"> |
28 | | - <h2>站点基础配置</h2> |
29 | | - <span class="editor-status" id="status">未保存</span> |
30 | | - <button class="btn btn-secondary" id="resetBtn">恢复当前配置</button> |
31 | | - <button class="btn btn-primary" id="saveBtn">保存设置</button> |
32 | | - </div> |
33 | | - |
34 | | - <form id="settingsForm" class="settings-form"> |
35 | | - <section class="settings-card"> |
36 | | - <h3>站点信息</h3> |
37 | | - <div class="settings-grid"> |
38 | | - <label>站点名称 <input name="site.title" placeholder="我的博客"></label> |
39 | | - <label>副标题 <input name="site.subtitle" placeholder="记录想法与代码"></label> |
40 | | - <label>作者名 <input name="site.author" placeholder="作者"></label> |
41 | | - <label>站点 URL <input name="site.url" placeholder="https://user.github.io/repo"></label> |
42 | | - <label class="span-2">描述 <textarea name="site.description" rows="3" placeholder="一句话介绍你的博客"></textarea></label> |
43 | | - <label>头像 URL <input name="site.avatar" placeholder="https://..."></label> |
44 | | - <label>Logo URL <input name="site.logo" placeholder="可选,顶部导航图标"></label> |
45 | | - <label>Favicon URL <input name="site.favicon" placeholder="可选,浏览器标签页图标"></label> |
46 | | - <label>语言 <input name="site.locale" placeholder="zh-CN"></label> |
47 | | - </div> |
48 | | - </section> |
49 | | - |
50 | | - <section class="settings-card"> |
51 | | - <h3>仓库与权限</h3> |
52 | | - <p class="settings-help">这里决定后台保存到哪个 GitHub 仓库。修改仓库名后,本次保存仍会写到当前仓库,下一次刷新后新配置才生效。</p> |
53 | | - <div class="settings-grid"> |
54 | | - <label>owner <input name="repo.owner" placeholder="flymysql"></label> |
55 | | - <label>repo name <input name="repo.name" placeholder="gitblog"></label> |
56 | | - <label>branch <input name="repo.branch" placeholder="main"></label> |
57 | | - <label class="span-2">后台白名单(逗号或换行分隔) <textarea name="authorizedUsers" rows="3" placeholder="flymysql"></textarea></label> |
58 | | - </div> |
59 | | - </section> |
60 | | - |
61 | | - <section class="settings-card"> |
62 | | - <h3>导航与社交链接</h3> |
63 | | - <div class="settings-grid"> |
64 | | - <label>GitHub <input name="site.social.github" placeholder="https://github.com/xxx"></label> |
65 | | - <label>Twitter / X <input name="site.social.twitter" placeholder="https://x.com/xxx"></label> |
66 | | - <label>Email <input name="site.social.email" placeholder="name@example.com"></label> |
67 | | - <label>RSS <input name="site.social.rss" placeholder="rss.xml"></label> |
68 | | - <label class="span-2">顶部导航(JSON 数组) <textarea name="site.nav" rows="8" spellcheck="false"></textarea></label> |
69 | | - </div> |
70 | | - </section> |
71 | | - |
72 | | - <section class="settings-card"> |
73 | | - <h3>评论(giscus)</h3> |
74 | | - <p class="settings-help">需要先在 GitHub 仓库启用 Discussions,然后到 giscus.app 生成 repoId 和 categoryId。</p> |
75 | | - <div class="settings-grid"> |
76 | | - <label class="settings-check"><input type="checkbox" name="giscus.enabled"> 启用 giscus 评论</label> |
77 | | - <label>repo <input name="giscus.repo" placeholder="owner/repo"></label> |
78 | | - <label>repoId <input name="giscus.repoId"></label> |
79 | | - <label>category <input name="giscus.category"></label> |
80 | | - <label>categoryId <input name="giscus.categoryId"></label> |
81 | | - <label>mapping <input name="giscus.mapping" placeholder="pathname"></label> |
82 | | - <label>language <input name="giscus.lang" placeholder="zh-CN"></label> |
83 | | - </div> |
84 | | - </section> |
85 | | - |
86 | | - <section class="settings-card"> |
87 | | - <h3>路径与主题</h3> |
88 | | - <div class="settings-grid"> |
89 | | - <label>文章目录 <input name="paths.posts" placeholder="posts"></label> |
90 | | - <label>索引文件 <input name="paths.index" placeholder="data/posts.json"></label> |
91 | | - <label>上传目录 <input name="paths.uploads" placeholder="assets/uploads"></label> |
92 | | - <label>默认主题 |
93 | | - <select name="theme.default"> |
94 | | - <option value="auto">跟随系统</option> |
95 | | - <option value="light">浅色</option> |
96 | | - <option value="dark">深色</option> |
97 | | - </select> |
98 | | - </label> |
99 | | - </div> |
100 | | - </section> |
101 | | - </form> |
102 | | - </main> |
103 | | - |
104 | | - <script type="module" src="../assets/js/settings.js?v=20260512"></script> |
| 14 | + <script type="module" src="../assets/js/settings.js?v=20260513"></script> |
105 | 15 | </body> |
106 | 16 | </html> |
0 commit comments