1
0
Fork 0
forked from btclock/webui
webui/README.md

42 lines
1 KiB
Markdown
Raw Normal View History

2023-11-19 15:25:31 +00:00
# BTClock WebUI
2023-11-17 00:05:35 +00:00
2023-11-19 15:25:31 +00:00
[![BTClock CI](https://github.com/btclock/webui/actions/workflows/workflow.yml/badge.svg)](https://github.com/btclock/webui2/actions/workflows/workflow.yml)
2023-11-17 00:05:35 +00:00
2023-11-19 15:25:31 +00:00
The web user-interface for the BTClock, based on Svelte-kit. It uses Bootstrap for the lay-out.
2023-11-17 00:05:35 +00:00
2023-11-19 15:25:31 +00:00
![Screenshot](doc/screenshot.webp)
![Screenshot Dark](doc/screenshot-dark.webp)
2023-11-17 00:05:35 +00:00
## Developing
2023-11-19 15:25:31 +00:00
After installed dependencies with `yarn`, start a development server:
2023-11-17 00:05:35 +00:00
```bash
2023-11-19 15:25:31 +00:00
yarn dev
2023-11-17 00:05:35 +00:00
# or start the server and open the app in a new browser tab
2023-11-19 15:25:31 +00:00
yarn dev -- --open
2023-11-17 00:05:35 +00:00
```
## Building
2023-11-19 15:25:31 +00:00
To create a production version of the WebUI:
2023-11-17 00:05:35 +00:00
```bash
2023-11-19 15:25:31 +00:00
yarn build
2023-11-17 00:05:35 +00:00
```
2023-11-19 15:25:31 +00:00
Make sure the postinstall script is ran, because otherwise the filenames are to long for the LittleFS filesystem.
## Deploying
To upload the firmware to the BTClock, you need to GZIP all the files. You can use the python script `gzip_build.py` for that.
Then you can make a `LittleFS.bin` with mklittlefs:
```bash
2023-11-19 19:27:22 +00:00
mklittlefs -c build_gz -s 409600 littlefs.bin
2023-11-19 15:25:31 +00:00
```
2023-11-17 00:05:35 +00:00
2023-11-19 19:27:22 +00:00
You can preview the production build with `yarn preview`.