dashboard/README.md

127 lines
3.1 KiB
Markdown
Raw Normal View History

2020-05-20 13:49:49 +02:00
# Dashboard
2020-05-20 21:28:14 +02:00
![screenshot](screenshot.png 'screenshot')
2020-05-20 13:49:49 +02:00
Dashboard is just that - a dashboard. It's inspired by [SUI](https://github.com/jeroenpardon/sui) and has all the same features as SUI.
2020-05-20 17:03:19 +02:00
## Features
So what makes this thing better than SUI?
2020-05-20 21:28:14 +02:00
- "Display URL" functionality, in case the URL you want to show is different than the URL you want to be redirected to
- Theming through JSON
- Search providers customizable through JSON (SUI has them both in a JSON and hardcoded)
2020-05-20 17:03:19 +02:00
2020-05-20 13:49:49 +02:00
## Installation
2020-05-20 18:46:58 +02:00
Getting Dashboard to run is fairly simple and can be accomplished with two techniques:
1. Locally
**Prerequisites: node, npm, yarn**
To get Dashboard to run, just clone the repository, download the dependencies using yarn, then start using `yarn start`.
```
git clone https://github.com/phntxx/dashboard.git
cd dashboard
yarn
2020-05-20 21:28:14 +02:00
yarn build
yarn serve:production
2020-05-20 18:46:58 +02:00
```
alternatively, if you want to work using static files (requires a rebuild for
every change in the JSON-files), just replace `yarn start` with `yarn build`.
Then you can copy the files inside the `build` directory onto the webroot of
your webserver of choice.
2. Using Docker
2020-05-20 13:49:49 +02:00
2020-05-20 18:46:58 +02:00
Using Docker requires building the container manually. Fortunately, this can be accomplished fairly easily:
```
git clone https://github.com/phntxx/dashboard.git
cd dashboard
docker build -t dashboard:1.0
docker run -d \
-t \
-p 3000:3000 \
-v ./src/components/data:/app/src/components/data \
dashboard:1.0
```
**NOTE: The `-t` flag is very important, as the Dockerfile requires standard TTY.**
2020-05-20 13:49:49 +02:00
## Customization
2020-05-20 18:46:58 +02:00
2020-05-20 13:49:49 +02:00
Dashboard is designed to be customizable. Everything is handled using four .json-files, which can be found at /src/components/data
### Applications
2020-05-20 18:46:58 +02:00
2020-05-20 13:49:49 +02:00
To add an application, append the following to applications.json or simply edit one of the examples given.
```
2020-05-20 17:03:19 +02:00
{
"name": "[Name of the Application]",
"displayURL": "[URL you want to show]",
"URL": "[URL to redirect to]",
"icon": "[Icon code]"
}
...
2020-05-20 13:49:49 +02:00
```
2020-05-20 18:46:58 +02:00
To find icons, simply go to the [Material Design Icon Library](https://material.io/icons/) and copy one of the codes for an icon there.
2020-05-20 13:49:49 +02:00
### Bookmarks
To add an bookmark, append the following to bookmarks.json or simply edit one of the examples given.
```
2020-05-20 17:03:19 +02:00
{
"name": "[Category name]",
"items": [
{
"name": "[Bookmark name]",
"url": "[URL to redirect to]"
},
{
"name": "[Bookmark name]",
"url": "[URL to redirect to]"
},
{
"name": "[Bookmark name]",
"url": "[URL to redirect to]"
}
...
]
},
...
2020-05-20 13:49:49 +02:00
```
### Theming:
2020-05-20 18:46:58 +02:00
2020-05-20 13:49:49 +02:00
Dashboard also supports themes with the help of a simple JSON-file: themes.json. To add a theme, append the following to themes.json:
```
2020-05-20 17:03:19 +02:00
{
"label": "[Theme Name]",
"value": [Number of the theme],
"mainColor": "[Main Color as 6-character hex code]",
"accentColor": "[Accent Color as 6-character hex code]",
"backgroundColor": "[Background Color as 6-character hex code]"
}
```
### Search Providers:
2020-05-20 18:46:58 +02:00
2020-05-20 17:03:19 +02:00
The searchbar on the top supports shortcuts like "/so", just as SUI does. To add one of your own, simply append the following to search.json
```
{
"name":"[Name of the website]",
"url":"[Link that processes searches on that website]",
"prefix":"[a custom prefix]"
},
2020-05-20 13:49:49 +02:00
```