- settings.site 新增 theme,落在 <html data-scheme> 上 - 深色完全由组件库的令牌块接管,页面与组件都不用改 - 后台「页头 → 配色」可选,保存后前后台即时切换 - 顶部背景图是浅色渐变图,深色下隐藏(.site-background)
1577 lines
31 KiB
CSS
1577 lines
31 KiB
CSS
/* 页面级样式:只保留「组件库没有」的部分(背景、外壳、封面兜底、正文版式)。
|
||
颜色 / 间距 / 字号全部取自 @stash/ui 的令牌。 */
|
||
|
||
/* 主题级覆盖:放 :root 而不是 .app,前后台两个壳才能拿到同一套阴影 */
|
||
:root {
|
||
--su-shadow-card: 0 6px 16px rgba(27, 26, 49, 0.02);
|
||
--su-shadow-hover: 0 6px 16px rgba(27, 26, 49, 0.06);
|
||
}
|
||
|
||
.app {
|
||
position: relative;
|
||
z-index: 1;
|
||
/* 透明:让固定背景图从下面透出来(Layout 默认有底色) */
|
||
background-color: transparent;
|
||
}
|
||
|
||
/* 顶部背景图:固定 65vh,底部渐隐到页面底色 */
|
||
.site-background {
|
||
position: fixed;
|
||
inset: 0 0 auto;
|
||
z-index: 0;
|
||
height: 65vh;
|
||
background: url('./assets/site-bg.jpg') center top / cover no-repeat;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.site-background::after {
|
||
content: '';
|
||
position: absolute;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
height: 80%;
|
||
background: linear-gradient(to bottom, transparent, var(--su-bg-page));
|
||
}
|
||
|
||
/* 这张背景图是浅色渐变图,深色下留着会糊成一层脏灰,直接不显示 */
|
||
[data-scheme='dark'] .site-background {
|
||
display: none;
|
||
}
|
||
|
||
/* ---------- 页头 ---------- */
|
||
|
||
.site-header-inner {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: var(--su-space-4);
|
||
width: 100%;
|
||
max-width: var(--su-layout-width);
|
||
height: calc(var(--su-header-height) - 1px);
|
||
margin: 0 auto;
|
||
padding: 0 var(--su-space-5);
|
||
}
|
||
|
||
/* 后台「首页 Logo」的实时预览:外观交给库里的 Brand,这里只管外框 */
|
||
.brand-preview {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
padding: var(--su-space-3) var(--su-space-4);
|
||
border: 1px dashed var(--su-border);
|
||
border-radius: var(--su-radius-md);
|
||
background-color: var(--su-bg-card);
|
||
}
|
||
|
||
/* ---------- 页头滚动信息 ---------- */
|
||
|
||
/* 跑马灯外壳在 @stash/ui 的 Ticker 里,这里只剩每条信息的排版 */
|
||
.header-ticker-item {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
font-size: var(--su-font-size-sm);
|
||
line-height: var(--su-line-height-sm);
|
||
color: var(--su-text-sub);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.header-actions {
|
||
margin-left: auto;
|
||
}
|
||
|
||
/* ---------- 搜索:页头下的工具条(Layout 的 toolbar 插槽) ---------- */
|
||
|
||
.search-toolbar {
|
||
display: flex;
|
||
justify-content: center;
|
||
/* 整条带 120(32 + 44 + 44):搜索框比贴着页头时再往下挪 16 */
|
||
padding: var(--su-space-8) 0 calc(var(--su-space-10) + var(--su-space-1));
|
||
}
|
||
|
||
/* ---------- 两栏骨架 ---------- */
|
||
|
||
.content {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-5);
|
||
padding-right: 4px;
|
||
padding-bottom: var(--su-space-10);
|
||
}
|
||
|
||
.sidebar {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-4);
|
||
padding-top: 0;
|
||
}
|
||
|
||
/* ---------- 侧栏卡片 ---------- */
|
||
|
||
.profile-card {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
padding: var(--su-space-5) var(--su-space-4) var(--su-space-4);
|
||
text-align: center;
|
||
}
|
||
|
||
.profile-name {
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.profile-role {
|
||
padding: 0 var(--su-space-2);
|
||
border: 1px solid var(--su-border);
|
||
border-radius: var(--su-radius-pill);
|
||
font-size: var(--su-font-size-xs);
|
||
line-height: var(--su-line-height-sm);
|
||
color: var(--su-text-sub);
|
||
}
|
||
|
||
.profile-bio {
|
||
margin-top: 2px;
|
||
line-height: 1.55;
|
||
}
|
||
|
||
.profile-location {
|
||
margin-top: 2px;
|
||
font-size: var(--su-font-size-xs);
|
||
line-height: var(--su-line-height-sm);
|
||
color: var(--su-text-muted);
|
||
}
|
||
|
||
/* 旧版头像下面留 4px,和名字之间更松 */
|
||
.profile-card > span:first-child {
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.service-panel {
|
||
padding: var(--su-space-3) var(--su-space-4);
|
||
}
|
||
|
||
/* 旧版标题与统计值的行高比库默认更紧 */
|
||
.service-panel h2 {
|
||
line-height: var(--su-line-height-sm);
|
||
}
|
||
|
||
/* 旧版连接状态药丸:22 高、12px */
|
||
.service-status {
|
||
height: 22px;
|
||
padding: 0 var(--su-space-3);
|
||
font-size: var(--su-font-size-xs);
|
||
}
|
||
|
||
/* 旧版统计行是 12/18 */
|
||
.service-stats span {
|
||
line-height: var(--su-line-height-sm);
|
||
}
|
||
|
||
.service-stats {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-2);
|
||
margin-top: 10px;
|
||
}
|
||
|
||
.service-actions {
|
||
display: flex;
|
||
gap: var(--su-space-2);
|
||
margin-top: var(--su-space-3);
|
||
}
|
||
|
||
.service-actions > * {
|
||
flex: 1;
|
||
}
|
||
|
||
.service-host {
|
||
max-width: 140px;
|
||
}
|
||
|
||
.nav-card {
|
||
padding: var(--su-space-2);
|
||
}
|
||
|
||
/* ---------- 首页分区 ---------- */
|
||
|
||
.home-view {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-5);
|
||
}
|
||
|
||
.section-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
margin-bottom: var(--su-space-4);
|
||
}
|
||
|
||
.section-title-wrapper {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
/* 角标是挂在标题右上角的绝对定位元素(旧版行为),不占行内宽度 */
|
||
.section-title-box {
|
||
position: relative;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.count-badge {
|
||
position: absolute;
|
||
top: -8px;
|
||
right: -18px;
|
||
height: 16px;
|
||
min-width: 16px;
|
||
padding: 0 var(--su-space-1);
|
||
border-radius: var(--su-radius-sm);
|
||
box-shadow: 0 1px 3px color-mix(in srgb, var(--su-color-danger) 30%, transparent);
|
||
font-size: var(--su-font-size-xs);
|
||
font-weight: var(--su-font-weight-strong);
|
||
line-height: 1;
|
||
}
|
||
|
||
/* 旧版分区标题是 16/1.2,更多按钮是 24px 小方按钮 */
|
||
.section-header h2 {
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.section-more {
|
||
width: 24px;
|
||
height: 24px;
|
||
}
|
||
|
||
.section-bar {
|
||
width: 4px;
|
||
height: 16px;
|
||
margin-right: var(--su-space-2);
|
||
border-radius: var(--su-radius-xs);
|
||
background-color: var(--su-color-primary);
|
||
}
|
||
|
||
/* 新前台:卡片内的分组块 / 分组页层级 */
|
||
.card-group-block + .card-group-block {
|
||
margin-top: var(--su-space-4);
|
||
}
|
||
|
||
.card-group-title {
|
||
margin: 0 0 var(--su-space-2);
|
||
font-size: var(--su-font-size-md);
|
||
font-weight: 600;
|
||
color: var(--su-text-sub);
|
||
}
|
||
|
||
.mixed-format-block + .mixed-format-block {
|
||
margin-top: var(--su-space-4);
|
||
}
|
||
|
||
.group-crumbs {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
padding: var(--su-space-2) var(--su-space-3);
|
||
}
|
||
|
||
.group-crumb-sep {
|
||
color: var(--su-text-muted);
|
||
}
|
||
|
||
.group-child-block {
|
||
margin-top: var(--su-space-2);
|
||
}
|
||
|
||
/* 明细页的分组标题:与首页卡片标题同一套「色条 + 标题」 */
|
||
.group-title {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.group-bar {
|
||
width: 4px;
|
||
height: 16px;
|
||
margin-right: var(--su-space-2);
|
||
border-radius: var(--su-radius-xs);
|
||
background-color: var(--su-color-primary);
|
||
}
|
||
|
||
/* ---------- 应用条目 ---------- */
|
||
|
||
.app-card {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-4);
|
||
padding: var(--su-space-2) 0;
|
||
border-radius: var(--su-radius-sm);
|
||
}
|
||
|
||
.app-card:hover .app-card-name {
|
||
color: var(--su-color-primary);
|
||
}
|
||
|
||
.app-card-info {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-1);
|
||
min-width: 0;
|
||
}
|
||
|
||
/* 旧版应用头像是 48px 圆形,右下角是 10px 小认证标 */
|
||
.app-card-avatar {
|
||
width: 48px;
|
||
height: 48px;
|
||
font-size: var(--su-font-size-lg);
|
||
}
|
||
|
||
.app-card-avatar > span + span {
|
||
width: 10px;
|
||
height: 10px;
|
||
border-width: 1px;
|
||
/* 6px 不是文字尺寸:这是 10px 圆标里的一枚「✓」字形,按图标对待;
|
||
设计系统的字阶(12 起)不覆盖这种装饰字形 */
|
||
font-size: 6px;
|
||
}
|
||
|
||
/* ---------- 图文白卡 ---------- */
|
||
|
||
.ces-card {
|
||
overflow: hidden;
|
||
transition: transform var(--su-duration-fast) var(--su-ease-in-out);
|
||
}
|
||
|
||
.ces-card:hover {
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
.ces-body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-1);
|
||
padding: var(--su-space-3);
|
||
text-align: left;
|
||
}
|
||
|
||
.ces-body--button {
|
||
width: 100%;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ces-body--button:hover {
|
||
background-color: var(--su-bg-subtle);
|
||
}
|
||
|
||
/* ---------- 详情 ---------- */
|
||
|
||
.detail-view {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-5);
|
||
}
|
||
|
||
.detail-nav {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 12px var(--su-space-5);
|
||
}
|
||
|
||
/* 面包屑在左侧,12px(与旧版 breadcrumb 一致) */
|
||
.detail-breadcrumb {
|
||
font-size: var(--su-font-size-xs);
|
||
}
|
||
|
||
.detail-nav > * {
|
||
width: 100%;
|
||
}
|
||
|
||
.detail-hero {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: var(--su-space-3) 0 var(--su-space-1);
|
||
text-align: center;
|
||
}
|
||
|
||
.detail-hero-icon {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 44px;
|
||
height: 44px;
|
||
margin-bottom: var(--su-space-2);
|
||
border-radius: 50%;
|
||
background-color: var(--su-color-primary-soft);
|
||
color: var(--su-color-primary);
|
||
font-size: var(--su-font-size-xl);
|
||
line-height: 1;
|
||
}
|
||
|
||
.detail-hero-title {
|
||
font-size: var(--su-font-size-xl);
|
||
font-weight: var(--su-font-weight-strong);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.detail-hero-count {
|
||
margin-top: var(--su-space-1);
|
||
font-size: var(--su-font-size-md);
|
||
color: var(--su-text-muted);
|
||
}
|
||
|
||
.item-card {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: var(--su-space-6);
|
||
}
|
||
|
||
.item-title {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: var(--su-space-3);
|
||
font-size: var(--su-font-size-xl);
|
||
font-weight: var(--su-font-weight-semibold);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
/* 旧版标签:2px 10px、12px、主色浅底 */
|
||
.item-tag {
|
||
height: 22px;
|
||
padding: 0 var(--su-space-3);
|
||
font-size: var(--su-font-size-xs);
|
||
}
|
||
|
||
.item-edit {
|
||
margin-left: var(--su-space-1);
|
||
font-size: var(--su-font-size-sm);
|
||
color: var(--su-color-primary);
|
||
vertical-align: middle;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.item-edit:disabled {
|
||
cursor: not-allowed;
|
||
opacity: 0.6;
|
||
}
|
||
|
||
.item-cover {
|
||
display: grid;
|
||
place-items: center;
|
||
margin: var(--su-space-5) 0 var(--su-space-3);
|
||
overflow: hidden;
|
||
background-color: var(--su-color-primary-soft);
|
||
color: var(--su-color-primary);
|
||
}
|
||
|
||
.item-cover--square {
|
||
width: 96px;
|
||
height: 96px;
|
||
border-radius: var(--su-radius-md);
|
||
}
|
||
|
||
.item-cover--portrait {
|
||
width: 179px;
|
||
aspect-ratio: 2 / 3;
|
||
border-radius: var(--su-radius-cover);
|
||
}
|
||
|
||
.item-cover img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.item-cover-letter {
|
||
font-size: var(--su-font-size-2xl);
|
||
color: var(--su-text-sub);
|
||
}
|
||
|
||
.item-quote {
|
||
display: flex;
|
||
gap: var(--su-space-2);
|
||
width: 100%;
|
||
margin-top: 18px;
|
||
text-align: left;
|
||
}
|
||
|
||
.item-quote-mark {
|
||
flex-shrink: 0;
|
||
font-size: var(--su-font-size-2xl);
|
||
font-weight: var(--su-font-weight-strong);
|
||
line-height: 1;
|
||
color: color-mix(in srgb, var(--su-color-danger) 35%, transparent);
|
||
}
|
||
|
||
.item-quote-text {
|
||
font-size: var(--su-font-size-md);
|
||
line-height: 1.7;
|
||
color: var(--su-text-sub);
|
||
}
|
||
|
||
/* 旧版正文段落:占满卡片宽度、左对齐、14/1.7、次级色 */
|
||
.item-desc {
|
||
width: 100%;
|
||
margin-top: 10px;
|
||
line-height: 1.7;
|
||
text-align: left;
|
||
}
|
||
|
||
.item-actions {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
width: 100%;
|
||
margin-top: 18px;
|
||
}
|
||
|
||
/* 统计小药丸:浏览 / 点赞的底 */
|
||
.item-stat {
|
||
min-width: 56px;
|
||
height: 36px;
|
||
padding: 0 var(--su-space-3);
|
||
border-radius: var(--su-radius-cover);
|
||
background-color: var(--su-bg-page);
|
||
}
|
||
|
||
/* 跳转按钮占满剩余宽度 */
|
||
.item-jump {
|
||
display: inline-flex;
|
||
flex: 1;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: var(--su-space-2);
|
||
height: 36px;
|
||
border-radius: var(--su-radius-cover);
|
||
background-color: var(--su-color-primary);
|
||
color: var(--su-white);
|
||
font-size: var(--su-font-size-md);
|
||
transition: opacity var(--su-duration-fast) var(--su-ease-in-out);
|
||
}
|
||
|
||
.item-jump:hover:not(:disabled) {
|
||
background-color: var(--su-color-primary-hover);
|
||
}
|
||
|
||
.item-jump:disabled {
|
||
cursor: not-allowed;
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.item-banner {
|
||
width: 100%;
|
||
margin-top: var(--su-space-4);
|
||
border-radius: var(--su-radius-md);
|
||
}
|
||
|
||
/* ---------- 文章 ---------- */
|
||
|
||
.article-head {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: var(--su-space-3);
|
||
padding: var(--su-space-1) 0;
|
||
text-align: center;
|
||
}
|
||
|
||
.article-heading {
|
||
max-width: 760px;
|
||
font-size: var(--su-font-size-xl);
|
||
font-weight: var(--su-font-weight-strong);
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.article-meta {
|
||
display: flex;
|
||
align-items: center;
|
||
font-size: var(--su-font-size-xs);
|
||
color: var(--su-text-muted);
|
||
}
|
||
|
||
.article-meta-item {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.article-meta-dot {
|
||
width: 3px;
|
||
height: 3px;
|
||
margin: 0 var(--su-space-2);
|
||
border-radius: 50%;
|
||
background-color: var(--su-border);
|
||
}
|
||
|
||
.article-body-card {
|
||
overflow: hidden;
|
||
}
|
||
|
||
.article-body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-3);
|
||
padding: var(--su-space-8) var(--su-space-10) var(--su-space-10);
|
||
}
|
||
|
||
.article-lead {
|
||
margin-bottom: var(--su-space-2);
|
||
}
|
||
|
||
.article-body-image {
|
||
width: 100%;
|
||
margin: var(--su-space-2) 0;
|
||
border-radius: var(--su-radius-md);
|
||
}
|
||
|
||
/* ---------- 推荐阅读 ---------- */
|
||
|
||
.related-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: var(--su-space-4) var(--su-space-6);
|
||
margin-top: var(--su-space-4);
|
||
}
|
||
|
||
.related-title {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
margin-bottom: var(--su-space-4);
|
||
}
|
||
|
||
.related-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-3);
|
||
width: 100%;
|
||
padding: var(--su-space-1);
|
||
border-radius: var(--su-radius-cover);
|
||
text-align: left;
|
||
transition: background-color var(--su-duration-fast) var(--su-ease-in-out);
|
||
}
|
||
|
||
.related-item:hover {
|
||
background-color: var(--su-bg-subtle);
|
||
}
|
||
|
||
.related-info {
|
||
min-width: 0;
|
||
}
|
||
|
||
/* ---------- 通用 ---------- */
|
||
|
||
/* 服务面板的两个操作按钮:旧版是 12px / 28 高 / 等分 / 描边 */
|
||
.service-action {
|
||
flex: 1;
|
||
height: 28px;
|
||
padding: 0 var(--su-space-2);
|
||
font-size: var(--su-font-size-xs);
|
||
border-radius: var(--su-radius-cover);
|
||
}
|
||
|
||
.service-action:hover:not(:disabled) {
|
||
border-color: var(--su-color-primary);
|
||
background-color: var(--su-color-primary-soft);
|
||
color: var(--su-color-primary);
|
||
}
|
||
|
||
/* 页头图标按钮:旧版 hover 是浅灰底 + 深色字 */
|
||
.site-header-inner button:hover {
|
||
background-color: var(--su-bg-light);
|
||
color: var(--su-text-main);
|
||
}
|
||
|
||
/* 分区卡右上角 •••:旧版 hover 只有浅灰底 */
|
||
.section-more:hover {
|
||
background-color: var(--su-bg-light);
|
||
color: var(--su-text-sub);
|
||
}
|
||
|
||
/* 详情 / 文章切换时的淡入上浮(旧版 view-in) */
|
||
@keyframes view-in {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(6px);
|
||
}
|
||
|
||
to {
|
||
opacity: 1;
|
||
transform: none;
|
||
}
|
||
}
|
||
|
||
.detail-view {
|
||
animation: view-in 0.22s ease both;
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.detail-view {
|
||
animation: none;
|
||
}
|
||
}
|
||
|
||
.link-button {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: var(--su-space-1);
|
||
height: 32px;
|
||
padding: 0 var(--su-space-3);
|
||
border: 1px solid var(--su-border);
|
||
border-radius: var(--su-radius-sm);
|
||
font-size: var(--su-font-size-sm);
|
||
color: var(--su-text-sub);
|
||
transition: background-color var(--su-duration-fast) var(--su-ease-in-out);
|
||
}
|
||
|
||
.link-button:hover {
|
||
background-color: var(--su-bg-subtle);
|
||
color: var(--su-text-main);
|
||
}
|
||
|
||
.sr-only {
|
||
position: absolute;
|
||
width: 1px;
|
||
height: 1px;
|
||
overflow: hidden;
|
||
clip-path: inset(50%);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* ---------- 设置页 ---------- */
|
||
|
||
.admin-page {
|
||
min-height: 100vh;
|
||
min-height: 100dvh;
|
||
background-color: var(--su-bg-page);
|
||
}
|
||
|
||
/* 与前台页头同一套:整条吸顶,内部 .site-header-inner 负责 60 高与限宽 */
|
||
.admin-topbar {
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: var(--su-z-header);
|
||
border-bottom: 1px solid var(--su-border);
|
||
background-color: var(--su-bg-card);
|
||
}
|
||
|
||
.admin-main {
|
||
/* 与页头内层同宽同左缘:页头 1380 减左右各 20 的内边距 = 内容从 50 起 */
|
||
width: min(var(--su-layout-width), 100%);
|
||
margin: 0 auto;
|
||
padding: var(--su-space-8) var(--su-space-5) var(--su-space-10);
|
||
}
|
||
|
||
.admin-locked {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: var(--su-space-4);
|
||
margin-top: var(--su-space-5);
|
||
padding: var(--su-space-4);
|
||
border: 1px dashed var(--su-border-strong);
|
||
border-radius: var(--su-radius-md);
|
||
}
|
||
|
||
.admin-form {
|
||
margin-top: var(--su-space-5);
|
||
}
|
||
|
||
.admin-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-3);
|
||
}
|
||
|
||
.admin-item-row {
|
||
display: grid;
|
||
grid-template-columns: minmax(0, 1fr) 160px 120px auto;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
.admin-item-row > :first-child:not(.admin-item-title) {
|
||
grid-column: span 1;
|
||
}
|
||
|
||
.admin-item-title {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.admin-nav-row {
|
||
grid-template-columns: auto minmax(0, 1fr) auto;
|
||
}
|
||
|
||
.admin-section-row {
|
||
grid-template-columns: auto minmax(0, 1fr) 96px auto;
|
||
}
|
||
|
||
.admin-item-actions {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.admin-item-row .su-switch {
|
||
justify-self: start;
|
||
}
|
||
|
||
/* ---------- 响应式 ---------- */
|
||
|
||
@media (max-width: 1100px) {
|
||
.sidebar {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: var(--su-space-3);
|
||
padding: 0 var(--su-space-4) var(--su-space-4);
|
||
}
|
||
|
||
.profile-card {
|
||
grid-row: span 2;
|
||
}
|
||
|
||
.service-panel {
|
||
display: none;
|
||
}
|
||
|
||
.header-info {
|
||
display: none;
|
||
}
|
||
|
||
.search-toolbar {
|
||
padding: var(--su-space-5) 0 var(--su-space-6);
|
||
}
|
||
|
||
.content {
|
||
padding-top: var(--su-space-2);
|
||
}
|
||
}
|
||
|
||
@media (max-width: 820px) {
|
||
.sidebar {
|
||
display: none;
|
||
}
|
||
|
||
.site-header-inner {
|
||
height: 56px;
|
||
}
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.app-card,
|
||
.related-item,
|
||
.link-button {
|
||
transition: none;
|
||
}
|
||
}
|
||
|
||
/* ---------- 条目操作条 / 设置页细节 ---------- */
|
||
|
||
.item-stat {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: var(--su-space-1);
|
||
padding: 0;
|
||
border: none;
|
||
background: none;
|
||
color: var(--su-text-sub);
|
||
font: inherit;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.item-stat.is-liked,
|
||
.item-stat.is-liked svg {
|
||
color: var(--su-color-primary);
|
||
}
|
||
|
||
.item-title .item-edit {
|
||
margin-left: 0;
|
||
align-self: center;
|
||
line-height: 1;
|
||
}
|
||
|
||
.admin-actions {
|
||
margin-top: var(--su-space-6);
|
||
}
|
||
|
||
.admin-tabs {
|
||
overflow: visible;
|
||
margin-bottom: var(--su-space-5);
|
||
}
|
||
|
||
.admin-create {
|
||
margin-top: var(--su-space-4);
|
||
padding-top: var(--su-space-4);
|
||
border-top: 1px dashed var(--su-border-strong);
|
||
}
|
||
|
||
.admin-create-row {
|
||
display: grid;
|
||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 160px auto;
|
||
gap: var(--su-space-2);
|
||
align-items: center;
|
||
}
|
||
|
||
/* Select 自身有 160px 最小宽度,网格项必须允许收缩,否则会盖住「新增」按钮 */
|
||
.admin-create-row > * {
|
||
min-width: 0;
|
||
}
|
||
|
||
/* 侧栏里的子分类(分组):缩进一层,弱化文字 */
|
||
.admin-nav-group-row {
|
||
padding-left: var(--su-space-6);
|
||
}
|
||
|
||
.admin-nav-group-row .admin-item-title {
|
||
color: var(--su-text-sub);
|
||
font-size: var(--su-font-size-sm);
|
||
}
|
||
|
||
/* 归类页:一行一个分区,标题 / 类型 / 图标 / 色条 / 条数 / 保存 / 删除 */
|
||
.admin-category-row {
|
||
display: grid;
|
||
grid-template-columns: minmax(0, 1.4fr) 150px 80px 110px 90px auto auto auto;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
.admin-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* 新后台:分组树行 / 新建行 / 卡片头,用弹性布局避免网格列数对不上 */
|
||
.admin-node-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
.admin-node-title {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.admin-node-format {
|
||
width: 170px;
|
||
flex: none;
|
||
}
|
||
|
||
.admin-new-node-row {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
/* 分组管理:参考后台的树形表格 */
|
||
.group-toolbar {
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
.group-table-wrap {
|
||
overflow: hidden;
|
||
border: 1px solid var(--su-card-border);
|
||
border-radius: var(--su-radius-md);
|
||
background-color: var(--su-bg-card);
|
||
}
|
||
|
||
.group-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: var(--su-font-size-md);
|
||
}
|
||
|
||
.group-table th {
|
||
padding: var(--su-space-3) var(--su-space-4);
|
||
background-color: var(--su-bg-subtle);
|
||
border-bottom: 1px solid var(--su-card-border);
|
||
color: var(--su-text-muted);
|
||
font-size: var(--su-font-size-sm);
|
||
font-weight: 600;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.group-table td {
|
||
padding: var(--su-space-3) var(--su-space-4);
|
||
border-bottom: 1px solid var(--su-card-border);
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.group-table tbody tr:last-child td {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.group-table tbody tr:hover {
|
||
background-color: var(--su-bg-subtle);
|
||
}
|
||
|
||
.group-col-sort {
|
||
width: 110px;
|
||
}
|
||
|
||
.group-col-count {
|
||
width: 120px;
|
||
text-align: center !important;
|
||
}
|
||
|
||
.group-col-status {
|
||
width: 90px;
|
||
text-align: center !important;
|
||
}
|
||
|
||
.group-col-actions {
|
||
width: 190px;
|
||
text-align: right !important;
|
||
}
|
||
|
||
.group-name-cell {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
.group-caret {
|
||
width: 20px;
|
||
flex: none;
|
||
padding: 0;
|
||
border: none;
|
||
background: none;
|
||
color: var(--su-text-muted);
|
||
font-size: var(--su-font-size-sm);
|
||
line-height: 1;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.group-caret-empty {
|
||
cursor: default;
|
||
}
|
||
|
||
.group-mark {
|
||
display: inline-flex;
|
||
flex: none;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 20px;
|
||
color: var(--su-color-primary);
|
||
font-size: var(--su-font-size-lg);
|
||
}
|
||
|
||
.group-mark-empty {
|
||
width: 20px;
|
||
}
|
||
|
||
.group-mark-text {
|
||
font-size: var(--su-font-size-md);
|
||
}
|
||
|
||
.group-name {
|
||
color: var(--su-text-main);
|
||
font-weight: 500;
|
||
}
|
||
|
||
.group-format {
|
||
padding: 0 var(--su-space-2);
|
||
border-radius: var(--su-radius-xs);
|
||
background-color: var(--su-bg-subtle);
|
||
color: var(--su-text-muted);
|
||
font-size: var(--su-font-size-sm);
|
||
}
|
||
|
||
.group-sort {
|
||
color: var(--su-text-muted);
|
||
font-family: var(--su-font-mono);
|
||
font-size: var(--su-font-size-sm);
|
||
}
|
||
|
||
.group-count {
|
||
color: var(--su-text-sub);
|
||
text-align: center;
|
||
}
|
||
|
||
.group-actions {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: var(--su-space-3);
|
||
}
|
||
|
||
.group-action {
|
||
padding: 0;
|
||
border: none;
|
||
background: none;
|
||
color: var(--su-color-primary);
|
||
font-size: var(--su-font-size-sm);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.group-action:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.group-action-danger {
|
||
color: var(--su-color-danger);
|
||
}
|
||
|
||
.group-empty {
|
||
padding: var(--su-space-6) 0 !important;
|
||
color: var(--su-text-muted);
|
||
text-align: center;
|
||
}
|
||
|
||
.group-icon-field {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
.group-icon-preview {
|
||
display: inline-flex;
|
||
flex: none;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 40px;
|
||
height: 40px;
|
||
border: 1px solid var(--su-border-strong);
|
||
border-radius: var(--su-radius-sm);
|
||
background-color: var(--su-bg-subtle);
|
||
}
|
||
|
||
.group-dialog-row {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: var(--su-space-3);
|
||
}
|
||
|
||
/* 内容页:与分组管理一致的列表 */
|
||
.entry-table .entry-col-href {
|
||
width: 36%;
|
||
}
|
||
|
||
.entry-table .entry-col-format {
|
||
width: 80px;
|
||
}
|
||
|
||
.entry-format {
|
||
display: inline-block;
|
||
padding: 0 var(--su-space-2);
|
||
border-radius: var(--su-radius-xs);
|
||
background-color: var(--su-bg-subtle);
|
||
color: var(--su-text-muted);
|
||
font-size: var(--su-font-size-sm);
|
||
}
|
||
|
||
.entry-table .entry-col-group {
|
||
width: 180px;
|
||
}
|
||
|
||
.entry-title {
|
||
color: var(--su-text-main);
|
||
font-weight: 500;
|
||
}
|
||
|
||
.entry-href {
|
||
display: inline-block;
|
||
max-width: 100%;
|
||
overflow: hidden;
|
||
color: var(--su-color-primary);
|
||
font-size: var(--su-font-size-sm);
|
||
text-overflow: ellipsis;
|
||
text-decoration: none;
|
||
vertical-align: bottom;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
a.entry-href:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.entry-href-empty {
|
||
color: var(--su-text-placeholder);
|
||
}
|
||
|
||
.entry-group {
|
||
color: var(--su-text-sub);
|
||
font-size: var(--su-font-size-sm);
|
||
}
|
||
|
||
/* 侧边栏勾选:标题在左,开关在右 */
|
||
.sidebar-toggle-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: var(--su-space-3);
|
||
padding: var(--su-space-1) 0;
|
||
}
|
||
|
||
.sidebar-toggle-row .admin-item-title {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* 首页:左右栏共用一个滚动区,左侧吸顶交给 CSS sticky */
|
||
#page-scroll {
|
||
scrollbar-width: none;
|
||
-ms-overflow-style: none;
|
||
}
|
||
|
||
#page-scroll::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
|
||
/* 左栏吸顶:sticky 由滚动引擎处理,不会像 JS 改 transform 那样落后平滑滚动一帧。
|
||
高度锁在滚动区高度内,栏内只有「分组导航」可滚,资料卡与本地服务保持不动。 */
|
||
#page-scroll > aside {
|
||
position: sticky;
|
||
top: 0;
|
||
align-self: flex-start;
|
||
height: 100%;
|
||
max-height: 100%;
|
||
overflow: hidden;
|
||
}
|
||
|
||
#page-scroll > aside .sidebar-wrap,
|
||
#page-scroll > aside .sidebar-home {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
min-height: 0;
|
||
}
|
||
|
||
#page-scroll > aside .profile-card,
|
||
#page-scroll > aside .service-panel {
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
/* 只有导航卡参与滚动,滚动条隐藏 */
|
||
#page-scroll > aside .nav-card {
|
||
flex: 0 1 auto;
|
||
min-height: 0;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
scrollbar-width: none;
|
||
-ms-overflow-style: none;
|
||
}
|
||
|
||
#page-scroll > aside .nav-card::-webkit-scrollbar {
|
||
display: none;
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
|
||
.sidebar-home {
|
||
padding-top: 0;
|
||
padding-bottom: 24px;
|
||
will-change: transform;
|
||
}
|
||
|
||
.sidebar-wrap {
|
||
position: relative;
|
||
}
|
||
|
||
/* 侧栏到内容区共用一条滚动虚化遮罩,同一水平高度 */
|
||
|
||
.sidebar-fade.is-visible {
|
||
opacity: 1;
|
||
}
|
||
|
||
/* 左侧卡片半透明,露出页面背景 */
|
||
.sidebar-home .profile-card,
|
||
.sidebar-home .service-panel,
|
||
.sidebar-home .nav-card {
|
||
background-color: color-mix(in srgb, var(--su-bg-card) 64%, transparent);
|
||
border-color: color-mix(in srgb, var(--su-card-border) 55%, transparent);
|
||
backdrop-filter: blur(14px) saturate(1.15);
|
||
}
|
||
|
||
.sidebar-home .nav-card {
|
||
overflow: hidden;
|
||
border-radius: var(--su-radius-md);
|
||
}
|
||
|
||
.sidebar-divider {
|
||
margin: var(--su-space-2) 0;
|
||
border-top: 1px dashed var(--su-border-strong);
|
||
}
|
||
|
||
/* 首页卡片:左侧卡片列表 + 右侧分组表格 */
|
||
.cards-manager {
|
||
display: grid;
|
||
grid-template-columns: 220px minmax(0, 1fr);
|
||
gap: var(--su-space-4);
|
||
align-items: start;
|
||
margin-top: var(--su-space-4);
|
||
}
|
||
|
||
.cards-side {
|
||
padding: var(--su-space-3);
|
||
border: 1px solid var(--su-card-border);
|
||
border-radius: var(--su-radius-md);
|
||
background-color: var(--su-bg-subtle);
|
||
}
|
||
|
||
.cards-side-new {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
gap: var(--su-space-2);
|
||
margin: var(--su-space-2) 0 var(--su-space-3);
|
||
}
|
||
|
||
.cards-side-new > button {
|
||
width: 100%;
|
||
}
|
||
|
||
.cards-side-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-1);
|
||
}
|
||
|
||
.cards-side-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
padding: var(--su-space-2) var(--su-space-3);
|
||
border: none;
|
||
border-radius: var(--su-radius-sm);
|
||
background: transparent;
|
||
color: var(--su-text-main);
|
||
font-size: var(--su-font-size-md);
|
||
text-align: left;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.cards-drag-handle {
|
||
flex: none;
|
||
color: var(--su-text-placeholder);
|
||
font-size: var(--su-font-size-sm);
|
||
line-height: 1;
|
||
cursor: grab;
|
||
}
|
||
|
||
.cards-side-item.is-dragging {
|
||
opacity: 0.45;
|
||
}
|
||
|
||
.cards-side-item.is-over {
|
||
outline: 1px dashed var(--su-color-primary);
|
||
outline-offset: -1px;
|
||
}
|
||
|
||
.cards-side-item:hover {
|
||
background-color: var(--su-bg-card);
|
||
}
|
||
|
||
.cards-side-item.is-active {
|
||
background-color: var(--su-bg-card);
|
||
color: var(--su-color-primary);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.cards-side-title {
|
||
flex: 1;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.cards-side-count {
|
||
color: var(--su-text-muted);
|
||
font-size: var(--su-font-size-sm);
|
||
font-weight: 400;
|
||
}
|
||
|
||
.cards-drag-hint {
|
||
display: block;
|
||
margin-top: var(--su-space-3);
|
||
}
|
||
|
||
.cards-main {
|
||
min-width: 0;
|
||
}
|
||
|
||
.cards-table-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
margin-bottom: var(--su-space-2);
|
||
}
|
||
|
||
.cards-table-wrap {
|
||
margin-top: var(--su-space-2);
|
||
/* 列多了以后表格会比面板宽,横向滚动而不是把名字挤成两三行 */
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.cards-table th,
|
||
.cards-table td {
|
||
padding: var(--su-space-2);
|
||
}
|
||
|
||
.cards-col-limit {
|
||
width: 100px;
|
||
}
|
||
|
||
/* 分组名不换行,超长省略;列宽固定,保证五列都落在面板内 */
|
||
.cards-table {
|
||
table-layout: fixed;
|
||
}
|
||
|
||
.cards-table td:first-child .group-name {
|
||
display: block;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.cards-table th,
|
||
.cards-table td {
|
||
padding: var(--su-space-2) var(--su-space-4);
|
||
}
|
||
|
||
/* 首页 Tab:侧边栏设置 + 首页卡片上下两段 */
|
||
.admin-home {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-4);
|
||
}
|
||
|
||
.admin-home-section {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-3);
|
||
}
|
||
|
||
/* 首页卡片:分组展示顺序(表格里的「顺序」列,上下箭头即时保存) */
|
||
.cards-col-state {
|
||
width: 72px;
|
||
}
|
||
|
||
.cards-col-order {
|
||
width: 92px;
|
||
}
|
||
|
||
.card-order-cell {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-1);
|
||
}
|
||
|
||
/* 分组管理里状态为「关闭」的分组:卡片里只能看、不能勾选 */
|
||
.group-off-tag {
|
||
display: inline-block;
|
||
padding: 0 var(--su-space-2);
|
||
border-radius: var(--su-radius-pill);
|
||
background-color: var(--su-gray-2);
|
||
color: var(--su-text-muted);
|
||
font-size: var(--su-font-size-xs);
|
||
line-height: var(--su-line-height-sm);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.group-state-on {
|
||
font-size: var(--su-font-size-xs);
|
||
color: var(--su-text-muted);
|
||
}
|
||
|
||
.card-order-index {
|
||
display: grid;
|
||
place-items: center;
|
||
width: 20px;
|
||
height: 20px;
|
||
margin-right: var(--su-space-1);
|
||
border-radius: var(--su-radius-pill);
|
||
background-color: var(--su-color-primary-soft);
|
||
color: var(--su-color-primary);
|
||
font-size: var(--su-font-size-xs);
|
||
}
|
||
|
||
@media (max-width: 860px) {
|
||
.cards-manager {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
|
||
.admin-category-row > * {
|
||
min-width: 0;
|
||
}
|
||
|
||
/* 分区管理:一个分区一块,下面挂卡片预览与子分组 */
|
||
.admin-section-block {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-3);
|
||
padding-bottom: var(--su-space-4);
|
||
border-bottom: 1px dashed var(--su-border-strong);
|
||
}
|
||
|
||
.admin-block-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
.admin-groups {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--su-space-2);
|
||
padding-left: var(--su-space-4);
|
||
}
|
||
|
||
.admin-group-row {
|
||
display: grid;
|
||
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
.admin-new-group-row {
|
||
display: grid;
|
||
grid-template-columns: 190px minmax(0, 1fr) auto;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
}
|
||
|
||
/* 内容页:新增条目表单与条目列表 */
|
||
.admin-content-form {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: var(--su-space-3);
|
||
}
|
||
|
||
.admin-content-form .admin-col-span {
|
||
grid-column: 1 / -1;
|
||
}
|
||
|
||
.admin-entry-row {
|
||
display: grid;
|
||
grid-template-columns: minmax(0, 1fr) 140px auto auto;
|
||
align-items: center;
|
||
gap: var(--su-space-2);
|
||
padding: var(--su-space-2) 0;
|
||
border-bottom: 1px solid var(--su-border);
|
||
}
|
||
|
||
/* 删除按钮:可删的用危险色,不可删的用弱化色(都取主题令牌) */
|
||
.admin-item-actions .admin-remove {
|
||
color: var(--su-color-danger);
|
||
}
|
||
|
||
.admin-item-actions .admin-remove:not(:disabled):hover {
|
||
color: var(--su-color-danger);
|
||
background-color: color-mix(in srgb, var(--su-color-danger) 10%, transparent);
|
||
}
|
||
|
||
.admin-item-actions .admin-remove:disabled {
|
||
color: var(--su-text-muted);
|
||
cursor: not-allowed;
|
||
opacity: 0.45;
|
||
}
|
||
|