fix mobile rendering

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-10-02 12:57:23 +02:00
parent 475ba4ddaf
commit c64c98b9c5
No known key found for this signature in database
3 changed files with 20 additions and 8 deletions

View file

@ -4518,9 +4518,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001478", "version": "1.0.30001542",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001478.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001542.tgz",
"integrity": "sha512-gMhDyXGItTHipJj2ApIvR+iVB5hd0KP3svMWWXDvZOmjzJJassGLMfxRkQCSYgGd2gtdL/ReeiyvMSFD1Ss6Mw==", "integrity": "sha512-UrtAXVcj1mvPBFQ4sKd38daP8dEcXXr5sQe6QNNinaPd0iA/cxg9/l3VrSdL73jgw5sKyuQ6jNgiKO12W3SsVA==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@ -17148,9 +17148,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001478", "version": "1.0.30001542",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001478.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001542.tgz",
"integrity": "sha512-gMhDyXGItTHipJj2ApIvR+iVB5hd0KP3svMWWXDvZOmjzJJassGLMfxRkQCSYgGd2gtdL/ReeiyvMSFD1Ss6Mw==" "integrity": "sha512-UrtAXVcj1mvPBFQ4sKd38daP8dEcXXr5sQe6QNNinaPd0iA/cxg9/l3VrSdL73jgw5sKyuQ6jNgiKO12W3SsVA=="
}, },
"ccount": { "ccount": {
"version": "1.1.0", "version": "1.1.0",

View file

@ -10,6 +10,9 @@
--white: #e3e3e3; --white: #e3e3e3;
--ifm-navbar-link-color: var(--white); --ifm-navbar-link-color: var(--white);
--ifm-navbar-link-hover-color: var(--ifm-color-gray-1000); --ifm-navbar-link-hover-color: var(--ifm-color-gray-1000);
--ifm-menu-color: var(--white);
--ifm-menu-color-background-active: var(--white);
--ifm-navbar-background-color: var(--ifm-color-primary);
} }
.button.button--outline { .button.button--outline {
@ -114,7 +117,6 @@
} }
/* Custom navbar dropdown */ /* Custom navbar dropdown */
.dropdown--custom div.dropdown__menu { .dropdown--custom div.dropdown__menu {
display: flex; display: flex;
font-size: calc(var(--ifm-font-size-base) * 1.2); font-size: calc(var(--ifm-font-size-base) * 1.2);
@ -152,3 +154,13 @@
padding-top: 0px; padding-top: 0px;
} }
} }
@media screen and (max-width: 996px) {
.dropdown {
width: 100%;
line-height: 1.25;
}
.navbar__link {
padding: var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal);
}
}

View file

@ -1,5 +1,5 @@
function generateNavbarDropdown(label, categories, extra) { function generateNavbarDropdown(label, categories, extra) {
return `<a aria-haspopup="true" aria-expanded="false" role="button" class="menu__link">${label}</a> return `<a aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">${label}</a>
<div class="dropdown__menu"> <div class="dropdown__menu">
${categories ${categories
.map(({ label, items }) => { .map(({ label, items }) => {