Files
PolyWeather/frontend/components/docs/DocsLayout.module.css
T
2026-06-06 21:46:23 +08:00

616 lines
10 KiB
CSS

.docsShell {
min-height: 100vh;
background:
linear-gradient(90deg, rgba(216, 224, 236, 0.38) 1px, transparent 1px),
linear-gradient(180deg, #f8fbff 0%, #eef4fb 54%, #f5f8fc 100%);
background-size: 44px 44px, auto;
color: var(--color-text-primary, #0f172a);
}
.docsHeader {
position: sticky;
top: 0;
z-index: 40;
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
min-height: 58px;
padding: 10px 24px;
border-bottom: 1px solid rgba(184, 196, 214, 0.74);
background: rgba(255, 255, 255, 0.9);
box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
backdrop-filter: blur(16px);
}
.brandWrap {
display: flex;
align-items: baseline;
gap: 12px;
min-width: 0;
}
.brandLink {
color: #0f172a;
font-size: 1.24rem;
font-weight: 850;
letter-spacing: 0;
text-decoration: none;
}
.brandLink::first-letter {
color: var(--color-accent-primary, #2563eb);
}
.brandSubtitle {
color: #64748b;
font-size: 0.88rem;
white-space: nowrap;
}
.headerActions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
}
.headerButton,
.headerGhost {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 38px;
padding: 0 13px;
border: 1px solid var(--color-border-default, #d8e0ec);
border-radius: 10px;
background: var(--color-bg-raised, #ffffff);
color: #1e293b;
text-decoration: none;
font-size: 0.9rem;
font-weight: 800;
cursor: pointer;
transition:
border-color 160ms ease,
color 160ms ease,
background 160ms ease,
box-shadow 160ms ease;
}
.headerButton:hover,
.headerGhost:hover {
border-color: #93c5fd;
color: #1d4ed8;
background: #eff6ff;
box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
}
.headerGhost svg,
.mobileMenuButton svg {
flex: 0 0 auto;
}
.langSwitch {
display: inline-flex;
align-items: center;
gap: 3px;
padding: 3px;
border: 1px solid var(--color-border-default, #d8e0ec);
border-radius: 10px;
background: #e8edf5;
}
.langButton {
min-width: 48px;
min-height: 32px;
padding: 0 9px;
border: 0;
border-radius: 8px;
background: transparent;
color: #64748b;
font-size: 0.82rem;
font-weight: 850;
cursor: pointer;
}
.langButtonActive {
background: #ffffff;
color: #0f172a;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.docsFrame {
display: grid;
grid-template-columns: 268px minmax(0, 850px) 226px;
justify-content: center;
gap: 24px;
width: 100%;
max-width: 1480px;
margin: 0 auto;
padding: 28px 24px 68px;
}
.sidebar {
position: sticky;
top: 82px;
align-self: start;
max-height: calc(100vh - 106px);
overflow: auto;
padding: 14px;
border: 1px solid rgba(184, 196, 214, 0.72);
border-radius: 10px;
background: #ffffff;
box-shadow: var(--shadow-elevation-2, 0 8px 24px rgba(15, 23, 42, 0.06));
}
.sidebarGroup + .sidebarGroup {
margin-top: 18px;
padding-top: 18px;
border-top: 1px solid #e8edf5;
}
.sidebarTitle {
margin: 0 0 8px;
padding: 0 8px;
color: #64748b;
font-size: 0.74rem;
font-weight: 850;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.sidebarLink {
position: relative;
display: block;
margin-bottom: 3px;
padding: 9px 10px 9px 14px;
border-radius: 8px;
color: #334155;
text-decoration: none;
font-size: 0.92rem;
font-weight: 650;
line-height: 1.35;
transition:
background 160ms ease,
color 160ms ease,
box-shadow 160ms ease;
}
.sidebarLink:hover {
background: #f1f5f9;
color: #0f172a;
}
.sidebarLinkActive {
background: #eff6ff;
color: #1d4ed8;
font-weight: 850;
box-shadow: inset 3px 0 0 var(--color-accent-primary, #2563eb);
}
.content {
min-width: 0;
}
.contentInner {
padding: 0 0 52px;
}
.pageIntro {
padding: 28px 30px;
border: 1px solid rgba(184, 196, 214, 0.72);
border-radius: 12px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
box-shadow: var(--shadow-elevation-2, 0 8px 24px rgba(15, 23, 42, 0.06));
}
.introKicker {
display: inline-flex;
align-items: center;
gap: 8px;
margin: 0 0 14px;
color: #047857;
font-size: 0.78rem;
font-weight: 900;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.introKicker svg {
color: #00897b;
}
.pageTitle {
margin: 0;
color: #0f172a;
font-size: clamp(2rem, 3vw, 2.72rem);
font-weight: 850;
letter-spacing: 0;
line-height: 1.1;
}
.pageDescription {
max-width: 760px;
margin: 14px 0 0;
color: #475569;
font-size: 1.02rem;
line-height: 1.75;
}
.pageMeta {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 18px;
}
.pageMeta span {
display: inline-flex;
align-items: center;
min-height: 30px;
padding: 0 10px;
border: 1px solid #dbeafe;
border-radius: 8px;
background: #eff6ff;
color: #1d4ed8;
font-size: 0.78rem;
font-weight: 850;
}
.section {
margin-top: 0;
padding: 34px 2px 30px;
border-bottom: 1px solid rgba(216, 224, 236, 0.78);
scroll-margin-top: 92px;
}
.section:last-child {
border-bottom: 0;
}
.sectionTitle {
position: relative;
margin: 0 0 16px;
padding-left: 14px;
color: #172033;
font-size: 1.34rem;
font-weight: 850;
letter-spacing: 0;
line-height: 1.3;
}
.sectionTitle::before {
content: "";
position: absolute;
left: 0;
top: 0.16em;
bottom: 0.16em;
width: 4px;
border-radius: 4px;
background: linear-gradient(180deg, #2563eb, #00897b);
}
.paragraph {
max-width: 780px;
margin: 0 0 15px;
color: #334155;
font-size: 1rem;
line-height: 1.85;
}
.callout {
position: relative;
max-width: 790px;
margin: 20px 0;
padding: 17px 18px 17px 20px;
border: 1px solid #d8e0ec;
border-left-width: 4px;
border-radius: 10px;
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
.calloutInfo {
border-left-color: var(--color-accent-primary, #2563eb);
background: #f5f9ff;
}
.calloutWarning {
border-left-color: #d97706;
background: #fffaf0;
}
.calloutSuccess {
border-left-color: #00897b;
background: #f0fdfa;
}
.calloutTitle {
margin: 0 0 7px;
color: #0f172a;
font-size: 0.98rem;
font-weight: 850;
}
.calloutText {
margin: 0;
color: #334155;
line-height: 1.75;
}
.list {
max-width: 800px;
margin: 0 0 18px;
padding: 0;
color: #334155;
line-height: 1.75;
}
.list li + li {
margin-top: 9px;
}
.bulletList {
list-style: none;
}
.bulletList li {
position: relative;
padding-left: 22px;
}
.bulletList li::before {
content: "";
position: absolute;
left: 3px;
top: 0.72em;
width: 7px;
height: 7px;
border-radius: 999px;
background: #00897b;
box-shadow: 0 0 0 4px rgba(0, 137, 123, 0.1);
}
.stepList {
list-style: none;
counter-reset: docs-step;
}
.stepList li {
counter-increment: docs-step;
display: grid;
grid-template-columns: 32px minmax(0, 1fr);
gap: 12px;
align-items: start;
padding: 12px 14px;
border: 1px solid rgba(216, 224, 236, 0.88);
border-radius: 10px;
background: rgba(255, 255, 255, 0.72);
}
.stepList li::before {
content: counter(docs-step);
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 8px;
background: #0f172a;
color: #ffffff;
font-size: 0.76rem;
font-weight: 900;
font-variant-numeric: tabular-nums;
}
.linkCard {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 42px;
padding: 0 15px;
border: 1px solid #93c5fd;
border-radius: 10px;
background: #eff6ff;
color: #1d4ed8;
text-decoration: none;
font-weight: 850;
}
.linkCard::after {
content: "->";
margin-left: 8px;
font-family: var(--font-mono, monospace);
}
.linkCard:hover {
border-color: #60a5fa;
background: #dbeafe;
}
.linkCaption {
margin: 10px 0 0;
color: #64748b;
line-height: 1.7;
}
.content figure {
max-width: 800px;
margin: 22px 0;
}
.content img {
display: block;
width: 100%;
height: auto;
border: 1px solid #d8e0ec;
border-radius: 10px;
background: #ffffff;
}
.content figcaption {
margin-top: 9px;
color: #64748b;
font-size: 0.9rem;
line-height: 1.6;
}
.toc {
position: sticky;
top: 82px;
align-self: start;
padding: 14px;
border: 1px solid rgba(184, 196, 214, 0.72);
border-radius: 10px;
background: #ffffff;
box-shadow: var(--shadow-elevation-1, 0 1px 3px rgba(15, 23, 42, 0.05));
}
.tocTitle {
margin: 0 0 10px;
color: #64748b;
font-size: 0.74rem;
font-weight: 850;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.tocLink {
display: block;
padding: 7px 0 7px 12px;
border-left: 2px solid #e8edf5;
color: #475569;
text-decoration: none;
line-height: 1.45;
font-size: 0.88rem;
}
.tocLink:hover {
border-left-color: #2563eb;
color: #1d4ed8;
}
.mobileMenuButton {
display: none;
margin-bottom: 14px;
}
.mobileSidebarBackdrop {
display: none;
}
@media (max-width: 1200px) {
.docsFrame {
grid-template-columns: 248px minmax(0, 850px);
justify-content: start;
}
.toc {
display: none;
}
}
@media (max-width: 960px) {
.docsHeader {
align-items: flex-start;
flex-direction: column;
gap: 10px;
}
.docsFrame {
grid-template-columns: minmax(0, 1fr);
padding-top: 18px;
}
.mobileMenuButton {
display: inline-flex;
}
.sidebar {
position: fixed;
top: 0;
left: 0;
z-index: 60;
width: min(326px, 88vw);
height: 100vh;
height: 100dvh;
max-height: none;
padding: 18px 14px;
border-radius: 0 10px 10px 0;
transform: translateX(-100%);
transition: transform 180ms ease-out;
}
.sidebarOpen {
transform: translateX(0);
}
.mobileSidebarBackdrop {
position: fixed;
inset: 0;
z-index: 50;
display: block;
border: 0;
background: rgba(15, 23, 42, 0.48);
}
}
@media (max-width: 640px) {
.docsHeader {
padding: 12px 14px;
}
.brandWrap {
flex-direction: column;
align-items: flex-start;
gap: 2px;
}
.brandSubtitle {
white-space: normal;
}
.headerActions {
width: 100%;
align-items: stretch;
justify-content: space-between;
}
.headerGhost,
.langSwitch {
flex: 1 1 auto;
}
.langSwitch {
justify-content: center;
}
.docsFrame {
padding: 14px 14px 48px;
}
.pageIntro {
padding: 22px 18px;
}
.pageTitle {
font-size: 1.9rem;
}
.pageDescription,
.paragraph {
font-size: 0.98rem;
}
.section {
padding: 28px 0 26px;
}
.stepList li {
grid-template-columns: 30px minmax(0, 1fr);
padding: 11px 12px;
}
}