feat: 新增发布日期自选、站点 Logo、回收站清空等十项改进
- 编辑页标题改 filled 变体;标签改 tags 选择器(可勾选既有/输入新建) - 笔记发布日期可自选(schema v2 新增 published_at 并回填),前台展示发布日期 - 登录页移除「请输入管理密码以继续」「连续失败将被暂时锁定」文案 - 站点设置每页条数收敛为 10/20/30/50 选择器,后端白名单同源校验 - 站点设置两卡片宽屏左右/窄屏上下;修改密码按钮改常规大小 - 后台各页顶栏固定高度,切换页面不再抖动 - 站点 Logo:settings 新增 site_logo(站内路径),gc/孤儿清单豁免 Logo 图片, 博客 header 站点名前展示,设置页支持上传/更换/清除 - 回收站右上角一键清空(DELETE /api/admin/trash,含确认弹窗) - pn init 写入 Markdown 语法示例文档(slug welcome,公开)与程序生成的示例图片
This commit is contained in:
+64
-71
@@ -408,6 +408,9 @@ button.pn-login-back:hover {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.pn-site-wordmark {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-family: var(--font-serif);
|
||||
font-size: 21px;
|
||||
line-height: 1;
|
||||
@@ -419,6 +422,14 @@ button.pn-login-back:hover {
|
||||
.pn-site-wordmark:hover {
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
/* 站点 Logo(站点设置自定义,留空不渲染) */
|
||||
.pn-site-logo {
|
||||
flex: none;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
object-fit: cover;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.pn-site-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1184,19 +1195,6 @@ button.pn-note-back:hover {
|
||||
font-weight: 600;
|
||||
color: var(--foreground);
|
||||
}
|
||||
.pn-login-sub {
|
||||
margin: 0 0 20px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
.pn-login-hint {
|
||||
margin: 16px 0 0;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
/* 登录卡片(antd Card):内边距由本类承接(body padding 已置 0) */
|
||||
.pn-login-card {
|
||||
box-sizing: border-box;
|
||||
@@ -1438,6 +1436,9 @@ button.pn-note-back:hover {
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 14px 24px;
|
||||
/* 各页 actions 高度不一(有的页无按钮):固定高度,切换页面不抖动 */
|
||||
min-height: 62px;
|
||||
box-sizing: border-box;
|
||||
background: var(--background);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
@@ -1517,6 +1518,7 @@ button.pn-note-back:hover {
|
||||
}
|
||||
.pn-admin-topbar {
|
||||
padding: 12px 16px;
|
||||
min-height: 58px;
|
||||
}
|
||||
.pn-admin-topbar h1 {
|
||||
font-size: 16px;
|
||||
@@ -1721,19 +1723,16 @@ button.pn-note-back:hover {
|
||||
align-items: start;
|
||||
}
|
||||
/* 编辑卡与发布卡的 Card 基础样式由 ui/card 承接(gap-0/p-6 等) */
|
||||
/* 提权至 (0,1,1)+:压过 antd .ant-input 的同名字段(cssinjs 无 layer 且后注入) */
|
||||
/* 提权至 (0,1,1)+:压过 antd .ant-input 的同名字段(cssinjs 无 layer 且后注入)。
|
||||
variant=filled:底色/圆角/内边距交给 antd,这里只覆盖字体排版 */
|
||||
input.pn-ae-title-input {
|
||||
width: 100%;
|
||||
margin: 0 0 14px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font-family: var(--font-serif);
|
||||
font-size: 30px;
|
||||
line-height: 1.3;
|
||||
letter-spacing: var(--tracking-tight);
|
||||
color: var(--foreground);
|
||||
outline: none;
|
||||
}
|
||||
input.pn-ae-title-input::placeholder {
|
||||
color: var(--muted-foreground);
|
||||
@@ -1772,58 +1771,10 @@ input.pn-ae-title-input::placeholder {
|
||||
gap: 8px;
|
||||
margin-left: auto;
|
||||
}
|
||||
.pn-ae-tag-x {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
color: var(--muted-foreground);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
.pn-ae-tag-x:hover {
|
||||
background: var(--muted);
|
||||
color: var(--foreground);
|
||||
}
|
||||
.pn-ae-tag-x svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
button.pn-ae-add-tag {
|
||||
height: 26px;
|
||||
gap: 6px;
|
||||
padding: 0 10px;
|
||||
border: 1px dashed var(--border-strong);
|
||||
color: var(--muted-foreground);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
button.pn-ae-add-tag:hover {
|
||||
background: var(--muted);
|
||||
color: var(--foreground);
|
||||
}
|
||||
button.pn-ae-add-tag svg {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
input.pn-ae-tag-input {
|
||||
height: 26px;
|
||||
width: 110px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid var(--input);
|
||||
border-radius: 999px;
|
||||
background: var(--card);
|
||||
color: var(--foreground);
|
||||
font-size: 12px;
|
||||
outline: none;
|
||||
}
|
||||
input.pn-ae-tag-input:focus {
|
||||
border-color: var(--ring);
|
||||
/* 标签选择器(mode=tags:既可勾选既有标签,也可输入新建) */
|
||||
.pn-ae-tags-select {
|
||||
min-width: 220px;
|
||||
max-width: 100%;
|
||||
}
|
||||
.pn-ae-toolbar {
|
||||
display: flex;
|
||||
@@ -1892,6 +1843,7 @@ button.pn-ae-tool svg {
|
||||
}
|
||||
.pn-ae-plabel {
|
||||
color: var(--muted-foreground);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.pn-ae-pvalue {
|
||||
display: inline-flex;
|
||||
@@ -1907,6 +1859,15 @@ button.pn-ae-tool svg {
|
||||
height: 14px;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
/* 发布日期选择器(size=small) */
|
||||
.pn-ae-datepicker {
|
||||
flex: none;
|
||||
width: 168px;
|
||||
}
|
||||
.pn-ae-datepicker .ant-input {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12px;
|
||||
}
|
||||
.pn-ae-mono {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12px;
|
||||
@@ -1992,7 +1953,39 @@ button.pn-ae-tool svg {
|
||||
站点设置(站点设置.html)
|
||||
============================================================ */
|
||||
.pn-as-content {
|
||||
max-width: 640px;
|
||||
max-width: 1100px;
|
||||
}
|
||||
/* 宽屏两卡左右分布,窄屏回落上下堆叠(.pn-admin-content 的 flex 在此处被覆盖为 grid) */
|
||||
@media (min-width: 1100px) {
|
||||
.pn-as-content {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
|
||||
align-items: start;
|
||||
}
|
||||
}
|
||||
.pn-as-logo-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
.pn-as-logo-preview {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
object-fit: cover;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border);
|
||||
background: var(--card);
|
||||
}
|
||||
.pn-as-logo-empty {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px dashed var(--border-strong);
|
||||
font-size: 11px;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
.pn-as-card-head {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user