Skip to content

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
turegjorup committed Oct 23, 2024
2 parents 3c3cde9 + 8a27b8a commit 4b06b25
Show file tree
Hide file tree
Showing 72 changed files with 3,089 additions and 1,824 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"allowImportExportEverywhere": true
},
"rules": {
"react/require-default-props": "off",
"react/jsx-filename-extension": [
"warn",
{
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
templates-build:
name: Templates build
runs-on: ubuntu-latest
container: node:14
container: node:20
steps:
- uses: actions/checkout@v2
- name: Cache node modules
Expand All @@ -27,7 +27,7 @@ jobs:
templates-coding-standards:
name: Templates coding standards
runs-on: ubuntu-latest
container: node:14
container: node:20
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -63,17 +63,17 @@ jobs:
run: docker network create frontend

- name: Install client
run: docker-compose run node yarn
run: docker compose run node yarn

- name: Cypress run components
run: docker-compose run cypress run --component --browser ${{ matrix.browser }}
run: docker compose run cypress run --component --browser ${{ matrix.browser }}

- name: Cypress run e2e
run: docker-compose run cypress run --browser ${{ matrix.browser }}
run: docker compose run cypress run --browser ${{ matrix.browser }}

- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: cypress-screenhosts-${{ matrix.browser }}
path: cypress/screenshots
Expand Down
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

All notable changes to this project will be documented in this file.

## [Unreleased]
## [2.1.0] - 2024-10-23

- [#158](https://github.com/os2display/display-templates/pull/158)
- Expanded documentation for new templates.
- [#157](https://github.com/os2display/display-templates/pull/157)
- Add Vimeo player template.
- [#156](https://github.com/os2display/display-templates/pull/156)
- Clarified template creation.
- [#155](https://github.com/os2display/display-templates/pull/155)
- Added single-booking layout to calendar template.
- Removed defaultProps.

## [2.0.1] - 2024-08-14

Expand All @@ -20,11 +30,11 @@ All notable changes to this project will be documented in this file.
- [#148](https://github.com/os2display/display-templates/pull/148)
- Changed theme load following API change.
- Fixed path issue in #141.
- [#141](https://github.com/os2display/display-templates/pull/141)
- Improve build for local development
- [#146](https://github.com/os2display/display-templates/pull/146)
- Fixed issue where image-text image cycle is not restarting when only on slide is displayed.
- Fixed issue with slideshow default duration being 5000 s.
- [#141](https://github.com/os2display/display-templates/pull/141)
- Improved build for local development

## [1.3.1] - 2023-10-26

Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ The docker setup serves the files in the `build/` (see build for production) fol
## Add a new template

To add a template:

* Create a folder in src with the name of the template, e.g. `my-template` that contains the following files:
* `my-template.js` - The React component to render.
* `my-template.json` - The file describing the where to find the files required for the template.
* `my-template-dev.json` - The file describing the where to find the files required for the template in a dev context.
* `my-template.config.json` - The file describing the where to find the files required for the template.
* `my-template-admin.json` - The file describing the content interface for populating the template.
* `my-template-content-example.json` - An example content.
* `my-template-schema.json` - Json Schema description of the content for the slide.

Also add one or more entries to `src/slides.js` with examples of the data required for the template.
Add one or more entries to `src/slides.js` with examples of the data required for the template.

Also import the template in `src/index.js` and add the template to `const renderSlide = {}` in `src/index.js`.

To compile the template it is necessary to add it to the webpack setup.
To compile the template it is necessary to add it to the webpack setup. This is done in `webpack.config.js`.

Add it to `const entry = {}`:

Expand All @@ -42,6 +42,9 @@ Add it to `const entry = {}`:
}
```

Running the build script will build all templates and set new timestamps in the config json files.
Only add the files relating to the new template to git.

## Build for production.

To build the templates for production
Expand Down
6 changes: 3 additions & 3 deletions build/book-review-config-develop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FP2SME0ENTXWF362XHM6Z1B4",
"description": "Skabelon til anmeldelser.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
6 changes: 3 additions & 3 deletions build/book-review-config-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FP2SME0ENTXWF362XHM6Z1B4",
"description": "Skabelon til anmeldelser.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
2 changes: 1 addition & 1 deletion build/book-review.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions build/calendar-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"name": "layout",
"label": "Vælg layout",
"required": true,
"helpText": "Hvis du vælge \"Enkelt lokale med booking\" virker bookingdelen IKKE i preview.",
"formGroupClasses": "col-md-6 mb-3",
"options": [
{
Expand All @@ -60,6 +61,11 @@
"key": "layout3",
"title": "Flere resurser, flere dage",
"value": "multipleDays"
},
{
"key": "layout4",
"title": "Enkelt lokale med booking",
"value": "singleBooking"
}
]
},
Expand Down
6 changes: 3 additions & 3 deletions build/calendar-config-develop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FRJPF4XATRN8PBZ35XN84PS6",
"description": "Mulighed for at vise et kalenderfeed.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
6 changes: 3 additions & 3 deletions build/calendar-config-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FRJPF4XATRN8PBZ35XN84PS6",
"description": "Mulighed for at vise et kalenderfeed.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
2 changes: 1 addition & 1 deletion build/calendar.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/contacts-config-develop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"id": "01FPZ19YEHX7MQ5Q6ZS0WK0VEA",
"description": "Skabelon til kontakter.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/contacts.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/contacts-admin.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/contacts.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/contacts-admin.json?ts=1723805672543",
"schema": "",
"assets": [],
"options": {},
Expand Down
4 changes: 2 additions & 2 deletions build/contacts-config-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"id": "01FPZ19YEHX7MQ5Q6ZS0WK0VEA",
"description": "Skabelon til kontakter.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/contacts.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/contacts-admin.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/contacts.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/contacts-admin.json?ts=1723805672543",
"schema": "",
"assets": [],
"options": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contacts.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/iframe-config-develop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"id": "01FQBJQ2M3544ZKAADPWBXHY71",
"description": "Skabelon til iFrame.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/iframe.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/iframe-admin.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/iframe.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/iframe-admin.json?ts=1723805672543",
"schema": "",
"assets": [],
"options": {},
Expand Down
4 changes: 2 additions & 2 deletions build/iframe-config-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"id": "01FQBJQ2M3544ZKAADPWBXHY71",
"description": "Skabelon til iFrame.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/iframe.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/iframe-admin.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/iframe.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/iframe-admin.json?ts=1723805672543",
"schema": "",
"assets": [],
"options": {},
Expand Down
2 changes: 1 addition & 1 deletion build/iframe.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/image-text-config-develop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FP2SNGFN0BZQH03KCBXHKYHG",
"description": "Mulighed for at sætte billede og tekst, med forskellige visninger.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
6 changes: 3 additions & 3 deletions build/image-text-config-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FP2SNGFN0BZQH03KCBXHKYHG",
"description": "Mulighed for at sætte billede og tekst, med forskellige visninger.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
2 changes: 1 addition & 1 deletion build/image-text.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/instagram-feed-config-develop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FTZC0RKJYHG4JVZG5K709G46",
"description": "Mulighed for at vise instagram indhold.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
6 changes: 3 additions & 3 deletions build/instagram-feed-config-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FTZC0RKJYHG4JVZG5K709G46",
"description": "Mulighed for at vise instagram indhold.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
2 changes: 1 addition & 1 deletion build/instagram-feed.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/poster-config-develop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FWJZQ25A1868V63CWYYHQFKQ",
"description": "Mulighed for at vise plakat indhold.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
6 changes: 3 additions & 3 deletions build/poster-config-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FWJZQ25A1868V63CWYYHQFKQ",
"description": "Mulighed for at vise plakat indhold.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
2 changes: 1 addition & 1 deletion build/poster.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/rss-config-develop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FQC300GGWCA7A8H0SXY6P9FG",
"description": "Mulighed for at vise et rss feed.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
6 changes: 3 additions & 3 deletions build/rss-config-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"id": "01FQC300GGWCA7A8H0SXY6P9FG",
"description": "Mulighed for at vise et rss feed.",
"resources": {
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss.js?ts=1705317070424",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss-admin.json?ts=1705317070424",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss-schema.json?ts=1705317070424",
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss.js?ts=1723805672543",
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss-admin.json?ts=1723805672543",
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss-schema.json?ts=1723805672543",
"assets": [],
"options": {},
"content": {}
Expand Down
2 changes: 1 addition & 1 deletion build/rss.js

Large diffs are not rendered by default.

Loading

0 comments on commit 4b06b25

Please sign in to comment.