Skip to content

Repository files navigation

Events Upcoming

REUSE Compliance

Events Upcoming is a web component that displays a list of events that are happening. It fetches data from the Event API and displays the events in a simple, easy-to-read format.

Table of Contents

Usage

To use the "Events Upcoming" web component, you need to include the following code in your HTML file:

<events-upcoming></events-upcoming>

General attributes

eventLocation

The attribute eventLocation shows an abbreviation of the event location that is displayed. Possible options are:

  • NOI for events of the NOI Techpark Bolzano
  • EC for events of Eurac

Special attributes for Eurac

The following attributes work only if eventLocation is set to EC for Eurac events

room

The room attribute allows you to select events based on the specific room or location where the event will be held. The room attribute can be used as a filter to narrow down the search results and show only events that are taking place in a particular room or location.
Default value is empty, so all rooms are shown.

<events-upcoming room="Seminar 1"></events-upcoming>

maxEvents

The maxEvents attribute controls the limit on the number of events that can be shown on a page.
If the value is 1, the font size and layout changes.
Default value is 4.

<events-today maxEvents="1"></events-today>

languageRotationInterval

The languageRotationInterval attribute's defines after how many seconds the titles of the events are shown in another language.
Default value is 10.

<events-today languageRotationInterval="20"></events-today>

imageGalleryUrl

The imageGalleryUrl attribute's defines is an URL to an AWS S3 bucket containing images, that will show, if no events are happening at the moment.
Note: The images must be in the root directory of the bucket and the bucket must be listable, so that the Webcomponent can see all images file names and switch between them. Default value is "https://s3.eu-west-1.amazonaws.com/it.bz.noi.today.eurac.gallery".

<events-upcoming imageGalleryUrl="https://s3.eu-west-1.amazonaws.com/it.bz.noi.today.eurac.gallery"></events-upcoming>

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To build the project, the following prerequisites must be met:

  • Node 16.x / NPM 9.x

For a ready to use Docker environment with all prerequisites already installed and prepared, you can check out the Docker environment section.

Source code

Get a copy of the repository:

git clone git@github.com:noi-techpark/webcomp-events-upcoming.git

Change directory:

cd webcomp-events-upcoming/

Dependencies

Download all dependencies:

npm install

Environment

Copy .env.example to .env and set all needed Environment Variables.

Build

Build and start the project:

npm start

You can the open the created dist/demo.html file in your browser.

Docker environment

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.

Deployment

To create the distributable files, execute the following command:

npm run build

Information

Support

For support, please contact help@opendatahub.com.

Contributing

If you'd like to contribute, please follow the Contributor Guidelines that can be found at https://github.com/noi-techpark/odh-docs/wiki/Contributor-Guidelines%3A-Getting-started.

Documentation

More documentation can be found at https://opendatahub.readthedocs.io/en/latest/index.html.

Boilerplate

The project uses this boilerplate: https://github.com/noi-techpark/webcomp-boilerplate.

License

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.

REUSE

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

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages