refactor: 将 Markdown 导入按钮移至侧边栏
生产环境部署 - BlogFlare 至 Cloudflare Pages / 构建与自动化上线 (push) Successful in 2m22s
生产环境部署 - BlogFlare 至 Cloudflare Pages / 构建与自动化上线 (push) Successful in 2m22s
This commit is contained in:
1 parent
c6b9a922a2
commit
1667c5ef9e
2 files changed
+10
-6
No files matched your search
@@ -208,11 +208,8 @@
|
||||
|
||||
<div class="admin-page-header">
|
||||
<h2>编辑</h2>
|
||||
<div style="display: flex; align-items: center; gap: 12px;">
|
||||
<button type="button" class="btn btn-secondary" onclick={() => fileInput?.click()}>📁 导入 Markdown</button>
|
||||
<a href="/admin/posts" class="btn btn-secondary">← 返回</a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" bind:this={fileInput} accept=".md,.markdown,.txt" style="display:none" onchange={handleImportMarkdown} />
|
||||
|
||||
{#if form?.error}
|
||||
@@ -379,6 +376,11 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-box">
|
||||
<h3>导入</h3>
|
||||
<button type="button" class="btn btn-secondary" style="width: 100%; text-align: center;" onclick={() => fileInput?.click()}>导入 Markdown</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -214,11 +214,8 @@
|
||||
|
||||
<div class="admin-page-header">
|
||||
<h2>新{$page.data.aliases?.post || '文章'}</h2>
|
||||
<div style="display: flex; align-items: center; gap: 12px;">
|
||||
<button type="button" class="btn btn-secondary" onclick={() => fileInput?.click()}>📁 导入 Markdown</button>
|
||||
<a href="/admin/posts" class="btn btn-secondary">← 返回</a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" bind:this={fileInput} accept=".md,.markdown,.txt" style="display:none" onchange={handleImportMarkdown} />
|
||||
|
||||
{#if form?.error}
|
||||
@@ -385,6 +382,11 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-box">
|
||||
<h3>导入</h3>
|
||||
<button type="button" class="btn btn-secondary" style="width: 100%; text-align: center;" onclick={() => fileInput?.click()}>导入 Markdown</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in new issue
Block a user