website: Port WWW theme to docs site. Prep for package. (#13962)

Update sidebar.css

Signed-off-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>

website/docs: Update paths.

website/docs: Use package theme.
This commit is contained in:
Teffen Ellis
2025-04-12 01:31:57 +02:00
committed by GitHub
parent f15bc2df97
commit ae364292e6
18 changed files with 38 additions and 278 deletions

View File

@ -5,9 +5,9 @@ import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs";
import remarkGithub, { BuildUrlValues } from "remark-github";
import { defaultBuildUrl } from "remark-github";
import remarkDirective from "remark-directive";
import remarkVersionDirective from "./remark/version-directive";
import remarkPreviewDirective from "./remark/preview-directive";
import remarkSupportDirective from "./remark/support-directive";
import remarkVersionDirective from "./remark/version-directive.js";
import remarkPreviewDirective from "./remark/preview-directive.js";
import remarkSupportDirective from "./remark/support-directive.js";
const createConfig = (): Config => {
return {
@ -60,14 +60,14 @@ const createConfig = (): Config => {
},
{
href: "https://github.com/goauthentik/authentik",
className: "header-github-link",
"aria-label": "GitHub repository",
"data-icon": "github",
"aria-label": "GitHub",
position: "right",
},
{
href: "https://goauthentik.io/discord",
className: "header-discord-link",
"aria-label": "GitHub repository",
"data-icon": "discord",
"aria-label": "Discord",
position: "right",
},
],
@ -138,7 +138,9 @@ const createConfig = (): Config => {
],
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
customCss: require.resolve(
"@goauthentik/docusaurus-config/css/index.css",
),
},
} satisfies Preset.Options,
],

View File

@ -16,6 +16,7 @@
"@docusaurus/preset-classic": "^3.7.0",
"@docusaurus/theme-common": "^3.7.0",
"@docusaurus/theme-mermaid": "^3.7.0",
"@goauthentik/docusaurus-config": "^1.0.4",
"@mdx-js/react": "^3.1.0",
"clsx": "^2.1.1",
"disqus-react": "^1.1.6",
@ -28,7 +29,6 @@
"react-dom": "^18.3.1",
"react-feather": "^2.0.10",
"react-toggle": "^4.1.3",
"react-tooltip": "^5.28.0",
"remark-directive": "^4.0.0",
"remark-github": "^12.0.0",
"semver": "^7.7.1"
@ -4069,31 +4069,27 @@
"integrity": "sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw==",
"license": "MIT"
},
"node_modules/@floating-ui/core": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz",
"integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==",
"node_modules/@goauthentik/docusaurus-config": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@goauthentik/docusaurus-config/-/docusaurus-config-1.0.4.tgz",
"integrity": "sha512-SV9xfAPZprbKG8merT+F5oB28549i8NfFPAr2nM9jP5ftJPRSVs/d6xPE32n+FzlJrq+yxdo7pR115RCJKLU6g==",
"license": "MIT",
"dependencies": {
"@floating-ui/utils": "^0.2.1"
"deepmerge-ts": "^7.1.5",
"prism-react-renderer": "^2.4.1"
},
"engines": {
"node": ">=20.11"
},
"peerDependencies": {
"@docusaurus/core": "^3.7.0",
"@docusaurus/preset-classic": "^3.7.0",
"@docusaurus/theme-common": "^3.7.0",
"@docusaurus/theme-mermaid": "^3.7.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
}
},
"node_modules/@floating-ui/dom": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.2.tgz",
"integrity": "sha512-xymkSSowKdGqo0SRr2Mp4czH5A8o2Pum35PAD0ftb3gCcPacWzwhvtUeUqmVXm9EVtm2hThD/lRrFNcahMOaSQ==",
"license": "MIT",
"dependencies": {
"@floating-ui/core": "^1.0.0",
"@floating-ui/utils": "^0.2.0"
}
},
"node_modules/@floating-ui/utils": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz",
"integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==",
"license": "MIT"
},
"node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
@ -9641,6 +9637,15 @@
"node": ">=0.10.0"
}
},
"node_modules/deepmerge-ts": {
"version": "7.1.5",
"resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz",
"integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==",
"license": "BSD-3-Clause",
"engines": {
"node": ">=16.0.0"
}
},
"node_modules/default-gateway": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
@ -21425,19 +21430,6 @@
"react-dom": ">= 15.3.0 < 19"
}
},
"node_modules/react-tooltip": {
"version": "5.28.0",
"resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-5.28.0.tgz",
"integrity": "sha512-R5cO3JPPXk6FRbBHMO0rI9nkUG/JKfalBSQfZedZYzmqaZQgq7GLzF8vcCWx6IhUCKg0yPqJhXIzmIO5ff15xg==",
"dependencies": {
"@floating-ui/dom": "^1.6.1",
"classnames": "^2.3.0"
},
"peerDependencies": {
"react": ">=16.14.0",
"react-dom": ">=16.14.0"
}
},
"node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",

