Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,24 @@ const config = {
{ to: '/blog', label: 'Blog', position: 'left' },
{ href: 'https://8th.io/discord', label: 'Discord', position: 'left' },
{ to: '/docs', label: 'Docs', position: 'left' },
{ type: 'search', position: 'right' },
{
type: 'html',
position: 'right',
value: '<a href="/downloads" class="btn btn-primary navbar-download-btn">Download</a>',
},
],
},

/* Algolia keys are managed here https://dashboard.algolia.com/account/api-keys/all?applicationId=4OEBKHRDF1 */
algolia: {
appId: '4OEBKHRDF1',
apiKey: '1b345ffba80eb2203110909c7cd6775b',
indexName: 'Documentation',
},
footer: {},
metadata: [
{ name: 'algolia-site-verification', content: '9440827CF3D84DC9' },
{ property: 'og:image', content: 'https://8thwall.org/social-cover.png' },
{ property: 'og:type', content: 'website' },
{ name: 'twitter:image', content: 'https://8thwall.org/social-cover.png' },
Expand Down
162 changes: 158 additions & 4 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,167 @@
text-decoration: none !important;
}

/* Hide Download button in nav when already on downloads page or on legacy-policy pages */
/* Hide Download button in nav when already on downloads page, legacy-policy pages, or mobile */
html:has(.downloads-hero) .navbar-download-btn,
html.plugin-id-legacy-policies .navbar-download-btn {
display: none !important;
display: none;
}

@media (max-width: 996px) {
html.docs-doc-page:not(.plugin-id-legacy-policies) .navbar-download-btn {
display: none;
}
}

/* Hide search bar on non-docs pages */
body .DocSearch-Button { display: none; }
html.docs-doc-page:not(.plugin-id-legacy-policies) body .DocSearch-Button { display: flex; }

/* DocSearch button styling */
body .DocSearch-Button {
font-family: var(--font-family);
font-size: 0.875rem;
background-color: var(--color-bg-card);
color: var(--color-text-secondary);
border: 1px solid var(--color-border);
border-radius: var(--radius-lg);
padding: 8px 16px;
height: auto;
width: auto;
transition: border-color 0.2s, color 0.2s;
gap: 8px;
}

/* Hide search bar if no search plugin is configured */
.navbar__search { display: none; }
body .DocSearch-Button:hover {
border-color: var(--color-primary);
color: var(--color-text);
background-color: var(--color-bg-card);
box-shadow: none;
}

body .DocSearch-Button-Placeholder {
font-family: var(--font-family);
font-size: 0.875rem;
color: inherit;
}

body .DocSearch-Search-Icon {
color: inherit;
width: 14px;
height: 14px;
}

body .DocSearch-Button-Keys {
display: flex;
gap: 2px;
}

body .DocSearch-Button-Key {
font-family: var(--font-family);
font-size: 0.75rem;
background-color: var(--color-bg-alt);
color: var(--color-text-muted);
border: 1px solid var(--color-border-light);
border-radius: var(--radius-sm);
padding: 2px 4px;
box-shadow: none;
}

/* DocSearch modal theme — higher specificity than DocSearch's html[data-theme='dark'] */
html[data-theme='dark']:root {
--docsearch-primary-color: var(--color-primary);
--docsearch-highlight-color: var(--color-primary);
--docsearch-text-color: var(--color-text);
--docsearch-secondary-text-color: var(--color-text-secondary);
--docsearch-muted-color: var(--color-text-muted);
--docsearch-icon-color: var(--color-text-secondary);
--docsearch-focus-color: var(--color-primary);
--docsearch-subtle-color: var(--color-border);
--docsearch-background-color: var(--color-bg-card);
--docsearch-modal-background: var(--color-bg);
--docsearch-modal-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
--docsearch-searchbox-background: var(--color-bg-card);
--docsearch-searchbox-focus-background: var(--color-bg-card);
--docsearch-hit-color: var(--color-text);
--docsearch-hit-background: var(--color-bg-card);
--docsearch-dropdown-menu-item-hover-background: var(--color-bg-card-active);
--docsearch-hit-highlight-color: rgba(168, 85, 247, 0.15);
--docsearch-hit-shadow: none;
--docsearch-key-background: var(--color-bg);
--docsearch-key-color: var(--color-text-muted);
--docsearch-container-background: rgba(0, 0, 0, 0.75);
--docsearch-footer-background: var(--color-bg-alt);
--docsearch-footer-shadow: inset 0 1px 0 var(--color-border);
--docsearch-logo-color: var(--color-text-secondary);
--docsearch-error-color: #ef5350;
--docsearch-border-radius: var(--radius-lg);
}

/* DocSearch modal border */
body .DocSearch-Container {
overflow: visible;
}

body .DocSearch-Modal {
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
position: relative;
}

body .DocSearch-Modal::before {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
border: 1px solid var(--color-border);
pointer-events: none;
z-index: 9999;
}

/* DocSearch modal font */
body .DocSearch-Modal,
body .DocSearch-Form,
body .DocSearch-Input,
body .DocSearch-Hit-title,
body .DocSearch-Hit-path,
body .DocSearch-Label,
body .DocSearch-Help,
body .DocSearch-Footer {
font-family: var(--font-family);
}

body .DocSearch-Hit[aria-selected='true'] a {
background-color: var(--color-bg-card-active);
border-color: var(--color-primary);
}

body .DocSearch-Hit a {
border: 1px solid transparent;
border-radius: var(--radius-md);
}

body .DocSearch-Input {
color: var(--color-text);
}

body .DocSearch-MagnifierLabel,
body .DocSearch-Reset {
color: var(--color-text-secondary);
}

body .DocSearch-Hit-highlight {
color: var(--color-primary);
text-decoration: none;
}

body .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-icon {
color: var(--color-primary);
}

body .DocSearch-Hit[aria-selected='true'] mark {
color: var(--color-primary);
}

/* Force dark background on main content wrapper */
main,
Expand Down Expand Up @@ -215,6 +368,7 @@ div[class*="announcementBar"] .banner-btn:hover {
--color-bg-alt: #111111;
--color-bg-card: #1a1a1a;
--color-bg-card-hover: #222222;
--color-bg-card-active: #262626;
--color-text: #ffffff;
--color-text-secondary: #a1a1a1;
--color-text-muted: #8a8a8a;
Expand Down
Loading