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,7 +241,10 @@
|
|||||||
|
|
||||||
<div class="admin-page-header">
|
<div class="admin-page-header">
|
||||||
<h2>编辑</h2>
|
<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>
|
<a href="/admin/posts" class="btn btn-secondary">← 返回</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="file" bind:this={fileInput} accept=".md,.markdown,.txt" style="display:none" onchange={handleImportMarkdown} />
|
<input type="file" bind:this={fileInput} accept=".md,.markdown,.txt" style="display:none" onchange={handleImportMarkdown} />
|
||||||
|
|
||||||
@@ -339,7 +342,7 @@
|
|||||||
<button type="submit" class="btn btn-primary submit-btn">保存</button>
|
<button type="submit" class="btn btn-primary submit-btn">保存</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FeaturedImagePicker bind:cover />
|
<FeaturedImagePicker bind:cover adaptiveHeight previewable />
|
||||||
|
|
||||||
<div class="sidebar-box">
|
<div class="sidebar-box">
|
||||||
<h3>别名 *</h3>
|
<h3>别名 *</h3>
|
||||||
@@ -429,10 +432,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -453,6 +452,12 @@
|
|||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
@@ -556,7 +561,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 30px;
|
gap: 16px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,7 +574,7 @@
|
|||||||
position: static;
|
position: static;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 20px;
|
gap: 16px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,7 +247,10 @@
|
|||||||
|
|
||||||
<div class="admin-page-header">
|
<div class="admin-page-header">
|
||||||
<h2>新{$page.data.aliases?.post || '文章'}</h2>
|
<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>
|
<a href="/admin/posts" class="btn btn-secondary">← 返回</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="file" bind:this={fileInput} accept=".md,.markdown,.txt" style="display:none" onchange={handleImportMarkdown} />
|
<input type="file" bind:this={fileInput} accept=".md,.markdown,.txt" style="display:none" onchange={handleImportMarkdown} />
|
||||||
|
|
||||||
@@ -345,7 +348,7 @@
|
|||||||
<button type="submit" class="btn btn-primary publish-btn">发布{$page.data.aliases?.post || '文章'}</button>
|
<button type="submit" class="btn btn-primary publish-btn">发布{$page.data.aliases?.post || '文章'}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FeaturedImagePicker bind:cover />
|
<FeaturedImagePicker bind:cover adaptiveHeight previewable />
|
||||||
|
|
||||||
<div class="sidebar-box">
|
<div class="sidebar-box">
|
||||||
<h3>别名 *</h3>
|
<h3>别名 *</h3>
|
||||||
@@ -435,10 +438,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -459,6 +458,12 @@
|
|||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
@@ -561,7 +566,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 30px;
|
gap: 16px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -574,7 +579,7 @@
|
|||||||
position: static;
|
position: static;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 20px;
|
gap: 16px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user