Skip to content

Commit 00f9eeb

Browse files
fix the nav for desktop
Signed-off-by: codeEvolveZenith345 <[email protected]>
1 parent 6015867 commit 00f9eeb

File tree

2 files changed

+38
-46
lines changed

2 files changed

+38
-46
lines changed

docs/stylesheets/extra.css

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -676,87 +676,46 @@ a.md-header__button.md-logo img {
676676
/* Mobile and Tablet: up to 76.1875em (1220px) */
677677
@media screen and (max-width: 76.1875em) {
678678

679+
.md-header__inner .md-tabs__list {
680+
display: none !important;
681+
}
682+
679683
.md-header__topic:first-child {
680684
display: flex !important;
681685
opacity: 1 !important;
682686
transform: translateX(0) !important;
683687
transition: none !important;
684-
pointer-events: auto !important;
685688
}
686689

687690
.md-header__topic:last-child {
688691
display: none !important;
689692
}
690693

691-
.md-header__title {
692-
display: flex !important;
693-
flex-shrink: 1;
694-
min-width: 0;
695-
}
696-
697694
.md-header__title[data-md-component="header-title"] {
698695
visibility: visible !important;
699696
}
700697

701698
[data-md-component="header"][data-md-state="shadow"] .md-header__topic:first-child {
702699
opacity: 1 !important;
703700
transform: translateX(0) !important;
704-
z-index: 1;
705-
}
706-
707-
.md-header__inner {
708-
display: flex;
709-
align-items: center;
710-
}
711-
}
712-
713-
/* Tablet adjustments: 60em to 76.1875em (960px to 1220px) */
714-
@media screen and (min-width: 60em) and (max-width: 76.1875em) {
715-
716-
.md-header__title {
717-
max-width: 40%;
718-
flex-shrink: 1;
719701
}
720702
}
721703

722704
/* Small mobile: up to 30em (480px) */
723705
@media screen and (max-width: 30em) {
724706

725-
.md-header__button.md-logo {
726-
padding: 0.2rem;
727-
}
728-
729707
.md-header__button.md-logo img,
730708
.md-header__button.md-logo svg {
731709
width: 2.5rem;
732710
height: 2rem;
733711
}
734712

713+
/* Compact title */
735714
.md-header__title {
736715
font-size: 0.9rem;
737716
}
738-
739-
.md-header__ellipsis {
740-
margin-left: 0.2rem;
741-
margin-right: 0.2rem;
742-
}
743-
}
744-
745-
/* Fix: Update existing 1024px media query for removed hardcoded navigation */
746-
@media (max-width: 1024px) {
747-
[dir=ltr] .md-tabs__list {
748-
margin-left: 0 !important;
749-
}
750717
}
751718

752-
/* Accessibility improvements */
753-
@media (prefers-reduced-motion: reduce) {
754-
.md-header__topic {
755-
transition: none !important;
756-
}
757-
}
758-
759-
/* Print styles - ensure title is visible */
760719
@media print {
761720
.md-header__topic:first-child {
762721
display: block !important;
@@ -766,4 +725,8 @@ a.md-header__button.md-logo img {
766725
.md-header__topic:last-child {
767726
display: none !important;
768727
}
728+
729+
.md-header__inner .md-tabs__list {
730+
display: none !important;
731+
}
769732
}

overrides/partials/header.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,35 @@
8484
{% include "partials/javascripts/palette.html" %}
8585
{% endif %}
8686

87+
<!-- Top Nav -->
88+
<ul class="md-tabs__list mr-30">
89+
<li class="md-tabs__item">
90+
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" class="md-tabs__link">
91+
Home
92+
</a>
93+
</li>
94+
<li class="md-tabs__item">
95+
<a href="/docs/" class="md-tabs__link">
96+
Docs
97+
</a>
98+
</li>
99+
<li class="md-tabs__item">
100+
<a href="/about/testimonials/" class="md-tabs__link">
101+
About
102+
</a>
103+
</li>
104+
<li class="md-tabs__item">
105+
<a href="/blog/" class="md-tabs__link">
106+
Blog
107+
</a>
108+
</li>
109+
<li class="md-tabs__item">
110+
<a href="/community/" class="md-tabs__link">
111+
Community
112+
</a>
113+
</li>
114+
</ul>
115+
87116
<!-- Site language selector -->
88117
{% if config.extra.alternate %}
89118
{% include "partials/alternate.html" %}

0 commit comments

Comments
 (0)