]>
Commit | Line | Data |
---|---|---|
1 | # Homer | |
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) | |
6 | ||
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. | |
9 | ||
10 | ## [Live demo](https://homer-demo.netlify.app). | |
11 | ![screenshot](https://raw.github.com/bastienwirtz/homer/master/screenshot.png) | |
12 | ||
13 | ## Table of Contents | |
14 | - [Features](#features) | |
15 | - [Getting started](#getting-started) | |
16 | - [Configuration](#configuration) | |
17 | - [Roadmap](#roadmap) | |
18 | - [Developement](#developement) | |
19 | ||
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. | |
32 | ||
33 | ||
34 | ## Getting started | |
35 | ||
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**. | |
37 | ||
38 | ### Using docker | |
39 | ||
40 | ```sh | |
41 | docker run -p 8080:8080 -v /your/local/config.yml:/www/config.yml -v /your/local/assets/:/www/assets b4bz/homer:latest | |
42 | ``` | |
43 | ||
44 | ### Using the release tarball (prebuilt, ready to use) | |
45 | ||
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 | ||
48 | ```sh | |
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 ... | |
54 | ``` | |
55 | ||
56 | ### Build manually | |
57 | ||
58 | ```sh | |
59 | # Using yarn (recommended) | |
60 | yarn install | |
61 | yarn build | |
62 | ||
63 | # **OR** Using npm | |
64 | npm install | |
65 | npm run build | |
66 | ``` | |
67 | ||
68 | Then your dashboard is ready to use in the `/dist` directory. | |
69 | ||
70 | ## Configuration | |
71 | ||
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. | |
73 | ||
74 | ```yaml | |
75 | --- | |
76 | # Homepage configuration | |
77 | # See https://fontawesome.com/icons for icons options | |
78 | ||
79 | title: "App dashboard" | |
80 | subtitle: "Homer" | |
81 | logo: "assets/homer.png" | |
82 | # Alternatively a fa icon can be provided: | |
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" | |
119 | ||
120 | # Optional message | |
121 | message: | |
122 | # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below. | |
123 | style: "is-warning" | |
124 | title: "Optional message!" | |
125 | content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." | |
126 | ||
127 | # Optional navbar | |
128 | # links: [] # Allows for navbar (dark mode, layout, and search) without any links | |
129 | links: | |
130 | - name: "Link 1" | |
131 | icon: "fab fa-github" | |
132 | url: "https://github.com/bastienwirtz/homer" | |
133 | target: "_blank" # optional html tag target attribute | |
134 | - name: "link 2" | |
135 | icon: "fas fa-book" | |
136 | url: "https://github.com/bastienwirtz/homer" | |
137 | ||
138 | # Services | |
139 | # First level array represent a group. | |
140 | # Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed). | |
141 | services: | |
142 | - name: "Application" | |
143 | icon: "fa fa-code-fork" | |
144 | items: | |
145 | - name: "Awesome app" | |
146 | logo: "assets/tools/sample.png" | |
147 | # Alternatively a fa icon can be provided: | |
148 | # icon: "fab fa-jenkins" | |
149 | subtitle: "Bookmark example" | |
150 | tag: "app" | |
151 | url: "https://www.reddit.com/r/selfhosted/" | |
152 | target: "_blank" # optional html tag target attribute | |
153 | - name: "Another one" | |
154 | logo: "assets/tools/sample2.png" | |
155 | subtitle: "Another application" | |
156 | tag: "app" | |
157 | # Optional tagstyle | |
158 | tagstyle: "is-success" | |
159 | url: "#" | |
160 | - name: "Other group" | |
161 | icon: "fas fa-heartbeat" | |
162 | items: | |
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 | |
169 | ``` | |
170 | ||
171 | If you choose to fetch message information from an endpoint, the output format should be: | |
172 | ||
173 | ```json | |
174 | { | |
175 | "style": null, | |
176 | "title": "Lorem ipsum 42", | |
177 | "content": "LA LA LA Lorem ipsum dolor sit amet, ....." | |
178 | } | |
179 | ``` | |
180 | ||
181 | `null` value or missing keys will be ignored and value from the `config.yml` will be used if available. | |
182 | Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar). | |
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. | |
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 | ``` |