]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - README.md
Full offline support (local fonts)
[github/bastienwirtz/homer.git] / README.md
CommitLineData
09763dbf 1# Homer
7bb903e6 2
8aa8398f 3A dead simple static **HOM**epage for your serv**ER** to keep your services on hand, from a simple `yaml` configuration file.
09763dbf 4
5861f0f8 5**Check out the live demo [here](https://homer-demo.netlify.app).**
5fe53dce 6
a4de4a3a
JS
7It supports keyboard shortcuts:
8
b9c5fcf0
BW
9- `/` Start searching.
10- `Escape` Stop searching.
11- `Enter` Open the first matching result (respects the bookmark's `_target` property).
12- `Alt`/`Option` + `Enter` Open the first matching result in a new tab.
a4de4a3a 13
8aa8398f 14If you need authentication support, you're on your own (it can be secured using a web server auth module or exposing it only through a VPN network / SSH tunnel, ...)
09763dbf 15
22555b55 16![screenshot](https://raw.github.com/bastienwirtz/homer/master/screenshot.png)
09763dbf 17
22555b55
BW
18## Roadmap
19
b9c5fcf0
BW
20- [ ] Add more themes.
21- [ ] Add support for custom service card (add custom feature to some service / app link)
22- [x] Colors / theme customization
23- [x] Enable PWA support (making possible to "install" - add to homescreen - it)
24- [x] Improve maintainability (external library import & service workers cached file list.)
22555b55 25
b9c5fcf0 26## Usage
b79e6ed1
BW
27
28### Using docker
29
30```sh
46fd4f4d 31sudo docker run -p 8080:8080 -v /your/local/config.yml:/www/config.yml -v /your/local/assets/:/www/assets b4bz/homer:latest
b79e6ed1
BW
32```
33
34### Manually
35
b9c5fcf0
BW
36Homer is a static page that need to be generated from the source in this repository.
37Use the folowing command to build the project:
38
39```sh
40# Using yarn (recommended)
41yarn install
42yarn build
43
44# **OR** Using npm
45npm install
46npm run build
47```
48
49Then your dashboard is ready to use in the `/dist` directory.
50Use it like any static HTML content (use a webserver or open the html index directly).
51
52## Developement
53
54```sh
55# Using yarn (recommended)
56yarn install
57yarn serve
58
59# **OR** Using npm
60npm install
61npm run serve
62```
63
e1142750 64### Themes
b9c5fcf0 65
e1142750 66Themes are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)).
b9c5fcf0
BW
67To addd a new theme, just add a file in the theme directory, and put all style in the `body #app.theme-<name>` scope. Then import it in the main style file.
68
69```scss
70// `src/assets/themes/my-awesome-theme.scss`
71body #app.theme-my-awesome-theme. { ... }
72```
73
74```scss
75// `src/assets/app.scss`
76// Themes import
77@import "./themes/sui.scss";
78...
79@import "./themes/my-awesome-theme.scss";
80```
e41196e7 81
22555b55 82## Configuration
09763dbf 83
e1142750 84Title, icons, links, colors, and services can be configured in the `config.yml` file (located in project root directory once built, or in the `public/` directory in developement mode), using [yaml](http://yaml.org/) format.
09763dbf 85
09763dbf
BW
86```yaml
87---
88# Homepage configuration
e41196e7 89# See https://fontawesome.com/icons for icons options
09763dbf 90
b9c5fcf0 91title: "App dashboard"
09763dbf
BW
92subtitle: "Homer"
93logo: "assets/homer.png"
e41196e7 94# Alternatively a fa icon can be provided:
b9c5fcf0
BW
95# icon: "fas fa-skull-crossbones"
96
97header: true # Set to false to hide the header
98footer: '<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.header:
99
100# Optional theming
101theme: default # 'default' or one of the theme available in 'src/assets/themes'.
102
103# Here is the exaustive list of customization parameters
104# However all value are optional and will fallback to default if not set.
105# if you want to change only some of the colors, feel free to remove all unused key.
106colors:
107 light:
108 highlight-primary: "#3367d6"
109 highlight-secondary: "#4285f4"
110 highlight-hover: "#5a95f5"
111 background: "#f5f5f5"
112 card-background: "#ffffff"
113 text: "#363636"
114 text-header: "#424242"
115 text-title: "#303030"
116 text-subtitle: "#424242"
117 card-shadow: rgba(0, 0, 0, 0.1)
118 link-hover: "#363636"
119 dark:
120 highlight-primary: "#3367d6"
121 highlight-secondary: "#4285f4"
122 highlight-hover: "#5a95f5"
123 background: "#131313"
124 card-background: "#2b2b2b"
125 text: "#eaeaea"
126 text-header: "#ffffff"
127 text-title: "#fafafa"
128 text-subtitle: "#f5f5f5"
129 card-shadow: rgba(0, 0, 0, 0.4)
130 link-hover: "#ffdd57"
09763dbf
BW
131
132# Optional message
133message:
7fd9dc6f 134 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
e3212743 135 style: "is-warning"
09763dbf
BW
136 title: "Optional message!"
137 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula."
138
139# Optional navbar
5028088e 140# links: [] # Allows for navbar (dark mode, layout, and search) without any links
09763dbf
BW
141links:
142 - name: "ansible"
aabb7d53 143 icon: "fab fa-github"
09763dbf 144 url: "https://github.com/xxxxx/ansible/"
e1142750 145 target: "_blank" # optional html tag target attribute
09763dbf 146 - name: "Wiki"
aabb7d53 147 icon: "fas fa-book"
09763dbf
BW
148 url: "https://wiki.xxxxxx.com/"
149
150# Services
151# First level array represent a group.
7312bdd6 152# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
09763dbf
BW
153services:
154 - name: "DevOps"
aabb7d53 155 icon: "fa fa-code-fork"
09763dbf
BW
156 items:
157 - name: "Jenkins"
158 logo: "/assets/tools/jenkins.png"
e41196e7
BW
159 # Alternatively a fa icon can be provided:
160 # icon: "fab fa-jenkins"
09763dbf
BW
161 subtitle: "Continuous integration server"
162 tag: "CI"
163 url: "#"
e1142750 164 target: "_blank" # optional html tag target attribute
09763dbf
BW
165 - name: "RabbitMQ Management"
166 logo: "/assets/tools/rabbitmq.png"
167 subtitle: "Manage & monitor RabbitMQ server"
168 tag: "haproxy"
7312bdd6 169 # Optional tagstyle
a2fdb8a9 170 tagstyle: "is-success"
09763dbf
BW
171 url: "#"
172 - name: "Monitoring"
aabb7d53 173 icon: "fas fa-heartbeat"
09763dbf
BW
174 items:
175 - name: "M/Monit"
176 logo: "/assets/tools/monit.png"
177 subtitle: "Monitor & manage all monit enabled hosts"
178 tag: "monit"
179 url: "#"
180 - name: "Grafana"
181 logo: "/assets/tools/grafana.png"
182 subtitle: "Metric analytics & dashboards"
183 url: "#"
184 - name: "Kibana"
185 logo: "/assets/tools/elastic.png"
186 subtitle: "Explore & visualize logs"
187 tag: "elk"
188 url: "#"
189 - name: "Website monitoring"
190 logo: "/assets/tools/pingdom.png"
191 subtitle: "Pingdom public reports overview"
192 tag: "CI"
193 url: "#"
e41196e7 194```
7fd9dc6f
BW
195
196If you choose to fetch message information from an endpoint, the output format should be:
197
198```json
199{
7bb903e6
FB
200 "style": null,
201 "title": "Lorem ipsum 42",
202 "content": "LA LA LA Lorem ipsum dolor sit amet, ....."
7fd9dc6f
BW
203}
204```
205
206`null` value or missing keys will be ignored and value from the `config.yml` will be used if available.
22555b55 207Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar).
fcf5f412
IS
208
209### Style Options
210
211Homer 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:
212
213- `is-info` (blue)
214- `is-success` (green)
215- `is-warning` (yellow)
216- `is-danger` (red)
217
218You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state.