2020-05-02 23:02:42 +02:00
|
|
|
# FWDekker Template
|
2020-05-03 00:25:55 +02:00
|
|
|
The base template for pages on fwdekker.com.
|
|
|
|
|
2022-11-20 22:56:59 +01:00
|
|
|
Contains utilities for
|
|
|
|
* settings up header, footer, and navigation,
|
|
|
|
* interacting with local storage (and an in-memory variant for testing), and
|
|
|
|
* form validation.
|
|
|
|
|
|
|
|
Simply import `template.js` and `template.css` to get it working.
|
|
|
|
All JavaScript functionalities are exposed using the `window.fwdekker` object.
|
|
|
|
|
|
|
|
Some functionalities are automatically executed after configuring some `<meta>` tags in the HTML.
|
|
|
|
For example, set `<meta name="fwd:nav:target" content="#nav" />` to automatically put the navigation bar in the `#nav`
|
|
|
|
element.
|
2022-11-23 12:13:38 +01:00
|
|
|
All meta-tag behaviour is opt-in.
|
2022-11-20 22:56:59 +01:00
|
|
|
|
|
|
|
Read the files' individual documentation for more information.
|
2020-05-03 00:25:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Development
|
|
|
|
### Requirements
|
|
|
|
* [npm](https://www.npmjs.com/)
|
|
|
|
|
|
|
|
### Setting up
|
|
|
|
```shell script
|
|
|
|
# Install dependencies (only needed once)
|
|
|
|
$> npm ci
|
|
|
|
```
|
|
|
|
|
|
|
|
### Building
|
|
|
|
```shell script
|
2022-11-20 21:18:46 +01:00
|
|
|
# Build the tool in `dist/` for development
|
|
|
|
$> npm run dev
|
|
|
|
# Same as above, but automatically rerun it whenever files are changed
|
|
|
|
$> npm run dev:server
|
|
|
|
# Build the tool in `dist/` for deployment
|
2020-05-03 00:25:55 +02:00
|
|
|
$> npm run deploy
|
|
|
|
```
|