### Using docker
+To launch container :
+
```sh
docker run -p 8080:8080 -v /your/local/assets/:/www/assets b4bz/homer:latest
```
Default 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" [...]`).
+### Using docker-compose
+
+The `docker-compose.yml` file must be edited to match your needs.
+Set the port and volume (equivalent to -p and -v arguments) :
+
+```yaml
+volumes:
+ - /your/local/assets/:/www/assets
+ports:
+ - 8080:8080
+```
+
+To launch container :
+
+```sh
+cd /path/to/docker-compose.yml
+docker-compose up -d
+```
+
+Default 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` :
+
+```yaml
+environment:
+- UID=1000
+- GID=1000
+```
+
### Using the release tarball (prebuilt, ready to use)
Download and extract the latest 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 webserver.
--- /dev/null
+---
+version: "2"
+services:
+ homer:
+ image: b4bz/homer
+ container_name: homer
+ volumes:
+ - /your/local/assets/:/www/assets
+ ports:
+ - 8080:8080
+ #environment:
+ # - UID=1000
+ # - GID=1000
+ restart: unless-stopped
# Optional theming
theme: default # 'default' or one of the theme available in 'src/assets/themes'.
+# Optional custom stylesheet
+# Will load custom CSS files. Especially useful for custom icon sets.
+# stylesheet:
+# - "assets/custom.css"
+
# Here is the exaustive list of customization parameters
# However all value are optional and will fallback to default if not set.
# if you want to change only some of the colors, feel free to remove all unused key.
## Use Homer as a custom "new tab" page
#### `by @vosdev`
-This [extension](https://addons.mozilla.org/firefox/addon/custom-new-tab-page) allows you to have your homer dashboard in your new tab page, while leaving focus on the address bar meaning you can still type right away if you want to search or go to a page that is not on your homer dash.
+These extensions for [Firefox](https://addons.mozilla.org/firefox/addon/custom-new-tab-page) and [Chrome & Friends](https://chrome.google.com/webstore/detail/new-tab-changer/occbjkhimchkolibngmcefpjlbknggfh) allow you to have your homer dashboard in your new tab page, while leaving focus on the address bar meaning you can still type right away if you want to search or go to a page that is not on your homer dash.
-The extension loads Homer in an iframe on your new tab page, meaning you have to add `target: '_top'` to each of your items.
+The firefox extension loads Homer in an iframe on your new tab page, meaning you have to add `target: '_top'` to each of your items.
```yaml
- name: "Reddit"
<div v-cloak class="container">
<div class="logo">
<img v-if="config.logo" :src="config.logo" alt="dashboard logo" />
- <i v-if="config.icon" :class="['fa-fw', config.icon]"></i>
+ <i v-if="config.icon" :class="config.icon"></i>
</div>
<div class="dashboard-title">
<span class="headline">{{ config.subtitle }}</span>
this.config = merge(defaults, config);
this.services = this.config.services;
document.title = `${this.config.title} | ${this.config.subtitle}`;
+ if (this.config.stylesheet) {
+ let stylesheet = '';
+ for (const file of this.config.stylesheet) {
+ stylesheet += `@import "${file}";`;
+ }
+ this.createStylesheet(stylesheet);
+ }
},
methods: {
getConfig: function (path = "assets/config.yml") {
},
};
},
+ createStylesheet: function(css) {
+ let style = document.createElement('style');
+ style.appendChild(document.createTextNode(css));
+ document.head.appendChild(style);
+ },
},
};
</script>
>
<i
v-if="link.icon"
- style="margin-right: 6px;"
- :class="['fa-fw', link.icon]"
+ :class="['fa-fw', link.icon, { 'mr-2': link.name }]"
></i>
{{ link.name }}
</a>