Skip to content

Commit 4b06b25

Browse files
committed
Merge branch 'release/2.1.0'
2 parents 3c3cde9 + 8a27b8a commit 4b06b25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+3089
-1824
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
indent_style = space
12+
indent_size = 2

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"allowImportExportEverywhere": true
1919
},
2020
"rules": {
21+
"react/require-default-props": "off",
2122
"react/jsx-filename-extension": [
2223
"warn",
2324
{

.github/workflows/pr.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
templates-build:
55
name: Templates build
66
runs-on: ubuntu-latest
7-
container: node:14
7+
container: node:20
88
steps:
99
- uses: actions/checkout@v2
1010
- name: Cache node modules
@@ -27,7 +27,7 @@ jobs:
2727
templates-coding-standards:
2828
name: Templates coding standards
2929
runs-on: ubuntu-latest
30-
container: node:14
30+
container: node:20
3131
steps:
3232
- uses: actions/checkout@v2
3333

@@ -63,17 +63,17 @@ jobs:
6363
run: docker network create frontend
6464

6565
- name: Install client
66-
run: docker-compose run node yarn
66+
run: docker compose run node yarn
6767

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

7171
- name: Cypress run e2e
72-
run: docker-compose run cypress run --browser ${{ matrix.browser }}
72+
run: docker compose run cypress run --browser ${{ matrix.browser }}
7373

7474
- name: Archive screenshots
7575
if: ${{ failure() }}
76-
uses: actions/upload-artifact@v2
76+
uses: actions/upload-artifact@v4
7777
with:
7878
name: cypress-screenhosts-${{ matrix.browser }}
7979
path: cypress/screenshots

CHANGELOG.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22

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

5-
## [Unreleased]
5+
## [2.1.0] - 2024-10-23
6+
7+
- [#158](https://github.com/os2display/display-templates/pull/158)
8+
- Expanded documentation for new templates.
9+
- [#157](https://github.com/os2display/display-templates/pull/157)
10+
- Add Vimeo player template.
11+
- [#156](https://github.com/os2display/display-templates/pull/156)
12+
- Clarified template creation.
13+
- [#155](https://github.com/os2display/display-templates/pull/155)
14+
- Added single-booking layout to calendar template.
15+
- Removed defaultProps.
616

717
## [2.0.1] - 2024-08-14
818

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

2939
## [1.3.1] - 2023-10-26
3040

README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ The docker setup serves the files in the `build/` (see build for production) fol
2222
## Add a new template
2323

2424
To add a template:
25+
2526
* Create a folder in src with the name of the template, e.g. `my-template` that contains the following files:
2627
* `my-template.js` - The React component to render.
27-
* `my-template.json` - The file describing the where to find the files required for the template.
28-
* `my-template-dev.json` - The file describing the where to find the files required for the template in a dev context.
28+
* `my-template.config.json` - The file describing the where to find the files required for the template.
2929
* `my-template-admin.json` - The file describing the content interface for populating the template.
30-
* `my-template-content-example.json` - An example content.
31-
* `my-template-schema.json` - Json Schema description of the content for the slide.
3230

33-
Also add one or more entries to `src/slides.js` with examples of the data required for the template.
31+
Add one or more entries to `src/slides.js` with examples of the data required for the template.
32+
33+
Also import the template in `src/index.js` and add the template to `const renderSlide = {}` in `src/index.js`.
3434

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

3737
Add it to `const entry = {}`:
3838

@@ -42,6 +42,9 @@ Add it to `const entry = {}`:
4242
}
4343
```
4444

45+
Running the build script will build all templates and set new timestamps in the config json files.
46+
Only add the files relating to the new template to git.
47+
4548
## Build for production.
4649

4750
To build the templates for production

build/book-review-config-develop.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FP2SME0ENTXWF362XHM6Z1B4",
55
"description": "Skabelon til anmeldelser.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/book-review-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/book-review-config-main.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FP2SME0ENTXWF362XHM6Z1B4",
55
"description": "Skabelon til anmeldelser.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/book-review-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/book-review.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/calendar-admin.json

+6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"name": "layout",
4545
"label": "Vælg layout",
4646
"required": true,
47+
"helpText": "Hvis du vælge \"Enkelt lokale med booking\" virker bookingdelen IKKE i preview.",
4748
"formGroupClasses": "col-md-6 mb-3",
4849
"options": [
4950
{
@@ -60,6 +61,11 @@
6061
"key": "layout3",
6162
"title": "Flere resurser, flere dage",
6263
"value": "multipleDays"
64+
},
65+
{
66+
"key": "layout4",
67+
"title": "Enkelt lokale med booking",
68+
"value": "singleBooking"
6369
}
6470
]
6571
},

build/calendar-config-develop.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FRJPF4XATRN8PBZ35XN84PS6",
55
"description": "Mulighed for at vise et kalenderfeed.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/calendar-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/calendar-config-main.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FRJPF4XATRN8PBZ35XN84PS6",
55
"description": "Mulighed for at vise et kalenderfeed.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/calendar-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/calendar.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/contacts-config-develop.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"id": "01FPZ19YEHX7MQ5Q6ZS0WK0VEA",
55
"description": "Skabelon til kontakter.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/contacts.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/contacts-admin.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/contacts.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/contacts-admin.json?ts=1723805672543",
99
"schema": "",
1010
"assets": [],
1111
"options": {},

build/contacts-config-main.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"id": "01FPZ19YEHX7MQ5Q6ZS0WK0VEA",
55
"description": "Skabelon til kontakter.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/contacts.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/contacts-admin.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/contacts.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/contacts-admin.json?ts=1723805672543",
99
"schema": "",
1010
"assets": [],
1111
"options": {},

build/contacts.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/iframe-config-develop.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"id": "01FQBJQ2M3544ZKAADPWBXHY71",
55
"description": "Skabelon til iFrame.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/iframe.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/iframe-admin.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/iframe.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/iframe-admin.json?ts=1723805672543",
99
"schema": "",
1010
"assets": [],
1111
"options": {},

build/iframe-config-main.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"id": "01FQBJQ2M3544ZKAADPWBXHY71",
55
"description": "Skabelon til iFrame.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/iframe.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/iframe-admin.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/iframe.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/iframe-admin.json?ts=1723805672543",
99
"schema": "",
1010
"assets": [],
1111
"options": {},

build/iframe.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/image-text-config-develop.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FP2SNGFN0BZQH03KCBXHKYHG",
55
"description": "Mulighed for at sætte billede og tekst, med forskellige visninger.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/image-text-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/image-text-config-main.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FP2SNGFN0BZQH03KCBXHKYHG",
55
"description": "Mulighed for at sætte billede og tekst, med forskellige visninger.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/image-text-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/image-text.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/instagram-feed-config-develop.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FTZC0RKJYHG4JVZG5K709G46",
55
"description": "Mulighed for at vise instagram indhold.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/instagram-feed-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/instagram-feed-config-main.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FTZC0RKJYHG4JVZG5K709G46",
55
"description": "Mulighed for at vise instagram indhold.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/instagram-feed-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/instagram-feed.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/poster-config-develop.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FWJZQ25A1868V63CWYYHQFKQ",
55
"description": "Mulighed for at vise plakat indhold.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/poster-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/poster-config-main.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FWJZQ25A1868V63CWYYHQFKQ",
55
"description": "Mulighed for at vise plakat indhold.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/poster-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/poster.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/rss-config-develop.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FQC300GGWCA7A8H0SXY6P9FG",
55
"description": "Mulighed for at vise et rss feed.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/develop/build/rss-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/rss-config-main.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"id": "01FQC300GGWCA7A8H0SXY6P9FG",
55
"description": "Mulighed for at vise et rss feed.",
66
"resources": {
7-
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss.js?ts=1705317070424",
8-
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss-admin.json?ts=1705317070424",
9-
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss-schema.json?ts=1705317070424",
7+
"component": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss.js?ts=1723805672543",
8+
"admin": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss-admin.json?ts=1723805672543",
9+
"schema": "https://raw.githubusercontent.com/os2display/display-templates/main/build/rss-schema.json?ts=1723805672543",
1010
"assets": [],
1111
"options": {},
1212
"content": {}

build/rss.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)