Skip to content

Commit

Permalink
doc(theming): Describe customization options
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienwirtz committed Jun 7, 2024
1 parent e23868c commit 5935a62
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
- [Getting started](#getting-started)
- [Kubernetes Installation](docs/kubernetes.md)
- [Configuration](docs/configuration.md)
- [Theming](docs/theming.md)
- [Custom services](docs/customservices.md)
- [Tips & tricks](docs/tips-and-tricks.md)
- [Development](docs/development.md)
Expand Down
65 changes: 65 additions & 0 deletions docs/theming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Theming

## Customization from yaml configuration file

Some aspect of the theme can be customized using the yaml configuration file.

```yml
colors:
light:
highlight-primary: "#3367d6"
highlight-secondary: "#4285f4"
highlight-hover: "#5a95f5"
background: "#f5f5f5"
card-background: "#ffffff"
text: "#363636"
text-header: "#424242"
text-title: "#303030"
text-subtitle: "#424242"
card-shadow: rgba(0, 0, 0, 0.1)
link: "#3273dc"
link-hover: "#363636"
background-image: "assets/your/light/bg.png"
dark:
highlight-primary: "#3367d6"
highlight-secondary: "#4285f4"
highlight-hover: "#5a95f5"
background: "#131313"
card-background: "#2b2b2b"
text: "#eaeaea"
text-header: "#ffffff"
text-title: "#fafafa"
text-subtitle: "#f5f5f5"
card-shadow: rgba(0, 0, 0, 0.4)
link: "#3273dc"
link-hover: "#ffdd57"
background-image: "assets/your/dark/bg.png"
```
## Additional stylesheets
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 add CSS file to be used.
```yml
stylesheet:
- "assets/custom.css"
```
### customization exemple
#### Max width modification
```css
body #main-section .container {
max-width: 2000px; // adjust to your needs (eg: calc(100% - 100px), none, ...)
}
```

#### Background gradiant

```css
#app {
height: 100%;
background: linear-gradient(90deg, #5c2483, #0095db);
}
```
6 changes: 5 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ export default {
`${this.config.title} | ${this.config.subtitle}`;
if (this.config.stylesheet) {
let stylesheet = "";
for (const file of this.config.stylesheet) {
let addtionnal_styles = this.config.stylesheet;
if (!Array.isArray(this.config.stylesheet)) {
addtionnal_styles = [addtionnal_styles];
}
for (const file of addtionnal_styles) {
stylesheet += `@import "${file}";`;
}
this.createStylesheet(stylesheet);
Expand Down

0 comments on commit 5935a62

Please sign in to comment.