- 侧边栏设置新增「侧栏卡片」:本地管理员/本地服务显隐,即时保存 show_profile/show_service - 首页固定第一位恢复「本地服务」卡片(运行时项目网格),移除卡片三点菜单 - 后台首页卡片新增只读「本地服务」表,标记不可删除 - 前台改为整页滚动,左右两栏同步 - 验证:显隐落库、三点为 0、本地表无删除、滚动两栏同步 300px
1506 lines
28 KiB
CSS
1506 lines
28 KiB
CSS
/* 页面级样式:只保留「组件库没有」的部分(背景、外壳、封面兜底、正文版式)。
|
|
颜色 / 间距 / 字号全部取自 @stash/ui 的令牌。 */
|
|
|
|
.app {
|
|
position: relative;
|
|
z-index: 1;
|
|
/* 透明:让固定背景图从下面透出来(Layout 默认有底色) */
|
|
background-color: transparent;
|
|
/* 旧版阴影是 2% / 6%,比库默认更深,属于主题级覆盖 */
|
|
--su-shadow-card: 0 6px 16px rgba(27, 26, 49, 0.02);
|
|
--su-shadow-hover: 0 6px 16px rgba(27, 26, 49, 0.06);
|
|
}
|
|
|
|
/* 顶部背景图:固定 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));
|
|
}
|
|
|
|
/* ---------- 页头 ---------- */
|
|
|
|
.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);
|
|
}
|
|
|
|
.site-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--su-space-2);
|
|
}
|
|
|
|
.site-brand-mark {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: var(--su-radius-pill);
|
|
background-color: var(--su-text-main);
|
|
color: var(--su-white);
|
|
font-size: var(--su-font-size-base);
|
|
font-weight: var(--su-font-weight-strong);
|
|
}
|
|
|
|
.site-brand-name {
|
|
font-size: var(--su-font-size-lg);
|
|
line-height: var(--su-line-height-lg);
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
/* ---------- 页头滚动信息 ---------- */
|
|
|
|
.header-ticker {
|
|
flex: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
mask-image: linear-gradient(
|
|
90deg,
|
|
transparent 0,
|
|
#000 32px,
|
|
#000 calc(100% - 32px),
|
|
transparent 100%
|
|
);
|
|
}
|
|
|
|
.header-ticker-track {
|
|
display: flex;
|
|
width: max-content;
|
|
animation: header-ticker 24s linear infinite;
|
|
}
|
|
|
|
/* 每组占满整条轨道宽度:任何时候只看到一份信息,滚动时下一份从右侧进入 */
|
|
.header-ticker-group {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: space-evenly;
|
|
gap: var(--su-space-8);
|
|
min-width: 100%;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
@keyframes header-ticker {
|
|
from {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
to {
|
|
transform: translateX(calc(-100% / 3));
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.header-ticker-track {
|
|
animation: none;
|
|
}
|
|
}
|
|
|
|
.header-actions {
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* ---------- 搜索:悬浮在页头下方居中 ---------- */
|
|
|
|
.search-row {
|
|
position: fixed;
|
|
top: 76px;
|
|
left: 50%;
|
|
z-index: var(--su-z-header);
|
|
width: min(480px, calc(100vw - 48px));
|
|
height: 44px;
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
/* 旧版搜索是「浅边框 + 卡片阴影」,聚焦时不额外加边框/焦点环 */
|
|
.search-row > *:first-child,
|
|
.search-row > *:first-child:focus-within {
|
|
border-color: var(--su-border);
|
|
border-radius: var(--su-radius-md);
|
|
box-shadow: var(--su-shadow-card);
|
|
}
|
|
|
|
/* ---------- 两栏骨架 ---------- */
|
|
|
|
.content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--su-space-5);
|
|
padding-right: 4px;
|
|
padding-bottom: var(--su-space-10);
|
|
}
|
|
|
|
/* 顶部渐隐:sticky 固定在滚动区顶端,内容从下面淡出而不是被硬切 */
|
|
.content-veil {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 5;
|
|
height: 32px;
|
|
/* 抵消自身高度 + 父容器 gap,避免把首张卡片往下顶 */
|
|
margin-bottom: calc(-32px - var(--su-space-5));
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
background: linear-gradient(to bottom, var(--su-bg-page) 0%, transparent 100%);
|
|
transition: opacity var(--su-duration-fast) var(--su-ease-in-out);
|
|
}
|
|
|
|
.content-veil.is-visible {
|
|
opacity: 1;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.content-veil {
|
|
transition: none;
|
|
}
|
|
}
|
|
|
|
.sidebar {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--su-space-4);
|
|
padding-top: 88px;
|
|
}
|
|
|
|
/* ---------- 侧栏卡片 ---------- */
|
|
|
|
.profile-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 18px 14px 14px;
|
|
text-align: center;
|
|
}
|
|
|
|
.profile-name {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.profile-role {
|
|
padding: 1px 8px;
|
|
border: 1px solid var(--su-border);
|
|
border-radius: var(--su-radius-pill);
|
|
font-size: var(--su-font-size-xs);
|
|
line-height: 18px;
|
|
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: 18px;
|
|
color: var(--su-text-muted);
|
|
}
|
|
|
|
/* 旧版头像下面留 4px,和名字之间更松 */
|
|
.profile-card > span:first-child {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.service-panel {
|
|
padding: 12px 14px;
|
|
}
|
|
|
|
/* 旧版标题与统计值的行高比库默认更紧 */
|
|
.service-panel h2 {
|
|
line-height: 20px;
|
|
}
|
|
|
|
/* 旧版连接状态药丸:22 高、12px */
|
|
.service-status {
|
|
height: 22px;
|
|
padding: 0 10px;
|
|
font-size: var(--su-font-size-xs);
|
|
}
|
|
|
|
/* 旧版统计行是 12/18 */
|
|
.service-stats span {
|
|
line-height: 18px;
|
|
}
|
|
|
|
.service-stats {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
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 4px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 1px 3px color-mix(in srgb, var(--su-color-danger) 30%, transparent);
|
|
font-size: 12px;
|
|
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: 2px;
|
|
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: 6px;
|
|
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: 2px;
|
|
background-color: var(--su-color-primary);
|
|
}
|
|
|
|
/* ---------- 应用条目 ---------- */
|
|
|
|
.app-card {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
padding: 6px 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: 2px;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* 旧版应用头像是 48px 圆形,右下角是 10px 小认证标 */
|
|
.app-card-avatar {
|
|
width: 48px;
|
|
height: 48px;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.app-card-avatar > span + span {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-width: 1px;
|
|
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: 12px 0 4px;
|
|
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: 24px;
|
|
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: 24px 28px;
|
|
}
|
|
|
|
.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 10px;
|
|
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: 18px 0 10px;
|
|
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: 32px;
|
|
color: var(--su-text-sub);
|
|
}
|
|
|
|
.item-quote {
|
|
display: flex;
|
|
gap: 6px;
|
|
width: 100%;
|
|
margin-top: 18px;
|
|
text-align: left;
|
|
}
|
|
|
|
.item-quote-mark {
|
|
flex-shrink: 0;
|
|
font-size: 32px;
|
|
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: 6px;
|
|
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: 32px 40px 40px;
|
|
}
|
|
|
|
.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: 14px 24px;
|
|
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: 10px;
|
|
width: 100%;
|
|
padding: 4px;
|
|
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);
|
|
}
|
|
|
|
.admin-topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--su-space-4);
|
|
height: 64px;
|
|
padding: 0 var(--su-space-6);
|
|
border-bottom: 1px solid var(--su-border);
|
|
background-color: var(--su-bg-card);
|
|
}
|
|
|
|
.admin-main {
|
|
width: min(880px, calc(100% - 48px));
|
|
margin: 0 auto;
|
|
padding: var(--su-space-8) 0 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-row {
|
|
position: static;
|
|
width: 100%;
|
|
height: 36px;
|
|
transform: none;
|
|
}
|
|
|
|
.content {
|
|
padding-top: var(--su-space-4);
|
|
}
|
|
}
|
|
|
|
@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;
|
|
}
|
|
|
|
.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: 2px;
|
|
}
|
|
|
|
.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);
|
|
}
|
|
|
|
.cards-col-limit {
|
|
width: 140px;
|
|
}
|
|
|
|
.cards-table th,
|
|
.cards-table td {
|
|
padding: var(--su-space-2) var(--su-space-4);
|
|
}
|
|
|
|
@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;
|
|
}
|
|
|