feat: stash-ui 0.1.0(40 个组件 + 文档站 + 主题机制)
This commit is contained in:
@@ -0,0 +1,333 @@
|
||||
/* 拼装示例的页面级布局:只做排版,不重写组件样式 */
|
||||
|
||||
.page {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
|
||||
/* 顶部柔光:浅色下是蓝/橙/绿三团,深色下自动变淡 */
|
||||
.glow {
|
||||
position: fixed;
|
||||
inset: 0 0 auto;
|
||||
height: 420px;
|
||||
pointer-events: none;
|
||||
background:
|
||||
radial-gradient(560px 240px at 18% 0%, rgba(56, 88, 246, 0.18), transparent 70%),
|
||||
radial-gradient(520px 220px at 72% -6%, rgba(255, 186, 58, 0.16), transparent 72%),
|
||||
radial-gradient(460px 240px at 96% 6%, rgba(74, 189, 134, 0.14), transparent 70%);
|
||||
mask-image: linear-gradient(to bottom, #000 40%, transparent);
|
||||
}
|
||||
|
||||
.header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: var(--su-z-header);
|
||||
border-bottom: 1px solid transparent;
|
||||
backdrop-filter: blur(12px);
|
||||
background: color-mix(in srgb, var(--su-bg-page) 72%, transparent);
|
||||
}
|
||||
|
||||
.headerInner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--su-space-6);
|
||||
max-width: 1280px;
|
||||
height: 64px;
|
||||
margin: 0 auto;
|
||||
padding: 0 var(--su-space-6);
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--su-space-2);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.brandMark {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: var(--su-radius-sm);
|
||||
background-image: linear-gradient(135deg, #4d6bff, var(--su-color-primary));
|
||||
color: var(--su-white);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.brandName {
|
||||
font-size: var(--su-font-size-lg);
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
gap: var(--su-space-1);
|
||||
}
|
||||
|
||||
.navLink {
|
||||
padding: 6px var(--su-space-3);
|
||||
border-radius: var(--su-radius-sm);
|
||||
font-size: var(--su-font-size-md);
|
||||
color: var(--su-text-sub);
|
||||
transition:
|
||||
color var(--su-duration-base) var(--su-ease-in-out),
|
||||
background-color var(--su-duration-base) var(--su-ease-in-out);
|
||||
}
|
||||
|
||||
.navLink:hover {
|
||||
background-color: var(--su-bg-subtle);
|
||||
color: var(--su-text-main);
|
||||
}
|
||||
|
||||
.navLinkActive {
|
||||
background-color: var(--su-color-primary-soft);
|
||||
color: var(--su-color-primary);
|
||||
}
|
||||
|
||||
.headerActions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--su-space-2);
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* 导航收进抽屉时,页头出现菜单按钮 */
|
||||
.onlyMobile {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.drawerNav {
|
||||
display: block;
|
||||
padding: var(--su-space-2) var(--su-space-3);
|
||||
border-radius: var(--su-radius-sm);
|
||||
font-size: var(--su-font-size-md);
|
||||
color: var(--su-text-sub);
|
||||
}
|
||||
|
||||
.drawerNavActive {
|
||||
background-color: var(--su-color-primary-soft);
|
||||
color: var(--su-color-primary);
|
||||
font-weight: var(--su-font-weight-bold);
|
||||
}
|
||||
|
||||
.layout {
|
||||
display: grid;
|
||||
grid-template-columns: 260px minmax(0, 1fr) 300px;
|
||||
gap: var(--su-space-5);
|
||||
align-items: start;
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: var(--su-space-6);
|
||||
}
|
||||
|
||||
.rail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--su-space-4);
|
||||
}
|
||||
|
||||
.feed {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--su-space-4);
|
||||
}
|
||||
|
||||
.profile {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--su-space-2);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.profileName {
|
||||
font-size: var(--su-font-size-lg);
|
||||
line-height: var(--su-line-height-lg);
|
||||
font-weight: var(--su-font-weight-bold);
|
||||
}
|
||||
|
||||
.profileBio {
|
||||
margin-top: var(--su-space-2);
|
||||
font-size: var(--su-font-size-sm);
|
||||
line-height: var(--su-line-height-sm);
|
||||
color: var(--su-text-sub);
|
||||
}
|
||||
|
||||
.profileMeta {
|
||||
font-size: var(--su-font-size-xs);
|
||||
color: var(--su-text-muted);
|
||||
}
|
||||
|
||||
.statLabel {
|
||||
display: block;
|
||||
font-size: var(--su-font-size-xs);
|
||||
color: var(--su-text-sub);
|
||||
}
|
||||
|
||||
.statValue {
|
||||
display: block;
|
||||
margin-top: var(--su-space-2);
|
||||
font-size: var(--su-font-size-xl);
|
||||
line-height: var(--su-line-height-xl);
|
||||
font-weight: var(--su-font-weight-bold);
|
||||
}
|
||||
|
||||
.cardTitle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--su-space-2);
|
||||
margin-bottom: var(--su-space-3);
|
||||
font-size: var(--su-font-size-lg);
|
||||
line-height: var(--su-line-height-lg);
|
||||
font-weight: var(--su-font-weight-bold);
|
||||
}
|
||||
|
||||
.authorName {
|
||||
font-size: var(--su-font-size-md);
|
||||
font-weight: var(--su-font-weight-bold);
|
||||
}
|
||||
|
||||
.meta {
|
||||
font-size: var(--su-font-size-xs);
|
||||
color: var(--su-text-muted);
|
||||
}
|
||||
|
||||
.postTitle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--su-space-2);
|
||||
margin: var(--su-space-3) 0 var(--su-space-2);
|
||||
font-size: var(--su-font-size-lg);
|
||||
line-height: var(--su-line-height-lg);
|
||||
font-weight: var(--su-font-weight-bold);
|
||||
}
|
||||
|
||||
.excerpt {
|
||||
margin-bottom: var(--su-space-3);
|
||||
font-size: var(--su-font-size-md);
|
||||
line-height: var(--su-line-height-md);
|
||||
color: var(--su-text-sub);
|
||||
}
|
||||
|
||||
.media {
|
||||
margin-bottom: var(--su-space-3);
|
||||
}
|
||||
|
||||
.tile {
|
||||
display: block;
|
||||
aspect-ratio: 16 / 10;
|
||||
border-radius: var(--su-radius-sm);
|
||||
}
|
||||
|
||||
.tileA {
|
||||
background-image: linear-gradient(135deg, #3858f6, #7c3aed);
|
||||
}
|
||||
|
||||
.tileB {
|
||||
background-image: linear-gradient(135deg, #ff8338, #ff3e3e);
|
||||
}
|
||||
|
||||
.action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--su-space-1);
|
||||
font-size: var(--su-font-size-sm);
|
||||
color: var(--su-text-sub);
|
||||
}
|
||||
|
||||
.pageInfo {
|
||||
font-size: var(--su-font-size-sm);
|
||||
color: var(--su-text-muted);
|
||||
}
|
||||
|
||||
.hotList {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.hotItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--su-space-2);
|
||||
padding: var(--su-space-2) 0;
|
||||
font-size: var(--su-font-size-sm);
|
||||
color: var(--su-text-sub);
|
||||
transition: color var(--su-duration-base) var(--su-ease-in-out);
|
||||
}
|
||||
|
||||
.hotItem:hover {
|
||||
color: var(--su-color-primary);
|
||||
}
|
||||
|
||||
.hotTitle {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.thumb {
|
||||
display: block;
|
||||
aspect-ratio: 1;
|
||||
border-radius: var(--su-radius-sm);
|
||||
}
|
||||
|
||||
.thumb1 {
|
||||
background-image: linear-gradient(135deg, #3858f6, #22d3ee);
|
||||
}
|
||||
|
||||
.thumb2 {
|
||||
background-image: linear-gradient(135deg, #ff8338, #ffba3a);
|
||||
}
|
||||
|
||||
.thumb3 {
|
||||
background-image: linear-gradient(135deg, #4abd86, #0ea5e9);
|
||||
}
|
||||
|
||||
.thumb4 {
|
||||
background-image: linear-gradient(135deg, #7c3aed, #db2777);
|
||||
}
|
||||
|
||||
.thumb5 {
|
||||
background-image: linear-gradient(135deg, #f59e0b, #ef4444);
|
||||
}
|
||||
|
||||
.thumb6 {
|
||||
background-image: linear-gradient(135deg, #0ea5e9, #6366f1);
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.layout {
|
||||
grid-template-columns: 240px minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.railRight {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 820px) {
|
||||
.nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onlyMobile {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.layout {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.rail {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.headerInner {
|
||||
gap: var(--su-space-3);
|
||||
padding: 0 var(--su-space-4);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user