This commit is contained in:
Sven Steinert
2026-05-13 11:57:52 +02:00
parent 6abf6f9c3d
commit f4511b9213
76 changed files with 4494 additions and 1940 deletions

View File

@@ -0,0 +1,210 @@
.kb-docs-wrap {
--kb-surface: var(--wp--preset--color--base, #ffffff);
--kb-surface-muted: color-mix(in srgb, var(--kb-surface) 88%, #eef3f8);
--kb-text: var(--wp--preset--color--contrast, #1f2933);
--kb-muted: #667085;
--kb-border: color-mix(in srgb, var(--kb-text) 14%, transparent);
--kb-accent: var(--wp--preset--color--accent-3, #2563eb);
--kb-accent-soft: color-mix(in srgb, var(--kb-accent) 10%, var(--kb-surface));
color: var(--kb-text);
}
.kb-docs-wrap {
max-width: 1320px;
margin: 0 auto;
padding: 24px 20px 48px;
}
.kb-product-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 16px;
}
.kb-product-card,
.kb-search {
border: 1px solid var(--kb-border);
border-radius: 8px;
padding: 20px;
background: var(--kb-surface);
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.kb-product-card h2 {
margin-top: 0;
font-size: 20px;
}
.kb-product-card ul,
.kb-version-list,
.kb-page-list {
margin-left: 0;
padding-left: 0;
list-style: none;
}
.kb-product-card li,
.kb-version-list li,
.kb-page-list li {
margin: 7px 0;
}
.kb-doc-layout {
display: grid;
grid-template-columns: 300px minmax(0, 1fr);
gap: 40px;
align-items: start;
}
.kb-sidebar {
position: sticky;
top: 24px;
max-height: calc(100vh - 48px);
overflow: auto;
border-right: 1px solid var(--kb-border);
padding: 8px 22px 16px 0;
}
.kb-sidebar select,
.kb-search input {
width: 100%;
min-height: 40px;
border: 1px solid var(--kb-border);
border-radius: 6px;
background: var(--kb-surface);
color: var(--kb-text);
}
.kb-sidebar-nav ul {
list-style: none;
margin: 12px 0 0;
padding-left: 0;
}
.kb-sidebar-nav ul ul {
padding-left: 16px;
}
.kb-sidebar-nav a,
.kb-sidebar-nav span {
display: block;
padding: 6px 8px;
border-radius: 4px;
font-size: 14px;
line-height: 1.35;
text-decoration: none;
color: var(--kb-text);
}
.kb-sidebar-nav a:hover {
background: var(--kb-accent-soft);
color: var(--kb-accent);
}
.kb-breadcrumbs {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 18px;
color: var(--kb-muted);
font-size: 14px;
}
.kb-breadcrumbs a {
color: inherit;
text-decoration: none;
}
.kb-breadcrumbs a:hover {
color: var(--kb-accent);
}
.kb-rendered-content pre {
overflow: auto;
padding: 16px;
background: #1e1e1e;
color: #f8f8f2;
border-radius: 6px;
}
.kb-doc-content {
max-width: 860px;
min-width: 0;
}
.kb-doc-content > h1 {
margin-top: 0;
margin-bottom: 22px;
font-size: clamp(28px, 4vw, 42px);
line-height: 1.1;
}
.kb-rendered-content h1 {
display: none;
}
.kb-rendered-content h2,
.kb-rendered-content h3,
.kb-rendered-content h4 {
scroll-margin-top: 24px;
margin-top: 32px;
}
.kb-rendered-content p,
.kb-rendered-content li {
line-height: 1.7;
}
.kb-rendered-content a {
color: var(--kb-accent);
text-underline-offset: 3px;
}
.kb-admonition {
border-left: 4px solid var(--kb-accent);
border-radius: 0 6px 6px 0;
padding: 14px 16px;
background: var(--kb-accent-soft);
margin: 18px 0;
}
.kb-image img {
max-width: 100%;
height: auto;
}
.kb-current-version {
margin-left: 8px;
font-size: 12px;
color: var(--kb-accent);
}
.kb-search-form {
display: flex;
gap: 8px;
}
.kb-search button {
min-height: 40px;
border: 0;
border-radius: 6px;
padding: 0 16px;
background: var(--kb-accent);
color: #fff;
cursor: pointer;
}
@media (max-width: 780px) {
.kb-doc-layout {
grid-template-columns: 1fr;
}
.kb-sidebar {
position: static;
max-height: none;
border-right: 0;
border-bottom: 1px solid var(--kb-border);
padding-right: 0;
padding-bottom: 18px;
}
}

View File

@@ -0,0 +1,154 @@
@font-face {
font-family: "URW Gothic L Demi";
src: url("../../fonts/urw_gothic_l_demi.ttf") format("truetype");
font-style: normal;
font-weight: 600;
font-display: swap;
}
@font-face {
font-family: "Nunito";
src: url("../../fonts/Nunito-VariableFont_wght.ttf") format("truetype");
font-style: normal;
font-weight: 200 900;
font-display: swap;
}
@font-face {
font-family: "Nunito";
src: url("../../fonts/Nunito-Italic-VariableFont_wght.ttf") format("truetype");
font-style: italic;
font-weight: 200 900;
font-display: swap;
}
.kb-docs-wrap {
--kb-primary: #00a7e6;
--kb-primary-soft: #33b9eb;
--kb-primary-shade: #0086b8;
--kb-ob-accent: #f59c00;
--kb-slate: #343537;
--kb-bg: #f5fbfe;
--kb-surface: #ffffff;
--kb-surface-muted: #f5fbfe;
--kb-text: #343537;
--kb-muted: rgba(52, 53, 55, 0.72);
--kb-border: rgba(52, 53, 55, 0.15);
--kb-accent: var(--kb-primary);
--kb-accent-soft: rgba(0, 167, 230, 0.1);
--kb-radius: 14px;
--kb-shadow: 0 18px 40px rgba(52, 53, 55, 0.11);
--kb-font-body: "Nunito", "Segoe UI", Arial, sans-serif;
--kb-font-heading: "Nunito", "Segoe UI", Arial, sans-serif;
--kb-font-strong: "URW Gothic L Demi", "Nunito", "Segoe UI", Arial, sans-serif;
font-family: var(--kb-font-body);
line-height: 1.58;
}
.kb-docs-wrap a:focus,
.kb-docs-wrap button:focus,
.kb-docs-wrap input:focus,
.kb-docs-wrap select:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(0, 167, 230, 0.32);
}
.kb-docs-wrap h1,
.kb-docs-wrap h2,
.kb-docs-wrap h3,
.kb-docs-wrap h4 {
font-family: var(--kb-font-heading);
color: var(--kb-text);
}
.kb-doc-content > h1 {
font-family: var(--kb-font-strong);
font-weight: 600;
letter-spacing: 0;
}
.kb-product-card,
.kb-search {
border-radius: var(--kb-radius);
border-color: var(--kb-border);
box-shadow: var(--kb-shadow);
}
.kb-product-card h2 a {
color: var(--kb-text);
text-decoration: none;
}
.kb-product-card h2 a:hover {
color: var(--kb-primary);
}
.kb-sidebar {
border-right-color: var(--kb-border);
}
.kb-sidebar select {
border-radius: 11px;
font-family: var(--kb-font-body);
}
.kb-sidebar-nav a,
.kb-sidebar-nav span {
border-radius: 11px;
}
.kb-sidebar-nav a:hover {
background: rgba(0, 167, 230, 0.12);
color: var(--kb-primary-shade);
}
.kb-breadcrumbs {
color: var(--kb-muted);
}
.kb-rendered-content p,
.kb-rendered-content li {
font-size: 17px;
}
.kb-rendered-content h2 {
font-size: clamp(26px, 3vw, 32px);
line-height: 1.12;
font-weight: 700;
}
.kb-rendered-content h3 {
font-size: 21px;
line-height: 1.2;
font-weight: 700;
}
.kb-rendered-content a {
color: var(--kb-primary-shade);
}
.kb-rendered-content pre {
background: #eef3f6;
color: var(--kb-text);
border: 1px solid var(--kb-border);
}
.kb-admonition {
border-left-color: var(--kb-primary);
background: rgba(0, 167, 230, 0.1);
}
.kb-current-version {
color: var(--kb-primary-shade);
}
.kb-search button {
border-radius: 12px;
background: linear-gradient(132deg, var(--kb-primary) 0%, var(--kb-primary-soft) 100%);
font-family: var(--kb-font-strong);
font-weight: 600;
}
.kb-search button:hover {
filter: brightness(1.06);
}

View File

@@ -0,0 +1,32 @@
(function ($) {
const button = $('#kb-markdown-upload-theme-css');
const input = $('#custom_theme_css_url');
if (!button.length || !input.length || typeof wp === 'undefined' || !wp.media) {
return;
}
button.on('click', function (event) {
event.preventDefault();
const frame = wp.media({
title: 'Select theme.css',
button: {
text: 'Use this CSS file'
},
multiple: false,
library: {
type: ['text/css', 'text/plain']
}
});
frame.on('select', function () {
const attachment = frame.state().get('selection').first().toJSON();
if (attachment && attachment.url) {
input.val(attachment.url);
}
});
frame.open();
});
}(jQuery));

View File

@@ -0,0 +1,13 @@
(function () {
const switcher = document.getElementById('kb-version-switcher');
if (!switcher) {
return;
}
switcher.addEventListener('change', function () {
const selected = switcher.options[switcher.selectedIndex];
if (selected && selected.dataset.url) {
window.location.href = selected.dataset.url;
}
});
}());