From 8285b7cb1b5ae76d133f19fc178047d47835196b Mon Sep 17 00:00:00 2001 From: Attila Greguss Date: Wed, 18 Dec 2024 13:21:49 +0000 Subject: [PATCH] Add docs on how to customize theme --- .../content/docs/advanced/customization.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/exampleSite/content/docs/advanced/customization.md b/exampleSite/content/docs/advanced/customization.md index 5c37b79..3765d4c 100644 --- a/exampleSite/content/docs/advanced/customization.md +++ b/exampleSite/content/docs/advanced/customization.md @@ -44,6 +44,89 @@ The primary color of the theme can be customized by setting the `--primary-hue`, } ``` +### Further Theme Customization + +The theme can be further customized by overriding the default styles. An example for customizing the footer element: + +```css {filename="assets/css/custom.css"} +.hextra-footer { + /* Styles will be applied to the footer element */ +} + +.hextra-footer:is(html[class~="dark"] *) { + /* Styles will be applied to the footer element in dark mode */ +} + +``` + +The following classes can be used to customize various parts of the theme. + +#### General + +- `hextra-scrollbar` - The scrollbar element +- `content` - Page content container + +#### Shortcodes + +##### Badge + +- `hextra-badge` - The badge element + +##### Card + +- `hextra-card` - The badge element +- `hextra-card-image` - The card image element +- `hextra-card-icon` - The card icon element +- `hextra-card-subtitle` - The card subtitle element + +#### Cards + +- `hextra-cards` - The cards grid container + +#### Navbar + +- `nav-container` - The navbar container +- `nav-container-blur` - The navbar container in blur element +- `hamburger-menu` - The hamburger menu button + +#### Footer + +- `hextra-footer` - The footer element + +#### Search + +- `search-wrapper` - The search wrapper container +- `search-input` - The search input element +- `search-results` - The search results list container + +#### Table of Contents + +- `hextra-toc` - The table of contents container + +#### Sidebar + +- `mobile-menu-overlay` - The overlay element for the mobile menu +- `sidebar-container` - The sidebar container +- `sidebar-active-item` - The active item in the sidebar + +#### Language Switcher + +- `language-switcher` - The language switcher button +- `language-options` - The language options container + +#### Theme Toggle + +- `theme-toggle` - The theme toggle button + +#### Cody Copy Button + +- `hextra-code-copy-btn-container` - The code copy button container +- `hextra-code-copy-btn` - The code copy button + +#### Breadcrumbs + +No specific class is available for breadcrumbs. + ### Syntax Highlighting List of available syntax highlighting themes are available at [Chroma Styles Gallery](https://xyproto.github.io/splash/docs/all.html). The stylesheet can be generated using the command: