feat: 优化文章编辑页布局,将 Markdown 导入功能移至页头并启用特色图预览
生产环境部署 - BlogFlare 至 Cloudflare Pages / 构建与自动化上线 (push) Successful in 55s
生产环境部署 - BlogFlare 至 Cloudflare Pages / 构建与自动化上线 (push) Successful in 55s
This commit is contained in:
1 parent
edcf251945
commit
0afd680867
2 files changed
+24
-14
No files matched your search
@@ -241,8 +241,11 @@
|
||||
|
||||
<div class="admin-page-header">
|
||||
<h2>编辑</h2>
|
||||
<div class="header-actions">
|
||||
<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}
|
||||
@@ -339,7 +342,7 @@
|
||||
<button type="submit" class="btn btn-primary submit-btn">保存</button>
|
||||
</div>
|
||||
|
||||
<FeaturedImagePicker bind:cover />
|
||||
<FeaturedImagePicker bind:cover adaptiveHeight previewable />
|
||||
|
||||
<div class="sidebar-box">
|
||||
<h3>别名 *</h3>
|
||||
@@ -429,10 +432,6 @@
|
||||
</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>
|
||||
@@ -453,6 +452,12 @@
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
@@ -556,7 +561,7 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 30px;
|
||||
gap: 16px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@@ -569,7 +574,7 @@
|
||||
position: static;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
gap: 16px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,8 +247,11 @@
|
||||
|
||||
<div class="admin-page-header">
|
||||
<h2>新{$page.data.aliases?.post || '文章'}</h2>
|
||||
<div class="header-actions">
|
||||
<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}
|
||||
@@ -345,7 +348,7 @@
|
||||
<button type="submit" class="btn btn-primary publish-btn">发布{$page.data.aliases?.post || '文章'}</button>
|
||||
</div>
|
||||
|
||||
<FeaturedImagePicker bind:cover />
|
||||
<FeaturedImagePicker bind:cover adaptiveHeight previewable />
|
||||
|
||||
<div class="sidebar-box">
|
||||
<h3>别名 *</h3>
|
||||
@@ -435,10 +438,6 @@
|
||||
</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>
|
||||
@@ -459,6 +458,12 @@
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
@@ -561,7 +566,7 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 30px;
|
||||
gap: 16px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@@ -574,7 +579,7 @@
|
||||
position: static;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
gap: 16px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user