]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - docs/configuration.md
Add support for a message icon
[github/bastienwirtz/homer.git] / docs / configuration.md
CommitLineData
1bc75494
BW
1## Configuration
2
b102c9b2 3Title, icons, links, colors, and services can be configured in the `config.yml` file (located in `/assets` directory once built, or in the `public/assets` directory in developement mode), using [yaml](http://yaml.org/) format.
1bc75494
BW
4
5```yaml
6---
7# Homepage configuration
8# See https://fontawesome.com/icons for icons options
9
10# Optional: Use external configuration file.
11# Using this will ignore remaining config in this file
12# externalConfig: https://example.com/server-luci/config.yaml
13
14title: "App dashboard"
15subtitle: "Homer"
a02961b7 16# documentTitle: "Welcome" # Customize the browser tab text
ffe3404a 17logo: "assets/logo.png"
1bc75494
BW
18# Alternatively a fa icon can be provided:
19# icon: "fas fa-skull-crossbones"
20
21header: true # Set to false to hide the header
22footer: '<p>Created with <span class="has-text-danger">❤️</span> with <a href="https://bulma.io/">bulma</a>, <a href="https://vuejs.org/">vuejs</a> & <a href="https://fontawesome.com/">font awesome</a> // Fork me on <a href="https://github.com/bastienwirtz/homer"><i class="fab fa-github-alt"></i></a></p>' # set false if you want to hide it.
23
24columns: "3" # "auto" or number (must be a factor of 12: 1, 2, 3, 4, 6, 12)
25connectivityCheck: true # whether you want to display a message when the apps are not accessible anymore (VPN disconnected for example)
26
27# Optional theming
28theme: default # 'default' or one of the theme available in 'src/assets/themes'.
29
71cf63eb 30# Optional custom stylesheet
8e5ee54a
GC
31# Will load custom CSS files. Especially useful for custom icon sets.
32# stylesheet:
33# - "assets/custom.css"
71cf63eb 34
1bc75494
BW
35# Here is the exaustive list of customization parameters
36# However all value are optional and will fallback to default if not set.
37# if you want to change only some of the colors, feel free to remove all unused key.
38colors:
39 light:
40 highlight-primary: "#3367d6"
41 highlight-secondary: "#4285f4"
42 highlight-hover: "#5a95f5"
43 background: "#f5f5f5"
44 card-background: "#ffffff"
45 text: "#363636"
46 text-header: "#424242"
47 text-title: "#303030"
48 text-subtitle: "#424242"
49 card-shadow: rgba(0, 0, 0, 0.1)
50 link-hover: "#363636"
154e6efe 51 background-image: "assets/your/light/bg.png"
1bc75494
BW
52 dark:
53 highlight-primary: "#3367d6"
54 highlight-secondary: "#4285f4"
55 highlight-hover: "#5a95f5"
56 background: "#131313"
57 card-background: "#2b2b2b"
58 text: "#eaeaea"
59 text-header: "#ffffff"
60 text-title: "#fafafa"
61 text-subtitle: "#f5f5f5"
62 card-shadow: rgba(0, 0, 0, 0.4)
63 link-hover: "#ffdd57"
154e6efe 64 background-image: "assets/your/dark/bg.png"
1bc75494
BW
65
66# Optional message
67message:
68 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
69 style: "is-warning"
70 title: "Optional message!"
0e045b4c 71 icon: "fa fa-exclamation-triangle"
1bc75494
BW
72 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
73
74# Optional navbar
75# links: [] # Allows for navbar (dark mode, layout, and search) without any links
76links:
77 - name: "Link 1"
78 icon: "fab fa-github"
79 url: "https://github.com/bastienwirtz/homer"
80 target: "_blank" # optional html tag target attribute
81 - name: "link 2"
82 icon: "fas fa-book"
83 url: "https://github.com/bastienwirtz/homer"
84
85# Services
86# First level array represent a group.
87# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
88services:
89 - name: "Application"
90 icon: "fa fa-code-fork"
91 items:
92 - name: "Awesome app"
93 logo: "assets/tools/sample.png"
94 # Alternatively a fa icon can be provided:
95 # icon: "fab fa-jenkins"
96 subtitle: "Bookmark example"
97 tag: "app"
98 url: "https://www.reddit.com/r/selfhosted/"
99 target: "_blank" # optional html tag target attribute
100 - name: "Another one"
101 logo: "assets/tools/sample2.png"
102 subtitle: "Another application"
103 tag: "app"
104 # Optional tagstyle
105 tagstyle: "is-success"
106 url: "#"
107 - name: "Other group"
108 icon: "fas fa-heartbeat"
109 items:
110 - name: "Another app"
111 logo: "assets/tools/sample.png"
112 subtitle: "Another example"
113 tag: "other"
114 url: "https://www.reddit.com/r/selfhosted/"
e9afa4d7
TP
115 target: "_blank" # optional html a tag target attribute
116 # class: "green" # optional custom CSS class for card, useful with custom stylesheet
1bc75494
BW
117```
118
119If you choose to fetch message information from an endpoint, the output format should be:
120
121```json
122{
123 "style": null,
124 "title": "Lorem ipsum 42",
125 "content": "LA LA LA Lorem ipsum dolor sit amet, ....."
126}
127```
128
129`null` value or missing keys will be ignored and value from the `config.yml` will be used if available.
130Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar).
131
132### Style Options
133
134Homer uses [bulma CSS](https://bulma.io/), which provides a [modifiers syntax](https://bulma.io/documentation/modifiers/syntax/). You'll notice in the config there is a `tagstyle` option. It can be set to any of the bulma modifiers. You'll probably want to use one of these 4 main colors:
135
136- `is-info` (blue)
137- `is-success` (green)
138- `is-warning` (yellow)
139- `is-danger` (red)
140
141You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state.
d1b9dea2
BW
142
143### PWA Icons
144
145In order to easily generate all required icon preset for the PWA to work, a tool like [vue-pwa-asset-generator](https://www.npmjs.com/package/vue-pwa-asset-generator) can be used:
146
147```bash
148npx vue-pwa-asset-generator -a {your_512x512_source_png} -o {your_output_folder}
149```