Skip to content

Commit c0e2512

Browse files
committed
enh: clean up top nav
1 parent cd4158b commit c0e2512

File tree

3 files changed

+61
-42
lines changed

3 files changed

+61
-42
lines changed

_sass/minimal-mistakes/_masthead.scss

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
==========================================================================
33
MASTHEAD
44
5-
Layout of the top-level items within the masthead.
6-
For styling of menu contents, see _pyos-dropdown.scss
5+
Layout and styling of the top-level items within the masthead.
6+
For dropdown menu functionality, see _pyos-dropdown.scss
77
==========================================================================
88
*/
99

1010
.masthead {
1111
position: relative;
1212
border-bottom: 1px solid $border-color;
13+
padding-bottom: 0.15rem; // Add space below navigation to prevent overlap
1314
-webkit-animation: $intro-transition;
1415
animation: $intro-transition;
1516
-webkit-animation-delay: 0.15s;
@@ -22,13 +23,13 @@ For styling of menu contents, see _pyos-dropdown.scss
2223
margin: auto;
2324
padding: 0 1em;
2425
max-width: 100%;
25-
height: 3rem;
26+
height: 4rem; // Increased from 3rem to accommodate taller logo
2627
display: flex;
2728
justify-content: space-between;
2829
font-family: $sans-serif-narrow;
2930
position: relative;
3031
align-items: stretch;
31-
min-height: 2em;
32+
min-height: 3rem; // Increased from 2em to ensure adequate height
3233
background: #fff;
3334

3435
& > * {
@@ -63,19 +64,28 @@ For styling of menu contents, see _pyos-dropdown.scss
6364
justify-content: center;
6465
align-items: center;
6566
padding: 0.5em 0;
67+
margin-bottom: 0; // Ensure no extra margin causing overlap
68+
flex-shrink: 0; // Prevent logo from shrinking in flexbox
69+
flex-grow: 0; // Prevent logo from growing in flexbox
70+
71+
// Responsive adjustments for mobile
72+
@media (max-width: $medium) {
73+
padding: 0.25em 0; // Reduce padding on mobile but keep logo size
74+
}
6675

6776
&::after {
6877
display: none;
6978
}
7079

7180
img {
7281
object-fit: contain;
73-
height: 2.5em;
82+
height: 2.5rem; // Use rem instead of em for consistent size across breakpoints
7483
width: auto;
7584
margin: 0;
7685
display: block;
7786
box-shadow: none;
7887
align-self: center;
88+
max-height: 2.5rem; // Ensure it never exceeds this size
7989
}
8090
}
8191

@@ -94,3 +104,47 @@ For styling of menu contents, see _pyos-dropdown.scss
94104
font-size: .8em;
95105
color: $nav-font-color;
96106
}
107+
108+
/*
109+
==========================================================================
110+
NAVIGATION LINKS STYLING
111+
==========================================================================
112+
*/
113+
114+
/* Donate button in navigation */
115+
.nav__links {
116+
.donate-btn {
117+
margin-left: 0.75em;
118+
margin-top: 0.5em;
119+
padding: 0.25em 0.5em;
120+
font-size: 0.8em;
121+
white-space: nowrap;
122+
text-decoration: none;
123+
display: inline-flex;
124+
align-items: center;
125+
height: auto;
126+
line-height: 1.3;
127+
border: 1px solid $pyos-darkpurple;
128+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
129+
transition: box-shadow 0.3s ease, transform 0.2s ease, color 0.3s ease;
130+
background-color: $pyos-darkpurple;
131+
color: $pyos-white !important; // override because the rest of the nav is dark
132+
133+
&:hover {
134+
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15), 0 4px 6px rgba(0, 0, 0, 0.1);
135+
transform: translateY(-1px);
136+
color: $pyos-lightpurple !important; // subtle light purple on hover
137+
}
138+
139+
@include breakpoint($medium) {
140+
margin-left: 1em;
141+
}
142+
143+
@media (max-width: $medium) {
144+
margin-left: 0;
145+
margin-top: 0;
146+
width: 100%;
147+
justify-content: center;
148+
}
149+
}
150+
}

_sass/minimal-mistakes/_pyos-dropdown.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@
314314
color: $pyos-white;
315315
}
316316

317-
@media screen and (max-width: $medium) {
318-
/* Hide horizontal drop down links at 48em / 768px */
317+
@media screen and (max-width: $large) {
318+
/* Hide horizontal drop down links at $large / 1024px (closest to 1026px) */
319319
.nav__links {
320320
display: none;
321321
}

_sass/minimal-mistakes/_pyos-main.scss

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -156,38 +156,3 @@ h2.clearall {
156156
padding-left: 1em;
157157
}
158158
}
159-
160-
/* Donate button in navigation */
161-
.nav__links {
162-
.donate-btn {
163-
margin-left: 0.75em;
164-
margin-top: 0.5em;
165-
padding: 0.25em 0.5em;
166-
font-size: 0.8em;
167-
white-space: nowrap;
168-
text-decoration: none;
169-
display: inline-flex;
170-
align-items: center;
171-
height: auto;
172-
line-height: 1.3;
173-
border: 1px solid $pyos-darkpurple;
174-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
175-
transition: box-shadow 0.3s ease, transform 0.2s ease;
176-
177-
&:hover {
178-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
179-
transform: translateY(-1px);
180-
}
181-
182-
@include breakpoint($medium) {
183-
margin-left: 1em;
184-
}
185-
186-
@media (max-width: $medium) {
187-
margin-left: 0;
188-
margin-top: 0;
189-
width: 100%;
190-
justify-content: center;
191-
}
192-
}
193-
}

0 commit comments

Comments
 (0)