navmini/weapp/pages/index/index.wxss
eric 518410edd0 feat: 游民导航 H5、微信小程序与小红书小工具
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-27 12:15:00 -05:00

540 lines
8.8 KiB
Plaintext

.topbar {
position: fixed;
left: 0;
right: 0;
top: 0;
z-index: 40;
background: var(--topbar-bg);
backdrop-filter: blur(16px);
border-bottom: 1rpx solid var(--line);
}
.topbar-inner {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20rpx 0 12rpx;
gap: 12rpx;
}
.icon-btn {
width: 72rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 20rpx;
flex-shrink: 0;
}
.icon-btn-hover {
background: var(--chip);
}
.menu-bars {
width: 36rpx;
display: flex;
flex-direction: column;
gap: 8rpx;
}
.menu-bars .bar {
height: 4rpx;
border-radius: 4rpx;
background: var(--ink);
}
.menu-bars .bar.short {
width: 70%;
}
.theme-ico,
.close-ico {
font-size: 36rpx;
line-height: 1;
color: var(--ink);
}
.close-ico {
font-size: 48rpx;
font-weight: 300;
}
.brand-mark {
flex: 1;
display: flex;
align-items: center;
gap: 14rpx;
min-width: 0;
}
.brand-logo {
width: 56rpx;
height: 56rpx;
border-radius: 14rpx;
flex-shrink: 0;
background: var(--surface-solid);
}
.brand-text {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
gap: 4rpx;
min-width: 0;
}
.brand-name {
font-size: 30rpx;
font-weight: 700;
color: var(--ink);
line-height: 1.2;
letter-spacing: -0.02em;
}
.brand-current {
font-size: 22rpx;
font-weight: 600;
color: var(--accent);
line-height: 1.25;
letter-spacing: -0.01em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
}
.page {
padding: 16rpx 28rpx 120rpx;
max-width: 1120rpx;
margin: 0 auto;
}
.cat-panel {
margin-top: 8rpx;
padding-top: 20rpx;
}
.cat-heading {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 16rpx;
margin-bottom: 18rpx;
padding: 0 4rpx;
}
.cat-title {
font-size: 34rpx;
font-weight: 800;
color: var(--ink);
}
.cat-count {
font-size: 22rpx;
font-weight: 700;
color: var(--ink-faint);
background: var(--chip);
padding: 4rpx 14rpx;
border-radius: 999rpx;
}
.group-block {
margin-bottom: 22rpx;
}
.group-title {
display: block;
font-size: 24rpx;
font-weight: 700;
color: var(--ink-muted);
margin: 0 4rpx 14rpx;
}
.link-grid {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
}
.link-card {
width: calc((100% - 24rpx) / 3);
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 12rpx;
padding: 18rpx 14rpx;
border-radius: 22rpx;
background: var(--surface-solid);
box-shadow: var(--shadow-card);
border: 1rpx solid var(--line);
}
.link-card-hover {
opacity: 0.88;
transform: scale(0.98);
}
.link-icon-wrap {
width: 56rpx;
height: 56rpx;
border-radius: 16rpx;
background: var(--chip);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.link-icon {
width: 40rpx;
height: 40rpx;
}
.link-meta {
display: flex;
flex-direction: column;
gap: 4rpx;
min-width: 0;
width: 100%;
}
.link-title {
font-size: 24rpx;
font-weight: 700;
color: var(--ink);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.link-desc {
font-size: 20rpx;
color: var(--ink-faint);
line-height: 1.35;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.footer {
margin-top: 48rpx;
text-align: center;
font-size: 22rpx;
color: var(--ink-faint);
padding-bottom: env(safe-area-inset-bottom);
}
/* Drawer */
.drawer-root {
position: fixed;
inset: 0;
z-index: 60;
pointer-events: none;
visibility: hidden;
}
.drawer-root.open {
pointer-events: auto;
visibility: visible;
}
.drawer-mask {
position: absolute;
inset: 0;
background: rgba(10, 15, 20, 0.45);
opacity: 0;
transition: opacity 0.25s ease;
}
.drawer-root.open .drawer-mask {
opacity: 1;
}
.drawer-panel {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: min(78vw, 560rpx);
background: var(--bg-elevated);
box-shadow: var(--shadow);
transform: translateX(-105%);
transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
display: flex;
flex-direction: column;
}
.drawer-root.open .drawer-panel {
transform: translateX(0);
}
.drawer-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12rpx;
padding: 16rpx 20rpx 20rpx;
border-bottom: 1rpx solid var(--line);
}
.drawer-brand-wrap {
display: flex;
align-items: center;
gap: 14rpx;
min-width: 0;
padding-top: 8rpx;
}
.drawer-logo {
width: 56rpx;
height: 56rpx;
border-radius: 14rpx;
background: var(--surface-solid);
flex-shrink: 0;
}
.drawer-brand {
display: block;
font-size: 30rpx;
font-weight: 800;
color: var(--ink);
}
.drawer-sub {
display: block;
margin-top: 4rpx;
font-size: 22rpx;
color: var(--ink-muted);
line-height: 1.35;
}
.drawer-nav {
flex: 1;
height: 0;
padding: 16rpx 14rpx 40rpx;
}
.drawer-item {
display: flex;
align-items: center;
gap: 16rpx;
padding: 20rpx 18rpx;
border-radius: 18rpx;
margin-bottom: 8rpx;
}
.drawer-item-hover {
background: var(--chip);
}
.drawer-item.active {
background: var(--chip-active);
}
.drawer-item.active .drawer-item-title,
.drawer-item.active .drawer-item-count,
.drawer-item.active .drawer-emoji {
color: var(--chip-active-ink);
}
.drawer-emoji {
font-size: 28rpx;
width: 40rpx;
text-align: center;
flex-shrink: 0;
}
.drawer-item-text {
min-width: 0;
display: flex;
flex-direction: column;
gap: 4rpx;
}
.drawer-item-title {
font-size: 28rpx;
font-weight: 700;
color: var(--ink);
}
.drawer-item-count {
font-size: 22rpx;
color: var(--ink-faint);
}
/* Sheet */
.sheet-root {
position: fixed;
inset: 0;
z-index: 70;
display: flex;
align-items: flex-end;
justify-content: center;
}
.sheet-mask {
position: absolute;
inset: 0;
background: rgba(10, 15, 20, 0.5);
}
.sheet-panel {
position: relative;
width: 100%;
max-width: 1120rpx;
background: var(--surface-solid);
border-radius: 28rpx 28rpx 0 0;
padding: 32rpx 28rpx calc(28rpx + env(safe-area-inset-bottom));
box-shadow: var(--shadow);
}
.sheet-head {
display: flex;
align-items: center;
gap: 18rpx;
margin-bottom: 24rpx;
}
.sheet-icon {
width: 72rpx;
height: 72rpx;
border-radius: 18rpx;
background: var(--chip);
flex-shrink: 0;
}
.sheet-titles {
min-width: 0;
display: flex;
flex-direction: column;
gap: 6rpx;
}
.sheet-title {
font-size: 32rpx;
font-weight: 800;
color: var(--ink);
}
.sheet-sub {
font-size: 24rpx;
color: var(--ink-muted);
line-height: 1.4;
}
.sheet-label {
font-size: 22rpx;
font-weight: 700;
color: var(--ink-faint);
letter-spacing: 0.04em;
text-transform: uppercase;
margin-bottom: 10rpx;
}
.sheet-url {
padding: 20rpx 18rpx;
border-radius: 18rpx;
background: var(--accent-soft);
border: 2rpx solid rgba(13, 143, 123, 0.35);
font-size: 24rpx;
color: var(--ink);
word-break: break-all;
line-height: 1.5;
user-select: text;
}
.sheet-actions {
display: flex;
gap: 14rpx;
margin-top: 24rpx;
}
.sheet-btn {
flex: 1;
min-height: 88rpx;
border-radius: 18rpx;
border: 1rpx solid var(--line) !important;
background: var(--chip) !important;
font-size: 28rpx !important;
font-weight: 700;
color: var(--ink) !important;
display: flex;
align-items: center;
justify-content: center;
}
.sheet-btn.primary {
flex: 1.6;
background: linear-gradient(180deg, #12a08a, var(--accent-deep)) !important;
color: #fff !important;
border-color: transparent !important;
}
.sheet-hint {
margin-top: 18rpx;
font-size: 22rpx;
color: var(--ink-faint);
text-align: center;
line-height: 1.4;
}
.back-top {
position: fixed;
right: 28rpx;
bottom: calc(48rpx + env(safe-area-inset-bottom));
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: var(--surface-solid);
box-shadow: var(--shadow);
border: 1rpx solid var(--line);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transform: translateY(12rpx);
transition: opacity 0.2s ease, transform 0.2s ease;
z-index: 35;
font-size: 32rpx;
font-weight: 700;
color: var(--ink);
}
.back-top.show {
opacity: 1;
pointer-events: auto;
transform: translateY(0);
}
.back-top-hover {
opacity: 0.85;
}
.toast {
position: fixed;
left: 50%;
bottom: calc(56rpx + env(safe-area-inset-bottom));
transform: translateX(-50%) translateY(16rpx);
padding: 14rpx 28rpx;
border-radius: 999rpx;
background: var(--toast-bg);
color: var(--toast-ink);
font-size: 24rpx;
font-weight: 600;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease;
z-index: 80;
max-width: 80vw;
text-align: center;
}
.toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}