website: update release notes (#6590)
* move 2023.7 to 2023.8 Signed-off-by: Jens Langhammer <jens@goauthentik.io> * move version dropdown from navbar to sidebar, and only have it on applicable sites Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove title instead of just hiding it Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix some styling for the mobile navbar sidebar Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add social image Signed-off-by: Jens Langhammer <jens@goauthentik.io> * Optimised images with calibre/image-actions * fix website tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
This commit is contained in:
@ -26,18 +26,15 @@
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Don't display text title */
|
||||
.navbar__title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navbar__logo {
|
||||
margin: 0 0.75rem;
|
||||
}
|
||||
|
||||
/* Match color of light/dark theme switch */
|
||||
.navbar__items--right svg {
|
||||
.navbar__items--right svg,
|
||||
.navbar-sidebar__brand svg {
|
||||
color: var(--white);
|
||||
stroke: var(--white);
|
||||
}
|
||||
|
||||
.hero--primary {
|
||||
@ -116,3 +113,27 @@ body {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* styling for version selector in sidebar */
|
||||
.theme-doc-sidebar-menu .dropdown {
|
||||
display: block;
|
||||
padding: 0;
|
||||
}
|
||||
.theme-doc-sidebar-menu .navbar__link {
|
||||
color: var(--ifm-menu-color);
|
||||
}
|
||||
.theme-doc-sidebar-menu .dropdown__menu {
|
||||
left: 0;
|
||||
}
|
||||
.theme-doc-sidebar-menu hr {
|
||||
margin-top: calc(var(--ifm-hr-margin-vertical) / 2);
|
||||
}
|
||||
|
||||
/* Nav header background color on mobile */
|
||||
.navbar-sidebar__brand,
|
||||
.navbar-sidebar__items {
|
||||
background-color: var(--ifm-color-primary);
|
||||
}
|
||||
.navbar-sidebar__items .menu__link {
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
31
website/src/utils.js
Normal file
31
website/src/utils.js
Normal file
@ -0,0 +1,31 @@
|
||||
function generateVersionDropdown(sidebar) {
|
||||
const releases = sidebar.docs
|
||||
.filter((doc) => doc.link?.slug === "releases")[0]
|
||||
.items.filter((release) => typeof release === "string");
|
||||
const latest = releases[0].replace(/releases\/\d+\/v/, "");
|
||||
return `<div class="navbar__item dropdown dropdown--hoverable dropdown--right">
|
||||
<div aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link menu__link">
|
||||
Version: ${latest}
|
||||
</div>
|
||||
<ul class="dropdown__menu">
|
||||
${releases
|
||||
.map((release) => {
|
||||
const version = release.replace(/releases\/\d+\/v/, "");
|
||||
const subdomain = `version-${version.replace(".", "-")}`;
|
||||
const label = `Version: ${version}`;
|
||||
return `<li>
|
||||
<a
|
||||
href="https://${subdomain}.goauthentik.io/docs"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
class="dropdown__link">${label}</a>
|
||||
</li>`;
|
||||
})
|
||||
.join("")}
|
||||
</ul>
|
||||
</div>
|
||||
<hr>`;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
generateVersionDropdown,
|
||||
};
|
||||
Reference in New Issue
Block a user