Skip to content

Commit 4a5a337

Browse files
committed
Update navbar per website
1 parent 9d45f93 commit 4a5a337

File tree

4 files changed

+51
-27
lines changed

4 files changed

+51
-27
lines changed

src/css/custom.css

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -512,24 +512,32 @@ hr {
512512

513513
.navbar__link--active,
514514
.menu__link--active {
515-
color: var(--selected);
515+
color: var(--surface-brand-default);
516+
background: var(--surface-brand-grey-strong);
516517
}
517518

518-
519-
.navbar__link--active:hover {
520-
color: var(--selected-hover);
519+
.navbar__link {
520+
position: relative;
521521
}
522522

523-
.navbar__link {
523+
.navbar__item.navbar__link:not(.logo-link):not(.navbar-login-btn):hover {
524524
position: relative;
525525
}
526526

527-
.navbar__item.navbar__link:not(.logo-link):hover {
528-
color: var(--normal-hover);
527+
.navbar__item.navbar__link:not(.logo-link):not(.navbar-login-btn):hover::after {
528+
position: absolute;
529+
height: 2px;
530+
width: 100%;
531+
content: "";
532+
background: var(--surface-brand-default);
533+
bottom: -24px;
534+
left: 0;
535+
z-index: 2;
529536
}
530537

538+
531539
.navbar__item {
532-
padding: 12px 16px;
540+
padding: 8px;
533541
border-radius: 8px;
534542
font-family: Inter;
535543
font-size: 16px;
@@ -664,24 +672,26 @@ hr {
664672
}
665673

666674
.navbar__items--middle {
667-
background: var(--navbar-items-bg);
668675
padding: 0 16px;
669676
border-radius: 99px;
677+
display: flex;
678+
gap: 16px;
670679
margin: 0 auto;
671680
}
672681
.navbar__inner {
673-
margin: auto;
682+
background: var(--navbar-items-bg);
674683
padding: 16px 24px;
675684
display: grid;
676-
grid-template-columns: 324px 1fr auto;
685+
gap: 40px;
686+
grid-template-columns: auto auto 1fr;
677687
}
678688
@media (max-width: 1191px) {
679-
.navbar__inner {
680-
grid-template-columns: repeat(3, auto);
681-
}
682689
.header-github-link {
683690
display: none;
684691
}
692+
.navbar__inner {
693+
gap: 16px;
694+
}
685695
}
686696

687697
.navbar__items--right > :last-child {
@@ -694,12 +704,13 @@ hr {
694704
flex-direction: row-reverse;
695705
justify-content: space-between;
696706
max-width: unset;
707+
height: 48px;
697708
}
698709

699710
.navbar__inner {
700711
position: relative;
701-
display: flex;
702712
padding: 16px 32px;
713+
display: flex;
703714
}
704715

705716
.navbar__items--right > :last-child {
@@ -784,6 +795,9 @@ hr {
784795
position: absolute;
785796
top: 50%;
786797
transform: translateY(-50%);
798+
&::before {
799+
content: "/"
800+
}
787801
}
788802
.logo-link:hover {
789803
transform: translateY(-60%);

src/pages/index.module.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.mainHome {
77
overflow: hidden;
88
padding: 0;
9-
@media (max-width: 974px) {
9+
@media (max-width: 996px) {
1010
margin-top: 68px;
1111
}
1212
}
@@ -113,14 +113,14 @@
113113
gap: 40px;
114114
margin-top: 36px;
115115
grid-template-columns: 1fr;
116-
@media (min-width: 974px) {
116+
@media (min-width: 996px) {
117117
grid-template-columns: repeat(2, calc(50% - 20px));
118118
}
119119
.tabBox {
120120
width: 100%;
121121
height: 100%;
122122
max-width: 100%;
123-
@media (min-width: 974px) {
123+
@media (min-width: 996px) {
124124
height: 100%;
125125
}
126126
.heading {
@@ -210,7 +210,7 @@
210210
line-height: 52.8px;
211211
letter-spacing: -0.02em;
212212
text-align: left;
213-
@media (min-width: 974px) {
213+
@media (min-width: 996px) {
214214
font-size: 48px;
215215
}
216216
}
@@ -223,7 +223,7 @@
223223
letter-spacing: -2%;
224224
margin: 40px 0 24px;
225225

226-
@media (min-width: 974px) {
226+
@media (min-width: 996px) {
227227
margin: 80px 0 24px;
228228
font-size: 36px;
229229
}
@@ -243,7 +243,7 @@
243243
gap: 24px;
244244
flex-wrap: wrap;
245245
display: grid;
246-
@media (min-width: 974px) {
246+
@media (min-width: 996px) {
247247
grid-template-columns: repeat(3, 1fr);
248248
}
249249
}
@@ -264,7 +264,7 @@
264264
display: grid;
265265
gap: 40px;
266266
grid-template-columns: 1fr;
267-
@media (min-width: 974px) {
267+
@media (min-width: 996px) {
268268
grid-template-columns: repeat(3, 1fr);
269269
}
270270
.howItem {
@@ -301,7 +301,7 @@
301301
line-height: 140%;
302302
letter-spacing: 0%;
303303
margin: 16px 0 0;
304-
@media (min-width: 974px) {
304+
@media (min-width: 996px) {
305305
height: 98px;
306306
}
307307
}
@@ -371,7 +371,7 @@
371371
display: grid;
372372
gap: 40px;
373373
grid-template-columns: 1fr;
374-
@media (min-width: 974px) {
374+
@media (min-width: 996px) {
375375
grid-template-columns: repeat(3, 1fr);
376376
}
377377
.helpItem {
@@ -441,7 +441,7 @@
441441
max-width: 1272px;
442442
text-align: left;
443443
padding: 40px 16px;
444-
@media (min-width: 974px) {
444+
@media (min-width: 996px) {
445445
grid-template-columns: repeat(2, 1fr);
446446
padding: 80px 16px;
447447
}
@@ -469,7 +469,7 @@
469469
justify-content: left;
470470
align-items: center;
471471
gap: 24px;
472-
@media (min-width: 974px) {
472+
@media (min-width: 996px) {
473473
justify-content: center;
474474
}
475475
.link {

src/theme/Navbar/Content/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ export default function NavbarContent(): ReactNode {
7272
<>
7373
{!mobileSidebar.disabled && <NavbarMobileSidebarToggle />}
7474
<NavbarLogo />
75-
<Link to={baseUrl} className="logo-link">/docs</Link>
75+
<span className={styles.separator}>/</span>
76+
<Link to={baseUrl} className="logo-link">docs</Link>
7677
</>
7778
}
7879
middle={

src/theme/Navbar/Content/styles.module.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,13 @@ Hide color mode toggle in small viewports
55
.colorModeToggle {
66
display: none;
77
}
8+
.separator {
9+
display: none;
10+
}
811
}
12+
13+
.separator {
14+
color: var(--border-color);
15+
font-size: 28px;
16+
margin-right: 4px;
17+
}

0 commit comments

Comments
 (0)