Skip to content

Commit cfa7e82

Browse files
committed
Navbar: left-align at 997-1300px, hide Home, tighten padding at 997-1150px
1 parent 0d7355d commit cfa7e82

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const config: Config = {
114114
items: [
115115
{
116116
to: "/",
117-
className: "custom_navbar_item",
117+
className: "custom_navbar_item navbar_hide_mid",
118118
label: "Home",
119119
position: "left",
120120
},

src/css/custom.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,34 @@ html[data-navbar-dark-top] .navbar-sidebar .rss-circle-icon {
517517
transform: translateY(-50%);
518518
}
519519

520+
/* At 997–1300px: switch to left-aligned to avoid overlap */
521+
@media (max-width: 1300px) and (min-width: 997px) {
522+
.navbar__inner .navbar__brand {
523+
position: static;
524+
transform: none;
525+
}
526+
527+
.theme-layout-navbar-left {
528+
justify-content: flex-start;
529+
}
530+
531+
.theme-layout-navbar-right {
532+
position: static;
533+
transform: none;
534+
}
535+
536+
.navbar_hide_mid {
537+
display: none;
538+
}
539+
}
540+
541+
/* Tighten item padding at narrower intermediate widths */
542+
@media (max-width: 1150px) and (min-width: 997px) {
543+
.custom_navbar_item {
544+
padding: 6px 8px;
545+
}
546+
}
547+
520548
.custom_navbar_item {
521549
font-family: var(--ifm-font-family-roboto);
522550
height: 36px;

0 commit comments

Comments
 (0)