View File

@ -17,6 +17,7 @@
"watch": "cp -f ../schema.yml ./static/schema.yml && docusaurus gen-api-docs all && docusaurus start"
},
"dependencies": {
"@goauthentik/docusaurus-config": "^1.0.4",
"semver": "^7.7.1",
"@docusaurus/core": "^3.7.0",
"@docusaurus/faster": "^3.7.0",
@ -37,7 +38,6 @@
"react-dom": "^18.3.1",
"react-feather": "^2.0.10",
"react-toggle": "^4.1.3",
"react-tooltip": "^5.28.0",
"remark-directive": "^4.0.0",
"remark-github": "^12.0.0"
},

View File

@ -1,234 +0,0 @@
/* #region root */
:root {
--ifm-color-primary: #fd4b2d;
--ifm-color-primary-dark: #fd320f;
--ifm-color-primary-darker: #fb2602;
--ifm-color-primary-darkest: #cf1f02;
--ifm-color-primary-light: #fd644b;
--ifm-color-primary-lighter: #fd7159;
--ifm-color-primary-lightest: #fe9786;
--white: #e3e3e3;
--ifm-navbar-link-color: var(--white);
--ifm-navbar-link-hover-color: var(--ifm-color-gray-1000);
}
/* #endregion */
/* #region Buttons */
.button.button--outline {
color: var(--white) !important;
--ifm-button-border-color: var(--white) !important;
}
.button.button--outline:hover {
color: var(--ifm-color-gray-1000) !important;
--ifm-button-background-color: var(--white);
}
/* #endregion */
/* #region Navbar */
.navbar {
background-color: var(--ifm-color-primary);
box-shadow: none;
}
.navbar__logo {
margin: 0 0.75rem;
}
/* Match color of light/dark theme switch */
.navbar__items--right svg,
.navbar-sidebar__brand svg {
color: var(--white);
stroke: var(--white);
}
/* #endregion */
/* #region Header */
.header-github-link:hover {
opacity: 0.6;
}
.header-github-link::before {
content: "";
width: 24px;
height: 24px;
display: flex;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
no-repeat;
}
.header-discord-link:hover {
opacity: 0.6;
}
.header-discord-link::before {
content: "";
width: 24px;
height: 19px;
display: flex;
background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20127.14%2096.36%22%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill%3A%23fff%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22%E5%9B%BE%E5%B1%82_2%22%20data-name%3D%22%E5%9B%BE%E5%B1%82%202%22%3E%3Cg%20id%3D%22Discord_Logos%22%20data-name%3D%22Discord%20Logos%22%3E%3Cg%20id%3D%22Discord_Logo_-_Large_-_White%22%20data-name%3D%22Discord%20Logo%20-%20Large%20-%20White%22%3E%3Cpath%20class%3D%22cls-1%22%20d%3D%22M107.7%2C8.07A105.15%2C105.15%2C0%2C0%2C0%2C81.47%2C0a72.06%2C72.06%2C0%2C0%2C0-3.36%2C6.83A97.68%2C97.68%2C0%2C0%2C0%2C49%2C6.83%2C72.37%2C72.37%2C0%2C0%2C0%2C45.64%2C0%2C105.89%2C105.89%2C0%2C0%2C0%2C19.39%2C8.09C2.79%2C32.65-1.71%2C56.6.54%2C80.21h0A105.73%2C105.73%2C0%2C0%2C0%2C32.71%2C96.36%2C77.7%2C77.7%2C0%2C0%2C0%2C39.6%2C85.25a68.42%2C68.42%2C0%2C0%2C1-10.85-5.18c.91-.66%2C1.8-1.34%2C2.66-2a75.57%2C75.57%2C0%2C0%2C0%2C64.32%2C0c.87.71%2C1.76%2C1.39%2C2.66%2C2a68.68%2C68.68%2C0%2C0%2C1-10.87%2C5.19%2C77%2C77%2C0%2C0%2C0%2C6.89%2C11.1A105.25%2C105.25%2C0%2C0%2C0%2C126.6%2C80.22h0C129.24%2C52.84%2C122.09%2C29.11%2C107.7%2C8.07ZM42.45%2C65.69C36.18%2C65.69%2C31%2C60%2C31%2C53s5-12.74%2C11.43-12.74S54%2C46%2C53.89%2C53%2C48.84%2C65.69%2C42.45%2C65.69Zm42.24%2C0C78.41%2C65.69%2C73.25%2C60%2C73.25%2C53s5-12.74%2C11.44-12.74S96.23%2C46%2C96.12%2C53%2C91.08%2C65.69%2C84.69%2C65.69Z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E")
no-repeat;
}
/* #endregion */
@media (min-width: 1600px) {
#__docusaurus_skipToContent_fallback > div {
align-self: center;
max-width: 1600px;
width: 1600px;
}
}
.navbar .navbar__inner {
margin: 0 auto;
max-width: 1600px;
}
/* Load new font as Roboto */
@font-face {
font-family: "superMario";
src: url("https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap");
}
/* #region Containers */
body {
font-family: "Roboto", sans-serif;
}
.content {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
/* #endregion */
/* #region Sidebar */
/* 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);
margin-right: -0.5rem;
}
/* #endregion */
/* #region Navbar */
/* Nav header background color on mobile */
.navbar-sidebar__brand,
.navbar-sidebar__items {
background-color: var(--ifm-color-primary);
}
/* #endregion */
/* #region Badges */
.anchor > .badge {
font-size: 0.75rem;
vertical-align: middle;
}
.anchor > .badge {
margin-left: 0.5rem;
}
.badge--support-vendor {
--ifm-badge-background-color: var(--ifm-color-warning-contrast-background);
--ifm-badge-color: var(--ifm-color-warning-contrast-foreground);
--ifm-badge-border-color: var(--ifm-color-warning-contrast-foreground);
}
.badge--support-community {
--ifm-badge-background-color: var(
--ifm-color-secondary-contrast-foreground
);
--ifm-badge-border-color: var(--ifm-color-secondary-dark);
--ifm-badge-color: var(--ifm-color-secondary-contrast-background);
}
.badge--support-deprecated {
--ifm-badge-background-color: var(--ifm-color-danger);
--ifm-badge-border-color: var(--ifm-color-danger-contrast-background);
--ifm-badge-color: var(--ifm-color-danger-contrast-foreground);
}
.badge--support-authentik {
--ifm-badge-background-color: var(--ifm-color-primary);
--ifm-badge-border-color: var(--ifm-color-secondary);
--ifm-badge-color: var(--ifm-color-secondary);
}
.badge--version {
--ifm-badge-background-color: var(--ifm-color-primary-contrast-background);
--ifm-badge-border-color: var(--ifm-color-primary-contrast-foreground);
--ifm-badge-color: var(--ifm-color-primary-contrast-foreground);
}
.badge--preview {
--ifm-badge-background-color: rgb(115, 188, 247);
--ifm-badge-border-color: var(--ifm-badge-background-color);
--ifm-badge-color: var(--ifm-color-primary-contrast-foreground);
}
.badge-group {
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
/* #endregion */
/* #region Mermaid */
.docusaurus-mermaid-container {
/* Improve contrast. */
& .messageText {
stroke: var(--ifm-background-color) !important;
stroke-width: 4;
fill: var(--ifm-color-content) !important;
paint-order: stroke;
}
}
/* #endregion */
.markdown {
/* Remove empty table headers. */
& table > thead:has(> tr > th:empty):not(:has(> tr > th:not(:empty))) {
display: none;
}
}
.contains-task-list {
input[type="checkbox"] {
appearance: none;
}
input[type="checkbox"]::after {
content: "✓";
color: var(--ifm-color-success-dark);
display: inline-block;
}
}