]>
Commit | Line | Data |
---|---|---|
09763dbf | 1 | # Homer |
e1470a8c BW |
2 | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) |
3 | [![Contribution Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com) | |
4 | [![Dowload](https://img.shields.io/badge/Dowload-homer.zip-orange)](https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip) | |
5 | [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/awesome-selfhosted/awesome-selfhosted) | |
7bb903e6 | 6 | |
e1470a8c BW |
7 | A dead simple static **HOM**epage for your serv**ER** to keep your s |
8 | ervices on hand, from a simple `yaml` configuration file. | |
09763dbf | 9 | |
e1470a8c BW |
10 | ## [Live demo](https://homer-demo.netlify.app). |
11 | ![screenshot](https://raw.github.com/bastienwirtz/homer/master/screenshot.png) | |
a4de4a3a | 12 | |
e1470a8c BW |
13 | ## Table of Contents |
14 | - [Features](#features) | |
15 | - [Getting started](#getting-started) | |
16 | - [Configuration](#configuration) | |
17 | - [Roadmap](#roadmap) | |
18 | - [Developement](#developement) | |
a4de4a3a | 19 | |
e1470a8c BW |
20 | ## Features |
21 | - [yaml](http://yaml.org/) file configuration | |
22 | - Installable (pwa) | |
23 | - Search | |
24 | - Grouping | |
25 | - Theme customization | |
26 | - Offline heathcheck | |
27 | - keyboard shortcuts: | |
28 | - `/` Start searching. | |
29 | - `Escape` Stop searching. | |
30 | - `Enter` Open the first matching result (respects the bookmark's `_target` property). | |
31 | - `Alt`/`Option` + `Enter` Open the first matching result in a new tab. | |
09763dbf | 32 | |
09763dbf | 33 | |
e1470a8c | 34 | ## Getting started |
22555b55 | 35 | |
e1470a8c | 36 | Homer is a full static html/js dashboard, generated from the source in `/src` using webpack. It's meant to be served by an HTTP server, **it will not work if you open dist/index.html directly over file:// protocol**. |
b79e6ed1 BW |
37 | |
38 | ### Using docker | |
39 | ||
40 | ```sh | |
2301d891 | 41 | docker run -p 8080:8080 -v /your/local/config.yml:/www/config.yml -v /your/local/assets/:/www/assets b4bz/homer:latest |
b79e6ed1 BW |
42 | ``` |
43 | ||
e1470a8c | 44 | ### Using the release tarball (prebuilt, ready to use) |
b9c5fcf0 | 45 | |
e1470a8c BW |
46 | Download and extract the latest the latest release (`homer.zip`) from the [release page](https://github.com/bastienwirtz/homer/releases), rename the `config.yml.dist` file to `config.yml`, and put it behind a webserver. |
47 | ||
b9c5fcf0 | 48 | ```sh |
e1470a8c BW |
49 | wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip |
50 | unzip homer.zip | |
51 | cd homer | |
52 | cp config.yml.dist config.yml | |
53 | npx serve # or python -m http.server 8010 or apache, nginx ... | |
b9c5fcf0 BW |
54 | ``` |
55 | ||
e1470a8c | 56 | ### Build manually |
b9c5fcf0 BW |
57 | |
58 | ```sh | |
59 | # Using yarn (recommended) | |
60 | yarn install | |
e1470a8c | 61 | yarn build |
b9c5fcf0 BW |
62 | |
63 | # **OR** Using npm | |
64 | npm install | |
e1470a8c | 65 | npm run build |
b9c5fcf0 BW |
66 | ``` |
67 | ||
e1470a8c | 68 | Then your dashboard is ready to use in the `/dist` directory. |
e41196e7 | 69 | |
22555b55 | 70 | ## Configuration |
09763dbf | 71 | |
e1142750 | 72 | Title, 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 | 73 | |
09763dbf BW |
74 | ```yaml |
75 | --- | |
76 | # Homepage configuration | |
e41196e7 | 77 | # See https://fontawesome.com/icons for icons options |
09763dbf | 78 | |
b9c5fcf0 | 79 | title: "App dashboard" |
09763dbf BW |
80 | subtitle: "Homer" |
81 | logo: "assets/homer.png" | |
e41196e7 | 82 | # Alternatively a fa icon can be provided: |
b9c5fcf0 BW |
83 | # icon: "fas fa-skull-crossbones" |
84 | ||
85 | header: true # Set to false to hide the header | |
86 | footer: '<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: | |
87 | ||
88 | # Optional theming | |
89 | theme: default # 'default' or one of the theme available in 'src/assets/themes'. | |
90 | ||
91 | # Here is the exaustive list of customization parameters | |
92 | # However all value are optional and will fallback to default if not set. | |
93 | # if you want to change only some of the colors, feel free to remove all unused key. | |
94 | colors: | |
95 | light: | |
96 | highlight-primary: "#3367d6" | |
97 | highlight-secondary: "#4285f4" | |
98 | highlight-hover: "#5a95f5" | |
99 | background: "#f5f5f5" | |
100 | card-background: "#ffffff" | |
101 | text: "#363636" | |
102 | text-header: "#424242" | |
103 | text-title: "#303030" | |
104 | text-subtitle: "#424242" | |
105 | card-shadow: rgba(0, 0, 0, 0.1) | |
106 | link-hover: "#363636" | |
107 | dark: | |
108 | highlight-primary: "#3367d6" | |
109 | highlight-secondary: "#4285f4" | |
110 | highlight-hover: "#5a95f5" | |
111 | background: "#131313" | |
112 | card-background: "#2b2b2b" | |
113 | text: "#eaeaea" | |
114 | text-header: "#ffffff" | |
115 | text-title: "#fafafa" | |
116 | text-subtitle: "#f5f5f5" | |
117 | card-shadow: rgba(0, 0, 0, 0.4) | |
118 | link-hover: "#ffdd57" | |
09763dbf BW |
119 | |
120 | # Optional message | |
121 | message: | |
7fd9dc6f | 122 | # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below. |
e3212743 | 123 | style: "is-warning" |
09763dbf | 124 | title: "Optional message!" |
e1470a8c | 125 | content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." |
09763dbf BW |
126 | |
127 | # Optional navbar | |
5028088e | 128 | # links: [] # Allows for navbar (dark mode, layout, and search) without any links |
09763dbf | 129 | links: |
e1470a8c | 130 | - name: "Link 1" |
aabb7d53 | 131 | icon: "fab fa-github" |
e1470a8c | 132 | url: "https://github.com/bastienwirtz/homer" |
e1142750 | 133 | target: "_blank" # optional html tag target attribute |
e1470a8c | 134 | - name: "link 2" |
aabb7d53 | 135 | icon: "fas fa-book" |
e1470a8c | 136 | url: "https://github.com/bastienwirtz/homer" |
09763dbf BW |
137 | |
138 | # Services | |
139 | # First level array represent a group. | |
7312bdd6 | 140 | # Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed). |
09763dbf | 141 | services: |
e1470a8c | 142 | - name: "Application" |
aabb7d53 | 143 | icon: "fa fa-code-fork" |
09763dbf | 144 | items: |
e1470a8c BW |
145 | - name: "Awesome app" |
146 | logo: "assets/tools/sample.png" | |
e41196e7 BW |
147 | # Alternatively a fa icon can be provided: |
148 | # icon: "fab fa-jenkins" | |
e1470a8c BW |
149 | subtitle: "Bookmark example" |
150 | tag: "app" | |
151 | url: "https://www.reddit.com/r/selfhosted/" | |
e1142750 | 152 | target: "_blank" # optional html tag target attribute |
e1470a8c BW |
153 | - name: "Another one" |
154 | logo: "assets/tools/sample2.png" | |
155 | subtitle: "Another application" | |
156 | tag: "app" | |
7312bdd6 | 157 | # Optional tagstyle |
a2fdb8a9 | 158 | tagstyle: "is-success" |
09763dbf | 159 | url: "#" |
e1470a8c | 160 | - name: "Other group" |
aabb7d53 | 161 | icon: "fas fa-heartbeat" |
09763dbf | 162 | items: |
e1470a8c BW |
163 | - name: "Another app" |
164 | logo: "assets/tools/sample.png" | |
165 | subtitle: "Another example" | |
166 | tag: "other" | |
167 | url: "https://www.reddit.com/r/selfhosted/" | |
168 | target: "_blank" # optionnal html a tag target attribute | |
e41196e7 | 169 | ``` |
7fd9dc6f BW |
170 | |
171 | If you choose to fetch message information from an endpoint, the output format should be: | |
172 | ||
173 | ```json | |
174 | { | |
7bb903e6 FB |
175 | "style": null, |
176 | "title": "Lorem ipsum 42", | |
177 | "content": "LA LA LA Lorem ipsum dolor sit amet, ....." | |
7fd9dc6f BW |
178 | } |
179 | ``` | |
180 | ||
181 | `null` value or missing keys will be ignored and value from the `config.yml` will be used if available. | |
22555b55 | 182 | Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar). |
fcf5f412 IS |
183 | |
184 | ### Style Options | |
185 | ||
186 | Homer 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: | |
187 | ||
188 | - `is-info` (blue) | |
189 | - `is-success` (green) | |
190 | - `is-warning` (yellow) | |
191 | - `is-danger` (red) | |
192 | ||
193 | You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state. | |
e1470a8c BW |
194 | |
195 | ||
196 | ## Roadmap | |
197 | ||
198 | - [ ] Add more themes. | |
199 | - [ ] Add support for custom service card (add custom feature to some service / app link) | |
200 | ||
201 | ||
202 | ## Development | |
203 | ||
204 | ```sh | |
205 | # Using yarn (recommended) | |
206 | yarn install | |
207 | yarn serve | |
208 | ||
209 | # **OR** Using npm | |
210 | npm install | |
211 | npm run serve | |
212 | ``` | |
213 | ||
214 | ### Themes | |
215 | ||
216 | Themes are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)). | |
217 | To 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. | |
218 | ||
219 | ```scss | |
220 | // `src/assets/themes/my-awesome-theme.scss` | |
221 | body #app.theme-my-awesome-theme. { ... } | |
222 | ``` | |
223 | ||
224 | ```scss | |
225 | // `src/assets/app.scss` | |
226 | // Themes import | |
227 | @import "./themes/sui.scss"; | |
228 | ... | |
229 | @import "./themes/my-awesome-theme.scss"; | |
230 | ``` |