Skip to content

Commit 52b9187

Browse files
committed
Center content on larger screens
1 parent 5084392 commit 52b9187

File tree

8 files changed

+152
-11
lines changed

8 files changed

+152
-11
lines changed

docusaurus.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export default {
154154
includeCurrentVersion: false,
155155
lastVersion: '6.x',
156156
breadcrumbs: false,
157+
sidebarCollapsed: false,
157158
remarkPlugins: [[remarkNpm2Yarn, { sync: true }]],
158159
rehypePlugins: [
159160
[rehypeCodeblockMeta, { match: { snack: true, lang: true } }],

src/css/custom.css

Lines changed: 133 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
--ifm-home-color-black: #25292e;
7272
--ifm-home-color-white: #f7f7ff;
7373

74+
--ifm-toc-border-color: var(--ifm-color-gray-200);
7475
--ifm-menu-color-background-active: rgba(107, 82, 174, 0.1);
7576
--docusaurus-highlighted-code-line-bg: rgba(107, 82, 174, 0.1);
7677

@@ -128,6 +129,95 @@
128129
--docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.07);
129130
}
130131

132+
h1 {
133+
font-size: 2.618rem;
134+
letter-spacing: -0.02em;
135+
line-height: 1.618;
136+
margin-bottom: 0.5rem;
137+
}
138+
139+
h2 {
140+
font-size: 1.618rem;
141+
letter-spacing: -0.02em;
142+
font-weight: 700;
143+
line-height: 1.618;
144+
margin: 2.618rem 0 0 -0.09rem;
145+
}
146+
147+
h3 {
148+
font-size: 1.382rem;
149+
letter-spacing: -0.01em;
150+
font-weight: 700;
151+
line-height: 1.618;
152+
margin: 1.618rem 0 0 0;
153+
}
154+
155+
h4 {
156+
font-size: 1.145rem;
157+
font-weight: 700;
158+
line-height: 1.618;
159+
margin: 1.618rem 0 0 0;
160+
}
161+
162+
h5 {
163+
font-size: 1rem;
164+
font-weight: 700;
165+
line-height: 1.618;
166+
margin: 1.618rem 0 0 0;
167+
}
168+
169+
h6 {
170+
font-size: 0.85rem;
171+
font-weight: 700;
172+
line-height: 1.618;
173+
margin: 1.618rem 0 0 0;
174+
}
175+
176+
p {
177+
font-size: 1rem;
178+
line-height: 1.75;
179+
}
180+
181+
@media (min-width: 82.5rem) {
182+
.main-wrapper:not(.full-width),
183+
.navbar__inner,
184+
footer .container {
185+
max-width: 82.5rem;
186+
margin: auto;
187+
}
188+
189+
.main-wrapper:not(.full-width) main {
190+
padding: 2rem 0 2rem 2rem;
191+
}
192+
193+
.main-wrapper:not(.full-width) .container > .row > :first-child {
194+
padding-right: 1rem;
195+
}
196+
}
197+
198+
@media (min-width: 95rem) {
199+
.main-wrapper:not(.full-width) main {
200+
padding: 3rem 0 3rem 4rem;
201+
}
202+
203+
.main-wrapper:not(.full-width) .container > .row > :first-child {
204+
padding-right: 3rem;
205+
}
206+
}
207+
208+
footer {
209+
border-top: 1px solid var(--ifm-toc-border-color);
210+
}
211+
212+
.navbar {
213+
padding: 0;
214+
}
215+
216+
.navbar__inner {
217+
padding: var(--ifm-navbar-padding-vertical)
218+
var(--ifm-navbar-padding-horizontal);
219+
}
220+
131221
.menu {
132222
font-size: 93.75%;
133223
font-weight: var(--ifm-font-weight-normal);
@@ -137,28 +227,61 @@
137227
background: transparent;
138228
}
139229

230+
.menu > .menu__list > .menu__list-item > .menu__list {
231+
padding-left: 0;
232+
}
233+
234+
.menu > .menu__list > .menu__list-item {
235+
padding-top: 0.5rem;
236+
padding-bottom: 0.5rem;
237+
}
238+
239+
.menu > .menu__list > .menu__list-item:not(:last-child) {
240+
border-bottom: 1px solid var(--ifm-toc-border-color);
241+
}
242+
243+
@media (min-width: 85rem) {
244+
.menu > .menu__list > .menu__list-item {
245+
padding-top: 1.5rem;
246+
padding-bottom: 1.5rem;
247+
}
248+
}
249+
250+
.menu__list {
251+
position: relative;
252+
}
253+
254+
.menu__list .menu__list .menu__list-item-collapsible + .menu__list:before {
255+
content: '';
256+
position: absolute;
257+
width: 1px;
258+
height: 100%;
259+
background-color: var(--ifm-toc-border-color);
260+
}
261+
262+
.menu__list .menu__list .menu__list-item-collapsible + .menu__list > li {
263+
margin-left: 5px;
264+
}
265+
140266
.menu__list-item-collapsible > .menu__link {
141-
font-weight: var(--ifm-font-weight-semibold);
267+
font-weight: var(--ifm-font-weight-bold);
142268
color: var(--ifm-color-emphasis-1000);
143269
}
144270

