Skip to content

Commit 4c9ef55

Browse files
committed
docs: refine docs site shell and hero layout
1 parent 00d2686 commit 4c9ef55

2 files changed

Lines changed: 30 additions & 3 deletions

File tree

website/app/globals.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
--site-gold: #dfb567;
1818
--site-gold-strong: #f2d081;
1919
--site-line: rgba(223, 181, 103, 0.18);
20+
--site-shell-max: 120rem;
2021
--site-scrollbar-track: rgba(255, 243, 208, 0.035);
2122
--site-scrollbar-thumb: rgba(223, 181, 103, 0.56);
2223
--site-scrollbar-thumb-strong: rgba(242, 208, 129, 0.76);
@@ -258,6 +259,24 @@ html[data-theme="dark"] .nextra-sidebar {
258259
}
259260
}
260261

262+
@media (min-width: 2000px) {
263+
html.dark nav[class*="x:max-w-(--nextra-content-width)"],
264+
html[data-theme="dark"] nav[class*="x:max-w-(--nextra-content-width)"] {
265+
width: min(100%, var(--site-shell-max));
266+
max-width: var(--site-shell-max) !important;
267+
margin-left: auto;
268+
margin-right: auto;
269+
}
270+
271+
html.dark body > div[class*="x:max-w-(--nextra-content-width)"],
272+
html[data-theme="dark"] body > div[class*="x:max-w-(--nextra-content-width)"] {
273+
width: min(100%, var(--site-shell-max));
274+
max-width: var(--site-shell-max) !important;
275+
margin-left: auto;
276+
margin-right: auto;
277+
}
278+
}
279+
261280
html.dark .nextra-body-typesetting-article h1,
262281
html.dark .nextra-body-typesetting-default h1,
263282
html.dark .nextra-body-typesetting-article h2,

website/app/page.module.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
display: grid;
33
gap: 3rem;
44
padding: 3rem 1.5rem 4rem;
5+
width: min(100%, var(--site-shell-max));
6+
margin: 0 auto;
57
}
68

79
.hero {
810
position: relative;
911
display: grid;
1012
gap: 2rem;
1113
grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
12-
align-items: start;
14+
align-items: center;
1315
padding: 1.5rem 0 0.75rem;
1416
}
1517

@@ -139,13 +141,15 @@
139141

140142
.heroPanel {
141143
display: grid;
142-
align-items: start;
143-
padding-top: 1.25rem;
144+
align-self: center;
145+
align-items: center;
146+
justify-items: end;
144147
}
145148

146149
.codeCard {
147150
position: relative;
148151
overflow: hidden;
152+
width: min(100%, 48rem);
149153
border: 1px solid rgba(223, 181, 103, 0.22);
150154
border-radius: 1.6rem;
151155
background:
@@ -299,6 +303,10 @@
299303
grid-template-columns: 1fr;
300304
}
301305

306+
.heroPanel {
307+
justify-items: stretch;
308+
}
309+
302310
.points {
303311
grid-template-columns: 1fr;
304312
}

0 commit comments

Comments
 (0)