2024-06-07 09:54:19 +00:00
# Theming
2024-06-01 14:28:22 +00:00
## Change theme
2024-06-07 09:54:19 +00:00
2024-07-09 14:42:43 +00:00
The default theme can be changed using the yaml configuration file
2024-06-01 14:28:22 +00:00
```yaml
theme: default # 'default', 'walkxcode', or 'neon' see files in 'src/assets/themes'.
```
## Colors and background customization
2024-07-09 14:42:43 +00:00
Default colors and background can be customized for each theme variant (light and dark), using either the yaml config file, or the css variables (see "Additional stylesheets" below).
2024-06-01 14:28:22 +00:00
### Available options
| yaml | css | description |
| --------------------- | ----------------------- | --- |
| `highlight-primary` | `--highlight-primary` | header background, group title icons |
| `highlight-secondary` | `--highlight-secondary` | navbar background, default tag color |
| `highlight-hover` | `--highlight-hover` | navbar links hover, search input background |
| `background` | `--background` | page background color |
| `card-background` | `--card-background` | service card background color |
| `text` | `--text` | main text color |
| `text-header` | `--text-header` | header text color |
| `text-title` | `--text-title` | service card title color |
| `text-subtitle` | `--text-subtitle` | service card subtitle color |
| `card-shadow` | `--card-shadow` | Service card `box-shadow` |
| `link` | `--link` | Links color (footer & message), service card icon color |
| `link-hover` | `--link-hover` | Links hover color (footer & message), service card icon hover color |
2024-10-25 19:58:32 +00:00
| `background-image` | `--background-image` | page background image url (when used in css, set `url(<image-url>)` instead of just the url. see example below)|
2024-06-01 14:28:22 +00:00
2024-07-09 14:42:43 +00:00
YAML example
2024-06-07 09:54:19 +00:00
```yml
colors:
light:
highlight-primary: "#3367d6"
2024-06-01 14:28:22 +00:00
background-image: "assets/your/light/bg.webp"
...
2024-06-07 09:54:19 +00:00
dark:
highlight-primary: "#3367d6"
2024-06-01 14:28:22 +00:00
background-image: "assets/your/dark/bg.webp"
...
```
2024-07-09 14:42:43 +00:00
CSS example
2024-06-01 14:28:22 +00:00
```css
.light {
--highlight-primary: #3367d6 ;
--background-image: url("assets/your/light/bg.webp");
...
}
.dark {
--highlight-primary: #3367d6 ;
--background-image: url("assets/your/dark/bg.webp");
...
}
2024-06-07 09:54:19 +00:00
```
## Additional stylesheets
2024-06-01 14:28:22 +00:00
One or more additional stylesheets can be loaded to add or override style from the current theme. Use the 'stylesheet' option in the yaml configuration file to load your own CSS file.
2024-06-07 09:54:19 +00:00
```yml
stylesheet:
- "assets/custom.css"
```
2024-10-25 19:58:32 +00:00
### Customization example
2024-06-07 09:54:19 +00:00
#### Max width modification
```css
body #main -section .container {
max-width: 2000px; // adjust to your needs (eg: calc(100% - 100px), none, ...)
}
```
2024-10-25 19:58:32 +00:00
#### Background gradient
2024-06-07 09:54:19 +00:00
```css
#app {
height: 100%;
background: linear-gradient(90deg, #5c2483 , #0095db );
}
```