145271
.menu__list-item-collapsible > .menu__link--active {
146-
color: var(--ifm-color-primary);
272+
color: var(--ifm-color-emphasis-1000);
273+
}
274+
275+
.menu__link {
276+
border-top-right-radius: 0;
277+
border-bottom-right-radius: 0;
147278
}
148279

149280
.menu__link--sublist-caret:after {
150281
background: var(--ifm-menu-link-sublist-icon) 50% / 1.25rem 1.25rem;
151282
opacity: 0.5;
152283
}
153284

154-
.theme-doc-sidebar-container {
155-
border-right: none !important;
156-
}
157-
158-
.table-of-contents__left-border {
159-
border-left: none;
160-
}
161-
162285
.pagination-nav__link {
163286
border: none;
164287
}

src/pages/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ function Home() {
4444
const { siteConfig = {} } = context;
4545

4646
return (
47-
<Layout title={siteConfig.title} description={siteConfig.tagline}>
47+
<Layout
48+
title={siteConfig.title}
49+
description={siteConfig.tagline}
50+
wrapperClassName="full-width"
51+
>
4852
<Splash />
4953
<Features />
5054
<Sponsors />

versioned_sidebars/version-3.x-sidebars.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"navigation-events",
4545
{
4646
"type": "category",
47+
"collapsible": true,
4748
"label": "Navigators",
4849
"items": [
4950
"stack-navigator",
@@ -57,6 +58,7 @@
5758
},
5859
{
5960
"type": "category",
61+
"collapsible": true,
6062
"label": "Actions",
6163
"items": [
6264
"navigation-actions",
@@ -67,6 +69,7 @@
6769
},
6870
{
6971
"type": "category",
72+
"collapsible": true,
7073
"label": "Helpers",
7174
"items": ["with-navigation", "with-navigation-focus", "scrollables"]
7275
}

versioned_sidebars/version-4.x-sidebars.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"navigation-events",
4747
{
4848
"type": "category",
49+
"collapsible": true,
4950
"label": "Navigators",
5051
"items": [
5152
"stack-navigator",
@@ -60,6 +61,7 @@
6061
},
6162
{
6263
"type": "category",
64+
"collapsible": true,
6365
"label": "Actions",
6466
"items": [
6567
"navigation-actions",
@@ -70,6 +72,7 @@
7072
},
7173
{
7274
"type": "category",
75+
"collapsible": true,
7376
"label": "Helpers",
7477
"items": ["with-navigation", "with-navigation-focus", "scrollables"]
7578
}

versioned_sidebars/version-5.x-sidebars.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"devtools",
5858
{
5959
"type": "category",
60+
"collapsible": true,
6061
"label": "Navigators",
6162
"items": [
6263
"stack-navigator",
@@ -69,6 +70,7 @@
6970
},
7071
{
7172
"type": "category",
73+
"collapsible": true,
7274
"label": "Hooks",
7375
"items": [
7476
"use-navigation",
@@ -86,6 +88,7 @@
8688
},
8789
{
8890
"type": "category",
91+
"collapsible": true,
8992
"label": "Actions",
9093
"items": [
9194
"navigation-actions",

versioned_sidebars/version-6.x-sidebars.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"link",
6767
{
6868
"type": "category",
69+
"collapsible": true,
6970
"label": "Hooks",
7071
"items": [
7172
"use-navigation",
@@ -82,6 +83,7 @@
8283
},
8384
{
8485
"type": "category",
86+
"collapsible": true,
8587
"label": "Actions",
8688
"items": [
8789
"navigation-actions",

versioned_sidebars/version-7.x-sidebars.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"link",
6464
{
6565
"type": "category",
66+
"collapsible": true,
6667
"label": "Hooks",
6768
"items": [
6869
"use-navigation",
@@ -80,6 +81,7 @@
8081
},
8182
{
8283
"type": "category",
84+
"collapsible": true,
8385
"label": "Actions",
8486
"items": [
8587
"navigation-actions",

0 commit comments

Comments
 (0)