Skip to content

Commit 72c8bd5

Browse files
kelsetSimek
andauthored
Modify the top navbar to be less full (facebook#3177)
* modify navbar * rename * reorder and rename * reorder the navbar * change size to match the other elements * change style to match the other elements * tweak the footer to reflect the new header * fix link * fix the other link * small CSS tweaks * small naming tweak Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
1 parent 7202412 commit 72c8bd5

File tree

2 files changed

+64
-41
lines changed

2 files changed

+64
-41
lines changed

website/docusaurus.config.js

Lines changed: 47 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -214,29 +214,32 @@ module.exports = {
214214
style: 'dark',
215215
items: [
216216
{
217-
label: 'Guides',
218-
type: 'doc',
219-
docId: 'getting-started',
220-
position: 'right',
221-
},
222-
{
223-
label: 'Components',
224-
type: 'doc',
225-
docId: 'components-and-apis',
217+
label: 'Development',
218+
type: 'dropdown',
226219
position: 'right',
227-
},
228-
{
229-
label: 'API',
230-
type: 'doc',
231-
docId: 'accessibilityinfo',
232-
position: 'right',
233-
},
234-
{
235-
label: 'Architecture',
236-
type: 'doc',
237-
docId: 'architecture-overview',
238-
position: 'right',
239-
docsPluginId: 'architecture',
220+
items: [
221+
{
222+
label: 'Guides',
223+
type: 'doc',
224+
docId: 'getting-started',
225+
},
226+
{
227+
label: 'Components',
228+
type: 'doc',
229+
docId: 'components-and-apis',
230+
},
231+
{
232+
label: 'APIs',
233+
type: 'doc',
234+
docId: 'accessibilityinfo',
235+
},
236+
{
237+
label: 'Architecture',
238+
type: 'doc',
239+
docId: 'architecture-overview',
240+
docsPluginId: 'architecture',
241+
},
242+
],
240243
},
241244
{
242245
type: 'doc',
@@ -245,6 +248,11 @@ module.exports = {
245248
position: 'right',
246249
docsPluginId: 'contributing',
247250
},
251+
{
252+
to: '/showcase',
253+
label: 'Showcase',
254+
position: 'right',
255+
},
248256
{
249257
to: '/blog',
250258
label: 'Blog',
@@ -274,44 +282,44 @@ module.exports = {
274282
style: 'dark',
275283
links: [
276284
{
277-
title: 'Docs',
285+
title: 'Development',
278286
items: [
279287
{
280-
label: 'Getting Started',
288+
label: 'Guides',
281289
to: 'docs/getting-started',
282290
},
283291
{
284-
label: 'Tutorial',
285-
to: 'docs/tutorial',
292+
label: 'Components',
293+
to: 'docs/components-and-apis',
286294
},
287295
{
288-
label: 'Components and APIs',
289-
to: 'docs/components-and-apis',
296+
label: 'APIs',
297+
to: 'docs/accessibilityinfo',
290298
},
291299
{
292-
label: 'More Resources',
293-
to: 'docs/more-resources',
300+
label: 'Architecture',
301+
to: 'architecture/overview',
294302
},
295303
],
296304
},
297305
{
298306
title: 'Community',
299307
items: [
300308
{
301-
label: 'The React Native Community',
302-
to: 'help',
309+
label: 'Showcase',
310+
to: 'showcase',
303311
},
304312
{
305-
label: "Who's using React Native?",
306-
to: 'showcase',
313+
label: 'Contributing',
314+
to: 'contributing/overview',
307315
},
308316
{
309-
label: 'Ask Questions on Stack Overflow',
310-
href: 'https://stackoverflow.com/questions/tagged/react-native',
317+
label: 'The React Native Community',
318+
to: 'help',
311319
},
312320
{
313-
label: 'DEV Community',
314-
href: 'https://dev.to/t/reactnative',
321+
label: 'Ask Questions on Stack Overflow',
322+
href: 'https://stackoverflow.com/questions/tagged/react-native',
315323
},
316324
],
317325
},
@@ -336,7 +344,7 @@ module.exports = {
336344
title: 'More',
337345
items: [
338346
{
339-
label: 'React',
347+
label: 'ReactJS',
340348
href: 'https://reactjs.org/',
341349
},
342350
{

website/src/css/customTheme.scss

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ a[class*="tagRegular"] {
596596
user-select: none;
597597
}
598598

599-
&.dropdown {
599+
&.dropdown:not(.dropdown--right) {
600600
a {
601601
font-weight: 400;
602602
font-size: 14px;
@@ -607,6 +607,18 @@ a[class*="tagRegular"] {
607607
left: 0;
608608
}
609609
}
610+
611+
&.dropdown--right {
612+
.dropdown__menu {
613+
min-width: 168px;
614+
}
615+
}
616+
}
617+
618+
.dropdown > .navbar__link:after {
619+
margin-left: 8px;
620+
top: 1px;
621+
opacity: 0.75;
610622
}
611623

612624
.navbar__logo {
@@ -887,7 +899,6 @@ aside[class^="theme-doc-sidebar-container"] {
887899

888900
.menu__link--sublist {
889901
font-size: 15px;
890-
font-weight: 600;
891902
padding: 4px 12px !important;
892903
color: var(--light);
893904

@@ -897,6 +908,10 @@ aside[class^="theme-doc-sidebar-container"] {
897908
}
898909
}
899910

911+
.menu__link--sublist-caret {
912+
font-size: 17px;
913+
}
914+
900915
.menu__list {
901916
.menu__link {
902917
line-height: 20px;

0 commit comments

Comments
 (0)