mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-04-15 21:28:32 +02:00
Update: hamburger menu for mobile devices
This commit is contained in:
@@ -192,29 +192,11 @@
|
||||
.brand__actions {
|
||||
gap: 0.16rem;
|
||||
}
|
||||
.rss-subscribe__link {
|
||||
background-color: transparent !important;
|
||||
color: var(--foreground-color) !important;
|
||||
border-color: currentColor;
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.rss-subscribe__link:hover {
|
||||
background-color: var(--foreground-color) !important;
|
||||
color: var(--background-color) !important;
|
||||
}
|
||||
|
||||
.rss-subscribe__link span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rss-subscribe__link svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
/* Hide desktop-only elements on mobile */
|
||||
.brand__auth--desktop,
|
||||
.rss-subscribe__link--desktop {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.brand__auth-text {
|
||||
@@ -228,6 +210,119 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide mobile menu on desktop, show on mobile */
|
||||
.brand__mobile-menu {
|
||||
display: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.brand__mobile-menu {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile menu checkbox */
|
||||
.brand__mobile-check {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Mobile toggle button — same color scheme as account button */
|
||||
.brand__mobile-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #f26522;
|
||||
background-color: #f26522;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition:
|
||||
background-color 0.2s ease,
|
||||
color 0.2s ease;
|
||||
}
|
||||
|
||||
.brand__mobile-toggle:hover {
|
||||
background-color: transparent;
|
||||
color: #f26522;
|
||||
}
|
||||
|
||||
/* Mobile dropdown panel */
|
||||
.brand__mobile-links {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: calc(100% + 0.3rem);
|
||||
background-color: var(--background-color);
|
||||
border: 1px solid var(--foreground-color3);
|
||||
border-radius: 4px;
|
||||
min-width: 130px;
|
||||
z-index: 100;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.brand__mobile-check:checked ~ .brand__mobile-links {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mobile-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
color: var(--foreground-color);
|
||||
text-decoration: none;
|
||||
font-size: 0.8rem;
|
||||
white-space: nowrap;
|
||||
transition: background-color 0.15s ease;
|
||||
}
|
||||
|
||||
.mobile-link:hover {
|
||||
background-color: var(--background-color1);
|
||||
}
|
||||
|
||||
.mobile-link:not(:last-child) {
|
||||
border-bottom: 1px solid var(--foreground-color3);
|
||||
}
|
||||
|
||||
/* Mobile toggle dark mode colors */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.brand__mobile-toggle {
|
||||
background-color: transparent;
|
||||
border-color: currentColor;
|
||||
color: var(--foreground-color);
|
||||
}
|
||||
.brand__mobile-toggle:hover {
|
||||
background-color: var(--foreground-color);
|
||||
color: var(--background-color);
|
||||
}
|
||||
}
|
||||
|
||||
[data-theme='light'] .brand__mobile-toggle {
|
||||
background-color: #f26522;
|
||||
border-color: #f26522;
|
||||
color: #fff;
|
||||
}
|
||||
[data-theme='light'] .brand__mobile-toggle:hover {
|
||||
background-color: transparent;
|
||||
color: #f26522;
|
||||
}
|
||||
[data-theme='dark'] .brand__mobile-toggle {
|
||||
background-color: transparent;
|
||||
border-color: currentColor;
|
||||
color: var(--foreground-color);
|
||||
}
|
||||
[data-theme='dark'] .brand__mobile-toggle:hover {
|
||||
background-color: var(--foreground-color);
|
||||
color: var(--background-color);
|
||||
}
|
||||
|
||||
/* ── Mobile auth toggle colors ── */
|
||||
|
||||
/* Default (system light): orange filled */
|
||||
@@ -262,26 +357,26 @@
|
||||
|
||||
/* Manual light override */
|
||||
@media (max-width: 600px) {
|
||||
[data-theme="light"] .brand__auth-toggle {
|
||||
[data-theme='light'] .brand__auth-toggle {
|
||||
background-color: #f26522 !important;
|
||||
border-color: #f26522 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .brand__auth:focus-within .brand__auth-toggle {
|
||||
[data-theme='light'] .brand__auth:focus-within .brand__auth-toggle {
|
||||
background-color: transparent !important;
|
||||
border-color: #f26522 !important;
|
||||
color: #f26522 !important;
|
||||
}
|
||||
|
||||
/* Manual dark override */
|
||||
[data-theme="dark"] .brand__auth-toggle {
|
||||
[data-theme='dark'] .brand__auth-toggle {
|
||||
background-color: transparent !important;
|
||||
border-color: currentColor !important;
|
||||
color: var(--foreground-color) !important;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .brand__auth:focus-within .brand__auth-toggle {
|
||||
[data-theme='dark'] .brand__auth:focus-within .brand__auth-toggle {
|
||||
background-color: var(--foreground-color) !important;
|
||||
border-color: var(--foreground-color) !important;
|
||||
color: var(--background-color) !important;
|
||||
@@ -291,7 +386,7 @@
|
||||
/* ── Theme switcher ── */
|
||||
|
||||
/* Force light theme */
|
||||
[data-theme="light"] {
|
||||
[data-theme='light'] {
|
||||
--background-color: #fbf1c7;
|
||||
--background-color1: #ebdbb2;
|
||||
--foreground-color: #3c3836;
|
||||
@@ -300,7 +395,7 @@
|
||||
}
|
||||
|
||||
/* Force dark theme */
|
||||
[data-theme="dark"] {
|
||||
[data-theme='dark'] {
|
||||
--background-color: #171414;
|
||||
--background-color1: #fff;
|
||||
--foreground-color: #e3e1db;
|
||||
@@ -331,36 +426,68 @@
|
||||
}
|
||||
|
||||
/* Default (system light): moon icon + "Dark" label */
|
||||
.theme-toggle__sun { display: none; }
|
||||
.theme-toggle__moon { display: block; }
|
||||
.theme-toggle__sun {
|
||||
display: none;
|
||||
}
|
||||
.theme-toggle__moon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Desktop icon size */
|
||||
.theme-toggle svg {
|
||||
width: 16.5px;
|
||||
height: 16.5px;
|
||||
}
|
||||
.theme-toggle__text--light { display: none; }
|
||||
.theme-toggle__text--dark { display: inline; }
|
||||
.theme-toggle__text--light {
|
||||
display: none;
|
||||
}
|
||||
.theme-toggle__text--dark {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* System dark (no data-theme): sun icon + "Light" label */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.theme-toggle__sun { display: block; }
|
||||
.theme-toggle__moon { display: none; }
|
||||
.theme-toggle__text--light { display: inline; }
|
||||
.theme-toggle__text--dark { display: none; }
|
||||
.theme-toggle__sun {
|
||||
display: block;
|
||||
}
|
||||
.theme-toggle__moon {
|
||||
display: none;
|
||||
}
|
||||
.theme-toggle__text--light {
|
||||
display: inline;
|
||||
}
|
||||
.theme-toggle__text--dark {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Manual dark: sun icon + "Light" label */
|
||||
[data-theme="dark"] .theme-toggle__sun { display: block; }
|
||||
[data-theme="dark"] .theme-toggle__moon { display: none; }
|
||||
[data-theme="dark"] .theme-toggle__text--light { display: inline; }
|
||||
[data-theme="dark"] .theme-toggle__text--dark { display: none; }
|
||||
[data-theme='dark'] .theme-toggle__sun {
|
||||
display: block;
|
||||
}
|
||||
[data-theme='dark'] .theme-toggle__moon {
|
||||
display: none;
|
||||
}
|
||||
[data-theme='dark'] .theme-toggle__text--light {
|
||||
display: inline;
|
||||
}
|
||||
[data-theme='dark'] .theme-toggle__text--dark {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Manual light: moon icon + "Dark" label */
|
||||
[data-theme="light"] .theme-toggle__sun { display: none; }
|
||||
[data-theme="light"] .theme-toggle__moon { display: block; }
|
||||
[data-theme="light"] .theme-toggle__text--light { display: none; }
|
||||
[data-theme="light"] .theme-toggle__text--dark { display: inline; }
|
||||
[data-theme='light'] .theme-toggle__sun {
|
||||
display: none;
|
||||
}
|
||||
[data-theme='light'] .theme-toggle__moon {
|
||||
display: block;
|
||||
}
|
||||
[data-theme='light'] .theme-toggle__text--light {
|
||||
display: none;
|
||||
}
|
||||
[data-theme='light'] .theme-toggle__text--dark {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Match size to other buttons on mobile */
|
||||
@media (max-width: 600px) {
|
||||
|
||||
Reference in New Issue
Block a user