Header menu and footer tidy
This commit is contained in:
fraxle
2026-07-09 20:38:11 +01:00
parent fb8547c8b8
commit e27a8cdb2d
4 changed files with 104 additions and 51 deletions
+14 -5
View File
@@ -56,6 +56,15 @@ header a.active { color: #c8922a; }
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
/* Invisible bridge so hover doesn't break between toggle and menu */
.nav-dropdown::after {
content: '';
position: absolute;
left: 0;
right: 0;
top: 100%;
height: 4px;
}
.nav-dropdown-toggle .caret { .nav-dropdown-toggle .caret {
display: inline-block; display: inline-block;
margin-left: 4px; margin-left: 4px;
@@ -68,9 +77,9 @@ header a.active { color: #c8922a; }
} }
.nav-dropdown-menu { .nav-dropdown-menu {
position: absolute; position: absolute;
top: 100%; top: calc(100% - 1px);
right: 0; left: 50%;
margin-top: 10px; margin-top: 0;
background: #f5edd6; background: #f5edd6;
border: 1px solid #e0d0a8; border: 1px solid #e0d0a8;
border-radius: 8px; border-radius: 8px;
@@ -81,7 +90,7 @@ header a.active { color: #c8922a; }
padding: 6px; padding: 6px;
opacity: 0; opacity: 0;
visibility: hidden; visibility: hidden;
transform: translateY(-4px); transform: translateX(-50%) translateY(-4px);
transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
z-index: 110; z-index: 110;
} }
@@ -89,7 +98,7 @@ header a.active { color: #c8922a; }
.nav-dropdown:focus-within .nav-dropdown-menu { .nav-dropdown:focus-within .nav-dropdown-menu {
opacity: 1; opacity: 1;
visibility: visible; visibility: visible;
transform: translateY(0); transform: translateX(-50%) translateY(0);
} }
.nav-dropdown-menu a { .nav-dropdown-menu a {
text-transform: none; text-transform: none;
+14 -5
View File
@@ -127,6 +127,15 @@ body {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
/* Invisible bridge so hover doesn't break between toggle and menu */
.utci-topnav .nav-dropdown::after {
content: '';
position: absolute;
left: 0;
right: 0;
top: 100%;
height: 4px;
}
.utci-topnav .nav-dropdown-toggle .caret { .utci-topnav .nav-dropdown-toggle .caret {
display: inline-block; display: inline-block;
margin-left: 4px; margin-left: 4px;
@@ -139,9 +148,9 @@ body {
} }
.utci-topnav .nav-dropdown-menu { .utci-topnav .nav-dropdown-menu {
position: absolute; position: absolute;
top: 100%; top: calc(100% - 1px);
right: 0; left: 50%;
margin-top: 10px; margin-top: 0;
background: #f5edd6; background: #f5edd6;
border: 1px solid #e0d0a8; border: 1px solid #e0d0a8;
border-radius: 8px; border-radius: 8px;
@@ -152,7 +161,7 @@ body {
padding: 6px; padding: 6px;
opacity: 0; opacity: 0;
visibility: hidden; visibility: hidden;
transform: translateY(-4px); transform: translateX(-50%) translateY(-4px);
transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
z-index: 110; z-index: 110;
} }
@@ -160,7 +169,7 @@ body {
.utci-topnav .nav-dropdown:focus-within .nav-dropdown-menu { .utci-topnav .nav-dropdown:focus-within .nav-dropdown-menu {
opacity: 1; opacity: 1;
visibility: visible; visibility: visible;
transform: translateY(0); transform: translateX(-50%) translateY(0);
} }
.utci-topnav .nav-dropdown-menu a { .utci-topnav .nav-dropdown-menu a {
text-transform: none; text-transform: none;
+30 -2
View File
@@ -1269,13 +1269,34 @@
/* ── 11. ABOUT + FOOTER ─────────────────────────────────────────────── */ /* ── 11. ABOUT + FOOTER ─────────────────────────────────────────────── */
.utci-about { .utci-bottom-grid {
display: flex;
gap: 24px;
margin-top: 28px; margin-top: 28px;
align-items: stretch;
}
.utci-about {
flex: 0 0 920px;
padding: 24px 28px; padding: 24px 28px;
background: #fdf8ee; background: #fdf8ee;
border: 1.5px solid #c9b08a; border: 1.5px solid #c9b08a;
} }
.utci-reading-box {
flex: 1;
min-width: 0;
padding: 24px 28px;
background: #fdf8ee;
border: 1.5px solid #c9b08a;
}
.utci-reading-box .utci-about-text {
max-width: none;
margin-left: 0;
margin-right: 0;
}
.utci-about-heading { .utci-about-heading {
font-family: Fraunces, serif; font-family: Fraunces, serif;
font-size: 18px; font-size: 18px;
@@ -1328,7 +1349,6 @@
.utci-footer { .utci-footer {
margin-top: 36px; margin-top: 36px;
padding-top: 20px; padding-top: 20px;
border-top: 1px solid #d4c0a0;
font-family: Manrope, sans-serif; font-family: Manrope, sans-serif;
font-size: 10px; font-size: 10px;
font-weight: 700; font-weight: 700;
@@ -1392,6 +1412,14 @@
@media (max-width: 800px) { @media (max-width: 800px) {
.utci-bottom-grid {
flex-direction: column;
}
.utci-about {
flex: none;
}
.utci-app { .utci-app {
padding: 52px 10px 32px; padding: 52px 10px 32px;
} }
+12 -5
View File
@@ -1873,6 +1873,7 @@ export function UTCIForecast() {
</div>`; </div>`;
})()} })()}
<div class="utci-bottom-grid">
<div class="utci-about"> <div class="utci-about">
<h2 class="utci-about-heading">What is SunScope?</h2> <h2 class="utci-about-heading">What is SunScope?</h2>
<p class="utci-about-text"> <p class="utci-about-text">
@@ -1898,9 +1899,10 @@ export function UTCIForecast() {
<a href="./about.html" class="utci-about-link">Learn more </a> <a href="./about.html" class="utci-about-link">Learn more </a>
</p> </p>
</div> </div>
<div class="utci-reading-box">
<div class="utci-footer"> <h2 class="utci-about-heading">Reading the table</h2>
<em>Reading the table.</em> SunSoak is the number to watch it reflects everything your body <p class="utci-about-text">
SunSoak is the number to watch it reflects everything your body
actually experiences, not just what the thermometer says. A large gap between SunSoak and Air actually experiences, not just what the thermometer says. A large gap between SunSoak and Air
temperature means solar radiation is doing significant work on your body. On clear sunny days temperature means solar radiation is doing significant work on your body. On clear sunny days
that gap can exceed 10 °C even at modest air temperatures. The environment modifier in the that gap can exceed 10 °C even at modest air temperatures. The environment modifier in the
@@ -1910,8 +1912,13 @@ export function UTCIForecast() {
style=${{ color: '#9a7d5a', borderBottom: '1px solid rgba(154,125,90,0.4)', paddingBottom: '1px', textDecoration: 'none', cursor: 'pointer' }}> style=${{ color: '#9a7d5a', borderBottom: '1px solid rgba(154,125,90,0.4)', paddingBottom: '1px', textDecoration: 'none', cursor: 'pointer' }}>
How it works How it works
</a> </a>
</p>
</div>
</div>
${isPro && html` ${isPro && html`
<div style=${{ marginTop: '10px', paddingTop: '10px', borderTop: '1px solid #d4c0a0' }}> <div class="utci-footer">
<div style=${{ marginTop: '10px', paddingTop: '10px', borderTop: '1px solid #d4c0a0', textAlign: 'center' }}>
SunScope Extra is active. SunScope Extra is active.
<a href="https://billing.stripe.com/p/login/9B63cw7vl8k15Ei9DQd7q00" <a href="https://billing.stripe.com/p/login/9B63cw7vl8k15Ei9DQd7q00"
target="_blank" rel="noopener noreferrer" target="_blank" rel="noopener noreferrer"
@@ -1919,8 +1926,8 @@ export function UTCIForecast() {
Manage or cancel subscription → Manage or cancel subscription →
</a> </a>
</div> </div>
`}
</div> </div>
`}
<footer class="utci-site-footer"> <footer class="utci-site-footer">
© 2026 <a href="https://fraxle.net" target="_blank" rel="noopener noreferrer">Fraxle.NET</a> © 2026 <a href="https://fraxle.net" target="_blank" rel="noopener noreferrer">Fraxle.NET</a>