Files
PolyWeather/frontend/components/docs/DocsLayout.module.css
T

398 lines
6.1 KiB
CSS
Raw Normal View History

.docsShell {
min-height: 100vh;
2026-06-06 19:52:27 +08:00
background:
linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
color: #0f172a;
}
.docsHeader {
position: sticky;
top: 0;
z-index: 40;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
2026-06-06 19:52:27 +08:00
padding: 16px 24px;
background: rgba(255, 255, 255, 0.94);
border-bottom: 1px solid #d9e3ef;
box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
backdrop-filter: blur(14px);
}
.brandWrap {
display: flex;
align-items: baseline;
gap: 12px;
}
.brandLink {
2026-06-06 19:52:27 +08:00
color: #0891b2;
font-size: 1.55rem;
font-weight: 800;
text-decoration: none;
}
.brandSubtitle {
2026-06-06 19:52:27 +08:00
color: #64748b;
font-size: 0.92rem;
}
.headerActions {
display: flex;
align-items: center;
gap: 10px;
}
.headerButton,
.headerGhost {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 38px;
padding: 0 14px;
border-radius: 999px;
2026-06-06 19:52:27 +08:00
border: 1px solid #cbd5e1;
background: #ffffff;
color: #334155;
text-decoration: none;
font-size: 0.92rem;
2026-06-06 19:52:27 +08:00
font-weight: 700;
cursor: pointer;
transition:
border-color 160ms ease,
color 160ms ease,
background 160ms ease;
}
2026-06-06 19:52:27 +08:00
.headerButton:hover,
.headerGhost:hover {
border-color: #38bdf8;
color: #075985;
background: #f0f9ff;
}
.langSwitch {
display: flex;
2026-06-06 19:52:27 +08:00
border: 1px solid #cbd5e1;
border-radius: 999px;
overflow: hidden;
2026-06-06 19:52:27 +08:00
background: #ffffff;
}
.langButton {
min-width: 54px;
min-height: 38px;
border: 0;
background: transparent;
2026-06-06 19:52:27 +08:00
color: #64748b;
font-weight: 800;
cursor: pointer;
}
.langButtonActive {
2026-06-06 19:52:27 +08:00
background: #e0f2fe;
color: #0369a1;
}
.docsFrame {
display: grid;
2026-06-06 19:52:27 +08:00
grid-template-columns: 260px minmax(0, 820px) 220px;
justify-content: center;
gap: 28px;
2026-06-06 19:52:27 +08:00
width: 100%;
max-width: 1440px;
margin: 0 auto;
padding: 24px;
}
.sidebar {
position: sticky;
2026-06-06 19:52:27 +08:00
top: 84px;
align-self: start;
2026-06-06 19:52:27 +08:00
max-height: calc(100vh - 108px);
overflow: auto;
2026-06-06 19:52:27 +08:00
padding: 16px;
border: 1px solid #d8e3ef;
border-radius: 16px;
background: #ffffff;
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}
.sidebarGroup + .sidebarGroup {
2026-06-06 19:52:27 +08:00
margin-top: 22px;
}
.sidebarTitle {
2026-06-06 19:52:27 +08:00
margin: 0 0 8px;
color: #64748b;
font-size: 0.78rem;
font-weight: 800;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.sidebarLink {
display: block;
2026-06-06 19:52:27 +08:00
margin-bottom: 4px;
padding: 9px 10px;
border-radius: 8px;
color: #334155;
text-decoration: none;
2026-06-06 19:52:27 +08:00
font-size: 0.94rem;
line-height: 1.35;
transition:
background 160ms ease,
color 160ms ease;
}
.sidebarLink:hover {
background: #f1f5f9;
color: #0f172a;
}
.sidebarLinkActive {
2026-06-06 19:52:27 +08:00
background: #e0f2fe;
color: #0369a1;
font-weight: 800;
}
.content {
min-width: 0;
}
.contentInner {
2026-06-06 19:52:27 +08:00
padding: 16px 0 56px;
}
.pageTitle {
margin: 0;
2026-06-06 19:52:27 +08:00
color: #0f172a;
font-size: clamp(2rem, 4vw, 3.05rem);
font-weight: 850;
line-height: 1.12;
}
.pageDescription {
2026-06-06 19:52:27 +08:00
max-width: 760px;
margin: 14px 0 0;
2026-06-06 19:52:27 +08:00
color: #475569;
font-size: 1.03rem;
line-height: 1.75;
}
.section {
margin-top: 40px;
2026-06-06 19:52:27 +08:00
scroll-margin-top: 104px;
}
.sectionTitle {
2026-06-06 19:52:27 +08:00
margin: 0 0 14px;
color: #1e293b;
font-size: 1.45rem;
font-weight: 800;
line-height: 1.25;
}
.paragraph {
2026-06-06 19:52:27 +08:00
margin: 0 0 15px;
color: #334155;
font-size: 1rem;
line-height: 1.85;
}
.callout {
2026-06-06 19:52:27 +08:00
margin: 20px 0;
padding: 18px 20px;
2026-06-06 19:52:27 +08:00
border: 1px solid #d8e3ef;
border-radius: 12px;
background: #ffffff;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.calloutInfo {
2026-06-06 19:52:27 +08:00
border-color: #bae6fd;
background: #f0f9ff;
}
.calloutWarning {
2026-06-06 19:52:27 +08:00
border-color: #fde68a;
background: #fffbeb;
}
.calloutSuccess {
2026-06-06 19:52:27 +08:00
border-color: #bbf7d0;
background: #f0fdf4;
}
.calloutTitle {
margin: 0 0 8px;
2026-06-06 19:52:27 +08:00
color: #0f172a;
font-size: 0.98rem;
2026-06-06 19:52:27 +08:00
font-weight: 800;
}
.calloutText {
margin: 0;
2026-06-06 19:52:27 +08:00
color: #334155;
line-height: 1.75;
}
.list {
2026-06-06 19:52:27 +08:00
margin: 0 0 16px;
padding-left: 22px;
color: #334155;
line-height: 1.8;
}
.list li + li {
margin-top: 8px;
}
.linkCard {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 42px;
padding: 0 16px;
border-radius: 999px;
2026-06-06 19:52:27 +08:00
border: 1px solid #38bdf8;
background: #e0f2fe;
color: #0369a1;
text-decoration: none;
2026-06-06 19:52:27 +08:00
font-weight: 800;
}
.linkCard:hover {
2026-06-06 19:52:27 +08:00
background: #bae6fd;
}
.linkCaption {
margin: 10px 0 0;
2026-06-06 19:52:27 +08:00
color: #64748b;
line-height: 1.7;
}
.toc {
position: sticky;
2026-06-06 19:52:27 +08:00
top: 84px;
align-self: start;
2026-06-06 19:52:27 +08:00
padding: 16px;
border: 1px solid #d8e3ef;
border-radius: 16px;
background: #ffffff;
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}
.tocTitle {
2026-06-06 19:52:27 +08:00
margin: 0 0 10px;
color: #64748b;
font-size: 0.78rem;
font-weight: 800;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.tocLink {
display: block;
2026-06-06 19:52:27 +08:00
padding: 5px 0;
color: #475569;
text-decoration: none;
2026-06-06 19:52:27 +08:00
line-height: 1.55;
font-size: 0.92rem;
}
2026-06-06 19:52:27 +08:00
.tocLink:hover {
color: #0369a1;
}
.mobileMenuButton {
display: none;
2026-06-06 19:52:27 +08:00
margin-bottom: 18px;
}
.mobileSidebarBackdrop {
display: none;
}
@media (max-width: 1200px) {
.docsFrame {
2026-06-06 19:52:27 +08:00
grid-template-columns: 240px minmax(0, 820px);
justify-content: start;
}
.toc {
display: none;
}
}
@media (max-width: 960px) {
.docsHeader {
align-items: flex-start;
flex-direction: column;
}
.docsFrame {
grid-template-columns: minmax(0, 1fr);
}
.mobileMenuButton {
display: inline-flex;
}
.sidebar {
position: fixed;
top: 0;
left: 0;
z-index: 60;
width: min(320px, 88vw);
height: 100vh;
max-height: none;
2026-06-06 19:52:27 +08:00
border-radius: 0 16px 16px 0;
transform: translateX(-100%);
transition: transform 180ms ease-out;
}
.sidebarOpen {
transform: translateX(0);
}
.mobileSidebarBackdrop {
position: fixed;
inset: 0;
z-index: 50;
2026-06-06 19:52:27 +08:00
background: rgba(15, 23, 42, 0.48);
display: block;
}
}
@media (max-width: 640px) {
.docsHeader {
2026-06-06 19:52:27 +08:00
padding: 14px 16px;
}
.docsFrame {
padding: 16px;
}
.brandWrap {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
2026-06-06 19:52:27 +08:00
.headerActions {
width: 100%;
justify-content: space-between;
}
.pageTitle {
font-size: 2rem;
}
.pageDescription,
.paragraph {
font-size: 1rem;
}
}