This Webcomponent shows all data from Opendatahub Article Endpoint of type SpecialAnnouncement. Currently there are shown the lGeneral informations on how to arrive in South Tyrol by car, train, bus or with the airplane.....
ToDo: Include the webcompscript file dist/js/widget.js
in your HTML and define the web component like this:
<odh-howtoarriveinsouthtyrol-widget data-color="#333" data-lang="de"></odh-howtoarriveinsouthtyrol-widget>
Color of the Sliderarrows.
Type: string
Widget Language.
Type: string Options: "de", "it","en","nl","cs","pl","fr"
Article Filter.
Type: multiselect Options: "Airplane", "Train","Bus","Transfers","LocalMobility","Dolomitipasses","TrafficRestrictions"
Articles are listed in the order of the selected tags, unless data-random is set to true, in which case the order is randomized.
Hides Accommodations on Targetarticle if true.
Type: checkbox
Shuffles Articles if true
Type: checkbox
Using a custom non standard font.
For the Placeholder 'Suedtirol' you can add a custom font to your html page and the widget will use it
<style>
@font-face {
font-family: 'Suedtirol';
src: url('./fonts/SuedtirolNext-Regular.woff2') format('woff2');
font-weight: 300;
font-display: swap;
}
</style>
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
To build the project, the following prerequisites must be met:
- ToDo: Check the prerequisites
- Node 12 / NPM 6
For a ready to use Docker environment with all prerequisites already installed and prepared, you can check out the Docker environment section.
Get a copy of the repository:
ToDo: git clone https://github.com/noi-techpark/webcomp-howtoarriveinsouthtyrol.git
Change directory:
ToDo: cd webcomp-howtoarriveinsouthtyrol/
Download all dependencies:
npm install
Build and start the project:
npm run start:dev
The application will be served and can be accessed at http://localhost:9000.
The tests and the linting can be executed with the following commands:
npm run test
npm run lint
Currently there are no tests available.
To create the distributable files, execute the following command:
npm run build
For the project a Docker environment is already prepared and ready to use with all necessary prerequisites.
These Docker containers are the same as used by the continuous integration servers.
Install Docker (with Docker Compose) locally on your machine.
First, install all dependencies:
docker-compose run --rm app /bin/bash -c "npm install"
Before start working you have to start the Docker containers:
docker-compose up --build --detach
After finished working you can stop the Docker containers:
docker-compose stop
When the containers are running, you can execute any command inside the environment. Just replace the dots ...
in the following example with the command you wish to execute:
docker-compose run --rm app /bin/bash -c "..."
Some examples are:
docker-compose run --rm app /bin/bash -c "npm run test"
For support, please contact [email protected].
If you'd like to contribute, please follow the following instructions:
-
Fork the repository.
-
Checkout a topic branch from the
development
branch. -
Make sure the tests are passing.
-
Create a pull request against the
development
branch.
A more detailed description can be found here: https://github.com/noi-techpark/documentation/blob/master/contributors.md.
More documentation can be found at https://opendatahub.readthedocs.io/en/latest/index.html.
The project uses this boilerplate: https://github.com/noi-techpark/webcomp-boilerplate.
The code in this project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 license. See the LICENSE.md file for more information.
This project is REUSE compliant, more information about the usage of REUSE in NOI Techpark repositories can be found here.
Since the CI for this project checks for REUSE compliance you might find it useful to use a pre-commit hook checking for REUSE compliance locally. The pre-commit-config file in the repository root is already configured to check for REUSE compliance with help of the pre-commit tool.
Install the tool by running:
pip install pre-commit
Then install the pre-commit hook via the config file by running:
pre-commit install