后台单页和公告改为正文优先编辑,保存与发布分开。
列表按列对照真实路径和状态,避免把 /p/ 前缀和发布操作混在一起。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4219,6 +4219,437 @@ a.j13-mention-token:hover {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* 单页管理:列表与编辑各自限宽,不套用设置页 1120px */
|
||||
.admin-canvas:has(.admin-doc-page) {
|
||||
background: var(--bg);
|
||||
}
|
||||
.admin-doc-page {
|
||||
width: 100%;
|
||||
margin-inline: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
.admin-doc-list {
|
||||
max-width: 1240px;
|
||||
}
|
||||
.admin-doc-editor {
|
||||
max-width: 1440px;
|
||||
container-type: inline-size;
|
||||
container-name: doc-editor;
|
||||
}
|
||||
.admin-doc-head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem 1rem;
|
||||
margin-bottom: 1.25rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.admin-doc-back {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
min-height: 2rem;
|
||||
font-size: 13px;
|
||||
color: var(--ink-2);
|
||||
text-decoration: none;
|
||||
}
|
||||
.admin-doc-back:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
.admin-doc-back:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
.admin-doc-head-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.15rem;
|
||||
}
|
||||
.admin-doc-head-title h1 {
|
||||
margin: 0;
|
||||
font-size: 22px;
|
||||
line-height: 1.25;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.02em;
|
||||
color: var(--ink);
|
||||
}
|
||||
.admin-doc-split {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 1.25rem;
|
||||
align-items: start;
|
||||
}
|
||||
.admin-doc-main {
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
.admin-doc-label {
|
||||
display: block;
|
||||
margin: 0 0 0.4rem;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
color: var(--ink-2);
|
||||
}
|
||||
.admin-doc-hint {
|
||||
margin: 0.35rem 0 0;
|
||||
font-size: 12.5px;
|
||||
line-height: 1.5;
|
||||
color: var(--ink-3);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.admin-doc-md .j13-md-editor:not(.is-fullscreen) {
|
||||
height: clamp(16rem, calc(100dvh - 22rem), 40rem);
|
||||
min-height: 0;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 12px;
|
||||
padding: 0.35rem 0.85rem 0.15rem;
|
||||
background: var(--panel);
|
||||
}
|
||||
.admin-doc-md .j13-md-textarea,
|
||||
.admin-doc-md .j13-md-preview {
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.admin-doc-rail {
|
||||
min-width: 0;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 12px;
|
||||
background: var(--panel);
|
||||
padding: 0.85rem 0.9rem 1rem;
|
||||
}
|
||||
.admin-doc-rail > summary {
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: 650;
|
||||
color: var(--ink);
|
||||
list-style: none;
|
||||
min-height: 2.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.admin-doc-rail > summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
.admin-doc-rail-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding-top: 0.35rem;
|
||||
}
|
||||
.admin-doc-field {
|
||||
min-width: 0;
|
||||
}
|
||||
.admin-doc-slug {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 2.5rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.7rem;
|
||||
background: var(--panel);
|
||||
overflow: hidden;
|
||||
}
|
||||
.admin-doc-slug:focus-within {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--accent-soft);
|
||||
}
|
||||
.admin-doc-slug.is-invalid {
|
||||
border-color: var(--danger);
|
||||
}
|
||||
.admin-doc-slug-prefix {
|
||||
flex-shrink: 0;
|
||||
padding-left: 0.75rem;
|
||||
font-size: 14px;
|
||||
color: var(--ink-3);
|
||||
font-family: var(--font-mono, ui-monospace, monospace);
|
||||
}
|
||||
.admin-doc-slug-input {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
height: 2.5rem;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
padding: 0 0.75rem 0 0.15rem;
|
||||
font-size: 14px;
|
||||
color: var(--ink);
|
||||
font-family: var(--font-mono, ui-monospace, monospace);
|
||||
}
|
||||
.admin-doc-slug-input:focus {
|
||||
outline: none;
|
||||
}
|
||||
.admin-doc-copy {
|
||||
margin-top: 0.55rem;
|
||||
min-height: 2.25rem;
|
||||
}
|
||||
.admin-doc-switchline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
min-height: 2.25rem;
|
||||
font-size: 14px;
|
||||
color: var(--ink);
|
||||
}
|
||||
.admin-doc-colors {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.45rem;
|
||||
}
|
||||
.admin-doc-colors .j13-anno-dot {
|
||||
width: 2.25rem;
|
||||
height: 2.25rem;
|
||||
}
|
||||
.admin-doc-number {
|
||||
width: 7.5rem;
|
||||
height: 2.5rem;
|
||||
padding: 0 0.75rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.7rem;
|
||||
background: var(--panel);
|
||||
color: var(--ink);
|
||||
font-size: 14px;
|
||||
}
|
||||
.admin-doc-number:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--accent-soft);
|
||||
}
|
||||
.admin-doc-actions {
|
||||
min-width: 0;
|
||||
}
|
||||
.admin-doc-actions-btns {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.6rem 0.75rem;
|
||||
}
|
||||
.admin-doc-actions .btn {
|
||||
min-height: 2.5rem;
|
||||
}
|
||||
.admin-doc-status {
|
||||
margin: 0;
|
||||
font-size: 12.5px;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.admin-doc-status.is-error {
|
||||
color: var(--danger);
|
||||
}
|
||||
.admin-doc-table-wrap {
|
||||
min-width: 0;
|
||||
}
|
||||
.admin-doc-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 14px;
|
||||
color: var(--ink);
|
||||
}
|
||||
.admin-doc-table th {
|
||||
text-align: left;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--ink-3);
|
||||
padding: 0.55rem 0.85rem;
|
||||
border-bottom: 1px solid var(--line);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.admin-doc-table td {
|
||||
padding: 0.75rem 0.85rem;
|
||||
border-bottom: 1px solid var(--line);
|
||||
vertical-align: top;
|
||||
font-size: 13.5px;
|
||||
color: var(--ink-2);
|
||||
}
|
||||
.admin-doc-table tr:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.admin-doc-title {
|
||||
display: inline;
|
||||
font-size: 14.5px;
|
||||
font-weight: 650;
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.admin-doc-title:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
.admin-doc-title:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.admin-doc-path {
|
||||
margin: 0.2rem 0 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
.admin-doc-path code {
|
||||
font-size: 12px;
|
||||
color: var(--ink-3);
|
||||
font-family: var(--font-mono, ui-monospace, monospace);
|
||||
}
|
||||
.admin-doc-excerpt {
|
||||
margin: 0.25rem 0 0;
|
||||
font-size: 12.5px;
|
||||
line-height: 1.45;
|
||||
color: var(--ink-3);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.admin-doc-row-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.15rem;
|
||||
}
|
||||
.admin-doc-textbtn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.25rem;
|
||||
min-height: 2.25rem;
|
||||
min-width: 2.25rem;
|
||||
padding: 0 0.55rem;
|
||||
border: 0;
|
||||
border-radius: 0.55rem;
|
||||
background: transparent;
|
||||
color: var(--ink-2);
|
||||
font-size: 13.5px;
|
||||
font-weight: 550;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
}
|
||||
.admin-doc-textbtn:hover {
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent);
|
||||
}
|
||||
.admin-doc-textbtn:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.admin-doc-more {
|
||||
position: relative;
|
||||
}
|
||||
.admin-doc-menu {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: calc(100% + 0.2rem);
|
||||
z-index: 5;
|
||||
min-width: 7.5rem;
|
||||
padding: 0.3rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.7rem;
|
||||
background: var(--panel);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.admin-doc-menu.is-up {
|
||||
top: auto;
|
||||
bottom: calc(100% + 0.2rem);
|
||||
}
|
||||
.admin-doc-menu-item {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-height: 2.25rem;
|
||||
align-items: center;
|
||||
padding: 0 0.7rem;
|
||||
border: 0;
|
||||
border-radius: 0.45rem;
|
||||
background: transparent;
|
||||
color: var(--ink);
|
||||
font-size: 13.5px;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
text-align: left;
|
||||
}
|
||||
.admin-doc-menu-item.is-danger {
|
||||
color: var(--danger);
|
||||
}
|
||||
.admin-doc-menu-item:hover:not(:disabled) {
|
||||
background: var(--danger-soft);
|
||||
}
|
||||
.admin-doc-menu-item:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.admin-doc-menu-item:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
@container doc-editor (min-width: 64rem) {
|
||||
.admin-doc-split {
|
||||
grid-template-columns: minmax(0, 1fr) 19rem;
|
||||
column-gap: 1.5rem;
|
||||
row-gap: 0.85rem;
|
||||
}
|
||||
.admin-doc-main {
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
}
|
||||
.admin-doc-rail {
|
||||
grid-column: 2;
|
||||
grid-row: 1 / span 2;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
max-height: calc(100dvh - 6rem);
|
||||
overflow: auto;
|
||||
}
|
||||
.admin-doc-rail > summary {
|
||||
display: none;
|
||||
}
|
||||
.admin-doc-rail:not([open]) > .admin-doc-rail-body {
|
||||
display: flex;
|
||||
}
|
||||
.admin-doc-actions {
|
||||
grid-column: 1;
|
||||
grid-row: 2;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.admin-doc-table thead {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
}
|
||||
.admin-doc-table,
|
||||
.admin-doc-table tbody,
|
||||
.admin-doc-table tr,
|
||||
.admin-doc-table td {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.admin-doc-table tr {
|
||||
padding: 0.35rem 0 0.6rem;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.admin-doc-table td {
|
||||
border-bottom: 0;
|
||||
padding: 0.3rem 0.85rem;
|
||||
}
|
||||
.admin-doc-table td::before {
|
||||
content: attr(data-label);
|
||||
display: block;
|
||||
margin-bottom: 0.15rem;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.admin-doc-table tr:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -7028,3 +7459,14 @@ html.j13-reduce-chrome .j13-att-card.is-fresh {
|
||||
transform: translateY(0);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* 单页编辑器:未分层才能盖过 .j13-md-textarea 的 min-height: 320px */
|
||||
.admin-doc-md .j13-md-editor:not(.is-fullscreen) {
|
||||
height: clamp(16rem, calc(100dvh - 22rem), 40rem);
|
||||
min-height: 0;
|
||||
}
|
||||
.admin-doc-md .j13-md-textarea,
|
||||
.admin-doc-md .j13-md-preview {
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user