aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEvan Steinkerchner <esteinkerchner@gmail.com>2022-03-22 18:22:16 -0400
committerEvan Steinkerchner <esteinkerchner@gmail.com>2022-03-22 18:22:16 -0400
commit828582351780582558cb0f4a475ef9eeb4dc1299 (patch)
treeec165822c987924f30e2b8bdcebf3729ec772227
parent6f9a74ddcf4833e50df4033ae4291d718af784d9 (diff)
downloadhomer-828582351780582558cb0f4a475ef9eeb4dc1299.tar.gz
homer-828582351780582558cb0f4a475ef9eeb4dc1299.tar.zst
homer-828582351780582558cb0f4a475ef9eeb4dc1299.zip
Created new custom home page, moved Getting started to its own page, fixed requirements.txt, added docs/README.md
-rw-r--r--docs/README.md25
-rw-r--r--docs/getting_started.md70
-rw-r--r--docs/index.md125
-rw-r--r--docs/overrides/assets/stylesheets/home.css81
-rw-r--r--docs/overrides/home.html49
-rw-r--r--docs/stylesheets/styles.css7
-rw-r--r--mkdocs.yml13
-rw-r--r--requirements.txt99
8 files changed, 259 insertions, 210 deletions
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..5fca6ed
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,25 @@
1# Homer docs
2
3Live on github pages: [https://bastienwirtz.github.io/homer/](https://bastienwirtz.github.io/homer/)
4
5## Local development
6
7### Install Python dependencies
8
9Homer's documentation is built using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/). To get started, you'll need Python 3 installed on your machine and set up your local environment.
10
11```sh
12python -m venv venv
13source venv/bin/activate
14pip install -r requirements.txt
15```
16
17### Preview local copy
18
19MkDocs comes with a command-line utility for building and serving the static documentation site every time you save a file. To launch it, run the `serve` command.
20
21```sh
22mkdocs serve
23```
24
25Your local version of the docs site will now be available at http://localhost:8000/.
diff --git a/docs/getting_started.md b/docs/getting_started.md
new file mode 100644
index 0000000..2a123e2
--- /dev/null
+++ b/docs/getting_started.md
@@ -0,0 +1,70 @@
1Homer 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**.
2
3See [documentation](docs/configuration.md) for information about the configuration (`assets/config.yml`) options.
4
5## Using docker
6
7To launch container:
8
9```sh
10docker run -d \
11 -p 8080:8080 \
12 -v </your/local/assets/>:/www/assets \
13 --restart=always \
14 b4bz/homer:latest
15```
16
17Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner (`docker run -e "UID=1000" -e "GID=1000" [...]`).
18
19## Using docker-compose
20
21The `docker-compose.yml` file must be edited to match your needs.
22Set the port and volume (equivalent to `-p` and `-v` arguments):
23
24```yaml
25volumes:
26 - /your/local/assets/:/www/assets
27ports:
28 - 8080:8080
29```
30
31To launch container:
32
33```sh
34cd /path/to/docker-compose.yml
35docker-compose up -d
36```
37
38Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner, also in `docker-compose.yml`:
39
40```yaml
41environment:
42 - UID=1000
43 - GID=1000
44```
45
46## Using the release tarball (prebuilt, ready to use)
47
48Download and extract the latest release (`homer.zip`) from the [release page](https://github.com/bastienwirtz/homer/releases), rename the `assets/config.yml.dist` file to `assets/config.yml`, and put it behind a web server.
49
50```sh
51wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip
52unzip homer.zip
53cd homer
54cp assets/config.yml.dist assets/config.yml
55npx serve # or python -m http.server 8010 or apache, nginx ...
56```
57
58## Build manually
59
60```sh
61# Using yarn (recommended)
62yarn install
63yarn build
64
65# **OR** Using npm
66npm install
67npm run build
68```
69
70Then your dashboard is ready to use in the `/dist` directory.
diff --git a/docs/index.md b/docs/index.md
index b7ac66c..a572d90 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,122 +1,3 @@
1<div class="centered"> 1---
2 <img width="180" 2template: home.html
3 alt="Homer's donut" 3---
4 src="images/logo.png" />
5 <h1>Homer</h1>
6</div>
7
8<p class="centered">
9 A dead simple static <strong>HOM</strong>epage for your serv<strong>ER</strong> to keep
10 your services on hand, from a simple <code>yaml</code> configuration file.
11</p>
12
13<div class="centered">
14 <a href="https://opensource.org/licenses/Apache-2.0">
15 <img alt="License: Apache 2"
16 src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" />
17 </a>
18 <a href="https://gitter.im/homer-dashboard/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge">
19 <img alt="Gitter chat"
20 src="https://badges.gitter.im/homer-dashboard/community.svg" />
21 </a>
22 <a href="https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip">
23 <img alt="Download homer static build"
24 src="https://img.shields.io/badge/Download-homer.zip-orange" />
25 </a>
26 <a href="https://github.com/awesome-selfhosted/awesome-selfhosted">
27 <img alt="Awesome"
28 src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" />
29 </a>
30</div>
31
32## Demo
33
34[![Demo](images/screenshot.png)](https://homer-demo.netlify.app)
35[Check out the demo!](https://homer-demo.netlify.app)
36
37## Features
38
39- [yaml](http://yaml.org/) file configuration
40- Installable (pwa)
41- Search
42- Grouping
43- Theme customization
44- Offline health check
45- keyboard shortcuts:
46 - `/` Start searching.
47 - `Escape` Stop searching.
48 - `Enter` Open the first matching result (respects the bookmark's `_target` property).
49 - `Alt`/`Option` + `Enter` Open the first matching result in a new tab.
50
51## Getting started
52
53Homer 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**.
54
55See [documentation](docs/configuration.md) for information about the configuration (`assets/config.yml`) options.
56
57### Using docker
58
59To launch container:
60
61```sh
62docker run -d \
63 -p 8080:8080 \
64 -v </your/local/assets/>:/www/assets \
65 --restart=always \
66 b4bz/homer:latest
67```
68
69Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner (`docker run -e "UID=1000" -e "GID=1000" [...]`).
70
71### Using docker-compose
72
73The `docker-compose.yml` file must be edited to match your needs.
74Set the port and volume (equivalent to `-p` and `-v` arguments):
75
76```yaml
77volumes:
78 - /your/local/assets/:/www/assets
79ports:
80 - 8080:8080
81```
82
83To launch container:
84
85```sh
86cd /path/to/docker-compose.yml
87docker-compose up -d
88```
89
90Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner, also in `docker-compose.yml`:
91
92```yaml
93environment:
94 - UID=1000
95 - GID=1000
96```
97
98### Using the release tarball (prebuilt, ready to use)
99
100Download and extract the latest release (`homer.zip`) from the [release page](https://github.com/bastienwirtz/homer/releases), rename the `assets/config.yml.dist` file to `assets/config.yml`, and put it behind a web server.
101
102```sh
103wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip
104unzip homer.zip
105cd homer
106cp assets/config.yml.dist assets/config.yml
107npx serve # or python -m http.server 8010 or apache, nginx ...
108```
109
110### Build manually
111
112```sh
113# Using yarn (recommended)
114yarn install
115yarn build
116
117# **OR** Using npm
118npm install
119npm run build
120```
121
122Then your dashboard is ready to use in the `/dist` directory.
diff --git a/docs/overrides/assets/stylesheets/home.css b/docs/overrides/assets/stylesheets/home.css
new file mode 100644
index 0000000..76f585b
--- /dev/null
+++ b/docs/overrides/assets/stylesheets/home.css
@@ -0,0 +1,81 @@
1.hero {
2 padding: 32px 2.8rem;
3 color: var(--md-primary-bg-color);
4 background: linear-gradient(
5 to bottom,
6 var(--md-primary-fg-color),
7 hsla(160deg, 47%, 55%, 1) 99%,
8 #fff 99%
9 );
10}
11
12.hero-container {
13 display: flex;
14 flex-direction: row;
15 align-items: center;
16 justify-content: space-between;
17 padding: 1rem 0;
18}
19
20.hero-content {
21 flex: 0 0 40%;
22}
23
24.hero-title {
25 height: 4rem;
26 display: flex;
27 flex-direction: row;
28 align-items: center;
29}
30
31.hero-title > img {
32 max-height: 100%;
33 width: auto;
34}
35
36.hero-title > h1 {
37 margin: 0 0 0 0.5rem;
38 font-size: 4rem;
39 line-height: 1;
40 color: currentColor;
41 font-weight: 700;
42}
43
44.hero-image {
45 width: 17rem;
46 height: auto;
47 flex: 0 0 50%;
48 transform: perspective(300px) rotate3D(0, 1, 0, -5deg);
49 box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
50}
51
52.hero .md-button {
53 margin-top: 0.5rem;
54 margin-right: 0.5rem;
55 color: var(--md-primary-bg-color);
56}
57
58.hero .md-button-primary {
59 background-color: var(--md-primary-bg-color);
60 color: hsla(280deg, 37%, 48%, 1);
61 border-color: var(--md-primary-bg-color);
62}
63
64.hero .md-button:focus,
65.hero .md-button:hover {
66 background-color: var(--md-accent-fg-color);
67 color: var(--md-default-bg-color);
68 border-color: var(--md-accent-fg-color);
69}
70
71.md-header {
72 position: initial;
73}
74
75.md-main__inner {
76 margin: 0;
77}
78
79.md-content {
80 display: none;
81}
diff --git a/docs/overrides/home.html b/docs/overrides/home.html
new file mode 100644
index 0000000..81ef4aa
--- /dev/null
+++ b/docs/overrides/home.html
@@ -0,0 +1,49 @@
1{% extends "base.html" %}
2
3{% block extrahead %}
4<link
5 rel="stylesheet"
6 href="{{ 'overrides/assets/stylesheets/home.css' | url }}" />
7{% endblock %}
8
9{% block tabs %}
10{{ super() }}
11
12<section class="hero">
13 <div class="md-grid md-typeset hero-container">
14 <div class="hero-content">
15 <div class="hero-title">
16 <img src="images/logo.png" draggable="false" />
17 <h1>Homer</h1>
18 </div>
19 <p>
20 A dead simple static <strong>HOM</strong>epage for your serv<strong>ER</strong>
21 to keep your services on hand, from a simple <code>yaml</code> configuration file.
22 </p>
23 <a
24 href="{{ page.next_page.url | url }}"
25 title="{{ page.next_page.title | striptags }}"
26 class="md-button md-button-primary"
27 >
28 Get started
29 </a>
30 <a
31 href="{{ config.repo_url }}"
32 title="{{ lang.t('source.link.title') }}"
33 class="md-button"
34 >
35 Go to GitHub
36 </a>
37 </div>
38 <img class="hero-image" src="images/screenshot.png" draggable="false" />
39 </div>
40</section>
41
42<div>
43 TODO!
44</div>
45{% endblock %}
46
47{% block site_nav %}{% endblock %}
48{% block content %}{% endblock %}
49{% block footer %}{% endblock %}
diff --git a/docs/stylesheets/styles.css b/docs/stylesheets/styles.css
deleted file mode 100644
index e1e1a3e..0000000
--- a/docs/stylesheets/styles.css
+++ /dev/null
@@ -1,7 +0,0 @@
1.centered {
2 text-align: center;
3}
4
5.bold {
6 font-weight: bold;
7} \ No newline at end of file
diff --git a/mkdocs.yml b/mkdocs.yml
index 2d4704c..9af5b79 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,22 +1,21 @@
1# Project information 1# Project information
2site_name: Homer 2site_name: Homer
3site_url: https://bastienwirtz.github.io/homer/ 3site_url: https://bastienwirtz.github.io/
4 4
5# Repository 5# Repository
6repo_name: bastienwirtz/homer 6repo_name: bastienwirtz/homer
7repo_url: https://github.com/bastienwirtz/homer 7repo_url: https://github.com/bastienwirtz/homer
8edit_uri: "" 8edit_uri: ""
9 9
10# Stylesheet
11extra_css:
12 - stylesheets/styles.css
13
14# Theme 10# Theme
15theme: 11theme:
12 favicon: images/logo.png
16 logo: images/logo.png 13 logo: images/logo.png
17 name: material 14 name: material
15 custom_dir: docs/overrides/
18 icon: 16 icon:
19 repo: fontawesome/brands/github 17 repo: fontawesome/brands/github
18 language: en
20 palette: 19 palette:
21 - media: "(prefers-color-scheme: light)" 20 - media: "(prefers-color-scheme: light)"
22 scheme: default 21 scheme: default
@@ -42,6 +41,9 @@ theme:
42 - search.share 41 - search.share
43 - search.suggest 42 - search.suggest
44 - toc.follow 43 - toc.follow
44 # Don't include MkDocs' JavaScript
45 include_search_page: false
46 search_index_only: true
45 47
46# Copyright - name for footer text 48# Copyright - name for footer text
47copyright: Homer dashboard 49copyright: Homer dashboard
@@ -76,6 +78,7 @@ markdown_extensions:
76# Page tree 78# Page tree
77nav: 79nav:
78 - Home: index.md 80 - Home: index.md
81 - Getting started: getting_started.md
79 - Configuration: configuration.md 82 - Configuration: configuration.md
80 - Custom services: customservices.md 83 - Custom services: customservices.md
81 - Tips & tricks: tips-and-tricks.md 84 - Tips & tricks: tips-and-tricks.md
diff --git a/requirements.txt b/requirements.txt
index 568942b..078b3dc 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,76 +1,23 @@
1attrs==19.3.0 1bracex==2.2.1
2Automat==0.8.0 2click==8.0.4
3blinker==1.4 3ghp-import==2.0.2
4certifi==2019.11.28 4importlib-metadata==4.11.3
5chardet==3.0.4 5Jinja2==3.0.3
6Click==7.0 6Markdown==3.3.6
7cloud-init==21.4 7MarkupSafe==2.1.1
8colorama==0.4.3 8mergedeep==1.3.4
9command-not-found==0.3 9mkdocs==1.2.3
10configobj==5.0.6 10mkdocs-awesome-pages-plugin==2.7.0
11constantly==15.1.0 11mkdocs-material==8.2.5
12cryptography==2.8 12mkdocs-material-extensions==1.0.3
13cupshelpers==1.0 13packaging==21.3
14dbus-python==1.2.16 14Pygments==2.11.2
15defer==1.0.6 15pymdown-extensions==9.3
16distro==1.4.0 16pyparsing==3.0.7
17distro-info===0.23ubuntu1 17python-dateutil==2.8.2
18entrypoints==0.3 18PyYAML==6.0
19httplib2==0.14.0 19pyyaml-env-tag==0.1
20hyperlink==19.0.0 20six==1.16.0
21idna==2.8 21watchdog==2.1.6
22importlib-metadata==1.5.0 22wcmatch==8.3
23incremental==16.10.1 23zipp==3.7.0
24Jinja2==2.10.1
25jsonpatch==1.22
26jsonpointer==2.0
27jsonschema==3.2.0
28keyring==18.0.1
29language-selector==0.1
30launchpadlib==1.10.13
31lazr.restfulclient==0.14.2
32lazr.uri==1.0.3
33macaroonbakery==1.3.1
34MarkupSafe==1.1.0
35more-itertools==4.2.0
36netifaces==0.10.4
37oauthlib==3.1.0
38pexpect==4.6.0
39powerline-shell==0.7.0
40protobuf==3.6.1
41psutil==5.5.1
42pyasn1==0.4.2
43pyasn1-modules==0.2.1
44pycairo==1.16.2
45pycups==1.9.73
46PyGObject==3.36.0
47PyHamcrest==1.9.0
48PyJWT==1.7.1
49pymacaroons==0.13.0
50PyNaCl==1.3.0
51pyOpenSSL==19.0.0
52pyRFC3339==1.1
53pyrsistent==0.15.5
54pyserial==3.4
55python-apt==2.0.0+ubuntu0.20.4.6
56python-debian===0.1.36ubuntu1
57pytz==2019.3
58pyxdg==0.26
59PyYAML==5.3.1
60requests==2.22.0
61requests-unixsocket==0.2.0
62SecretStorage==2.3.1
63service-identity==18.1.0
64simplejson==3.16.0
65six==1.14.0
66sos==4.2
67ssh-import-id==5.10
68systemd-python==234
69Twisted==18.9.0
70ubuntu-advantage-tools==27.5
71ufw==0.36
72unattended-upgrades==0.1
73urllib3==1.25.8
74wadllib==1.3.3
75zipp==1.0.0
76zope.interface==4.7.1