Adding components.

This commit is contained in:
Dan Chadwick 2024-08-18 21:12:02 -04:00
parent db41102157
commit 928eb734e7
57 changed files with 1669 additions and 1 deletions

View File

@ -19,6 +19,7 @@
"cweagans/composer-patches": "^1.7",
"drupal/admin_toolbar": "^3.4",
"drupal/bootstrap5": "^4.0",
"drupal/color_field": "^3.0",
"drupal/config_split": "^2.0",
"drupal/core-composer-scaffold": "^10.3",
"drupal/core-project-message": "^10.3",
@ -29,6 +30,7 @@
"drupal/gin_login": "^2.1",
"drupal/google_tag": "^2.0",
"drupal/jsonapi_permission_access": "1.0.1",
"drupal/layout_builder_admin_theme": "^2.0",
"drupal/layout_builder_styles": "^2.0",
"drupal/mailsystem": "^4.5",
"drupal/migrate_plus": "^6.0",

114
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "b4ad2bd086bae7631f8cd18f2b6582df",
"content-hash": "f945ec3f41de2e340cab7c38ab502247",
"packages": [
{
"name": "asm89/stack-cors",
@ -1603,6 +1603,70 @@
"issues": "https://www.drupal.org/project/issues/bootstrap5"
}
},
{
"name": "drupal/color_field",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/color_field.git",
"reference": "3.0.1"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/color_field-3.0.1.zip",
"reference": "3.0.1",
"shasum": "fd2f75db74063f817d81a537221fa1c8398e4d8f"
},
"require": {
"drupal/core": "^9 || ^10 || ^11"
},
"require-dev": {
"drupal/core-recommended": "^9 || ^10",
"drupal/feeds": "^3.0@beta",
"drupal/token": "~1.3"
},
"suggest": {
"bower-asset/jquery-simple-color": "^v1.2.2: Provides JavaScript library necessary for the Color Grid widget",
"bower-asset/spectrum": "^1.8: Provides JavaScript library necessary for Spectrum widget."
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "3.0.1",
"datestamp": "1717506868",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "targoo",
"homepage": "https://www.drupal.org/user/431910",
"role": "Maintainer"
},
{
"name": "Nick Wilde",
"homepage": "https://www.drupal.org/user/nickwilde",
"role": "Maintainer"
},
{
"name": "targoo",
"homepage": "https://www.drupal.org/user/431910"
}
],
"description": "Provides a color field type to store the color value and opacity",
"homepage": "https://www.drupal.org/project/color_field",
"support": {
"source": "https://git.drupalcode.org/project/color_field",
"issues": "https://www.drupal.org/project/issues/color_field?version=8.x"
}
},
{
"name": "drupal/config_split",
"version": "2.0.1",
@ -2656,6 +2720,54 @@
"source": "https://git.drupalcode.org/project/jsonapi_permission_access"
}
},
{
"name": "drupal/layout_builder_admin_theme",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/layout_builder_admin_theme.git",
"reference": "2.0.2"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/layout_builder_admin_theme-2.0.2.zip",
"reference": "2.0.2",
"shasum": "331d2a3d7f8b5130268ae089d03bcae59c1b7544"
},
"require": {
"drupal/core": "^9 || ^10 || ^11"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "2.0.2",
"datestamp": "1723183931",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "ivnish",
"homepage": "https://www.drupal.org/user/3547706"
},
{
"name": "robert.duplock",
"homepage": "https://www.drupal.org/user/3645985"
}
],
"description": "Makes your Drupal site use the admin theme when using \"Layout builder\".",
"homepage": "https://www.drupal.org/project/layout_builder_admin_theme",
"support": {
"source": "https://git.drupalcode.org/project/layout_builder_admin_theme"
}
},
{
"name": "drupal/layout_builder_styles",
"version": "2.0.0",

View File

@ -0,0 +1,10 @@
uuid: 62221ff8-bff9-4615-b8b1-b5387c5c5fb8
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: v_2vrosNagS8cspYwOOTN8d-vS9d2lGbzc0pbifm1go
id: ping_pong
label: 'Ping Pong'
revision: false
description: 'A ping pong component.'

View File

@ -0,0 +1,68 @@
uuid: cec1a040-81f5-465e-93b0-7f8c1b329a3b
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.field.block_content.ping_pong.field_ping_pong_background_color
- field.field.block_content.ping_pong.field_ping_pong_body
- field.field.block_content.ping_pong.field_ping_pong_cta
- field.field.block_content.ping_pong.field_ping_pong_layout
- field.field.block_content.ping_pong.field_ping_pong_media_alignment
- field.field.block_content.ping_pong.field_ping_pong_media_items
module:
- color_field
- link
- media_library
- text
_core:
default_config_hash: gtqwbxZq9ow8kKCtm8NHPHnhmke26lB-c6DFht_GpEU
id: block_content.ping_pong.default
targetEntityType: block_content
bundle: ping_pong
mode: default
content:
field_ping_pong_background_color:
type: color_field_widget_box
weight: 1
region: content
settings:
default_colors: '#ac725e,#d06b64,#f83a22,#fa573c,#ff7537,#ffad46,#42d692,#16a765,#7bd148,#b3dc6c,#fbe983'
third_party_settings: { }
field_ping_pong_body:
type: text_textarea
weight: 5
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_ping_pong_cta:
type: link_default
weight: 26
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_ping_pong_layout:
type: options_select
weight: 2
region: content
settings: { }
third_party_settings: { }
field_ping_pong_media_alignment:
type: options_select
weight: 3
region: content
settings: { }
third_party_settings: { }
field_ping_pong_media_items:
type: media_library_widget
weight: 4
region: content
settings:
media_types: { }
third_party_settings: { }
hidden:
info: true

View File

@ -0,0 +1,77 @@
uuid: ed5314c0-a437-46a6-8f0a-8a09370c01b2
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.field.block_content.ping_pong.field_ping_pong_background_color
- field.field.block_content.ping_pong.field_ping_pong_body
- field.field.block_content.ping_pong.field_ping_pong_cta
- field.field.block_content.ping_pong.field_ping_pong_layout
- field.field.block_content.ping_pong.field_ping_pong_media_alignment
- field.field.block_content.ping_pong.field_ping_pong_media_items
module:
- color_field
- link
- options
- text
_core:
default_config_hash: qTNnUYshVkxTA-MivgwS3w34Vfb_zBdcltV-4FP5yuM
id: block_content.ping_pong.default
targetEntityType: block_content
bundle: ping_pong
mode: default
content:
field_ping_pong_background_color:
type: color_field_formatter_text
label: hidden
settings:
format: hex
opacity: true
third_party_settings: { }
weight: 5
region: content
field_ping_pong_body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 6
region: content
field_ping_pong_cta:
type: link
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 11
region: content
field_ping_pong_layout:
type: list_default
label: hidden
settings: { }
third_party_settings: { }
weight: 8
region: content
field_ping_pong_media_alignment:
type: list_default
label: hidden
settings: { }
third_party_settings: { }
weight: 9
region: content
field_ping_pong_media_items:
type: entity_reference_entity_view
label: hidden
settings:
view_mode: ping_pong
link: false
third_party_settings: { }
weight: 10
region: content
hidden:
search_api_excerpt: true

View File

@ -0,0 +1,40 @@
uuid: ad80e641-9853-4131-9802-0394aa966e30
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.ping_pong
- field.field.media.image.field_media_image
- image.style.large
- media.type.image
module:
- image
- layout_builder
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
_core:
default_config_hash: UKOGAdmEK7rEHkH0kBFPubtXhcaXX1YIbPEyGWBUamQ
id: media.image.ping_pong
targetEntityType: media
bundle: image
mode: ping_pong
content:
field_media_image:
type: image
label: visually_hidden
settings:
image_link: ''
image_style: large
image_loading:
attribute: lazy
third_party_settings: { }
weight: 1
region: content
hidden:
created: true
name: true
search_api_excerpt: true
thumbnail: true
uid: true

View File

@ -0,0 +1,42 @@
uuid: fd852e6e-b857-45f5-9ff9-125ab5611d51
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.ping_pong
- field.field.media.video.field_media_video_file
- media.type.video
module:
- file
- layout_builder
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
_core:
default_config_hash: '-9v9f614kw0DYPI7FNkmMQ3udIrSSWYETpCgSfbcSOo'
id: media.video.ping_pong
targetEntityType: media
bundle: video
mode: ping_pong
content:
field_media_video_file:
type: file_video
label: visually_hidden
settings:
controls: true
autoplay: false
loop: false
multiple_file_display_type: tags
muted: false
width: 640
height: 480
third_party_settings: { }
weight: 0
region: content
hidden:
created: true
name: true
search_api_excerpt: true
thumbnail: true
uid: true

View File

@ -0,0 +1,13 @@
uuid: 3907b7a9-1d74-4907-bcd5-ec4cc1071ed2
langcode: en
status: true
dependencies:
module:
- media
_core:
default_config_hash: X_LwtmVNteGDqRvzdmyTFKkmu7Xx6qaCl-6bLrVLNbA
id: media.ping_pong
label: 'Ping Pong'
description: ''
targetEntityType: media
cache: true

View File

@ -7,12 +7,14 @@ module:
block_content: 0
breakpoint: 0
ckeditor5: 0
color_field: 0
config: 0
config_split: 0
contact: 0
contextual: 0
datetime: 0
dblog: 0
dc_components: 0
editor: 0
field: 0
field_group: 0
@ -26,6 +28,7 @@ module:
history: 0
image: 0
layout_builder: 0
layout_builder_admin_theme: 0
layout_discovery: 0
link: 0
mailsystem: 0

View File

@ -0,0 +1,24 @@
uuid: 31cd8a2a-3bdf-43cd-9a64-43282c7e94be
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_background_color
module:
- color_field
_core:
default_config_hash: ezyxzl4xM1bQQS3_IcAFFRnju-o64WxI1mdyryUuEHs
id: block_content.ping_pong.field_ping_pong_background_color
field_name: field_ping_pong_background_color
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Background Color'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
opacity: 0
field_type: color_field_type

View File

@ -0,0 +1,24 @@
uuid: 943e8d34-238f-4de9-9196-87ed7785bf74
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_body
module:
- text
_core:
default_config_hash: zPYZcca0J8LOhhlU6GssSI3-driGRHehexRE-UPiXto
id: block_content.ping_pong.field_ping_pong_body
field_name: field_ping_pong_body
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Body'
description: 'The body text of the ping pong.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
allowed_formats: { }
field_type: text_long

View File

@ -0,0 +1,25 @@
uuid: 03279c7a-a355-4a6e-b9ad-b6c051d97963
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_cta
module:
- link
_core:
default_config_hash: Zy5QbfM6fjLOfXhhNOrabOUFd1V7SmiYmqQpWl22zXM
id: block_content.ping_pong.field_ping_pong_cta
field_name: field_ping_pong_cta
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong CTA'
description: 'CTA Link for the ping pong item.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
title: 1
link_type: 17
field_type: link

View File

@ -0,0 +1,23 @@
uuid: 71d04346-f3b6-4b11-ac4f-98cd5ad14b35
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_layout
module:
- options
_core:
default_config_hash: Mu1pQL-7h7tnURr0-HGAwF42_JOngkOL73ENvUKNgWg
id: block_content.ping_pong.field_ping_pong_layout
field_name: field_ping_pong_layout
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Layout'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -0,0 +1,23 @@
uuid: 00c6c95a-5f80-45c8-ab83-deecd252ce32
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_media_alignment
module:
- options
_core:
default_config_hash: MIm1pQBMqr4VdFFBJxle8GgnFee2Vrmx-0vhJJL2VJs
id: block_content.ping_pong.field_ping_pong_media_alignment
field_name: field_ping_pong_media_alignment
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Media Alignment'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -0,0 +1,33 @@
uuid: 207b28f1-37af-4c91-9cb1-d75d76ab2277
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_media_items
- media.type.image
- media.type.video
_core:
default_config_hash: KuTVYswdXH2jP5L9LZoK4oNOGA33Wc7TJPIWy3zJsl4
id: block_content.ping_pong.field_ping_pong_media_items
field_name: field_ping_pong_media_items
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Media Items'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:media'
handler_settings:
target_bundles:
image: image
video: video
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: image
field_type: entity_reference

View File

@ -0,0 +1,22 @@
uuid: 2c91aadc-de94-4014-80b0-0165cb294d7e
langcode: en
status: true
dependencies:
module:
- block_content
- color_field
_core:
default_config_hash: MSvWPCCT4eCIZnbaC6hljsCAcPpF3Li2apqdmtEBPK0
id: block_content.field_ping_pong_background_color
field_name: field_ping_pong_background_color
entity_type: block_content
type: color_field_type
settings:
format: '#HEXHEX'
module: color_field
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,21 @@
uuid: 251a77bd-a105-4525-b528-0d1acdb5dea0
langcode: en
status: true
dependencies:
module:
- block_content
- text
_core:
default_config_hash: XNZ-wdt5ua4Zyx_XcALhjx1L1D9V376alPCdRmRr5qQ
id: block_content.field_ping_pong_body
field_name: field_ping_pong_body
entity_type: block_content
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,21 @@
uuid: 5f9b0f7a-f3ed-4b92-9558-d02846914aff
langcode: en
status: true
dependencies:
module:
- block_content
- link
_core:
default_config_hash: _arcoZMgCtlP6bGc6BhPadaSLqR-aMGBNq4LCT0gq7U
id: block_content.field_ping_pong_cta
field_name: field_ping_pong_cta
entity_type: block_content
type: link
settings: { }
module: link
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,38 @@
uuid: cb0cf63f-b12d-42a4-9ad8-151a6b45e5c4
langcode: en
status: true
dependencies:
module:
- block_content
- options
_core:
default_config_hash: qSeZZd3J0QDQqjrG9GLWA9lyQ8-TdiDRcApvG7piG4M
id: block_content.field_ping_pong_layout
field_name: field_ping_pong_layout
entity_type: block_content
type: list_string
settings:
allowed_values:
-
value: '50_50'
label: 50-50
-
value: '67_33'
label: 67-33
-
value: '33_67'
label: 33-67
-
value: '25_75'
label: 25-75
-
value: '75_25'
label: 75-25
allowed_values_function: ''
module: options
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,29 @@
uuid: 5aad3453-4210-45e5-a891-949efed0792c
langcode: en
status: true
dependencies:
module:
- block_content
- options
_core:
default_config_hash: a0JdFR0zzMd8kg8LMeiqMCNLmRKyKh12ZsmPQUVhYLE
id: block_content.field_ping_pong_media_alignment
field_name: field_ping_pong_media_alignment
entity_type: block_content
type: list_string
settings:
allowed_values:
-
value: left
label: Left
-
value: right
label: Right
allowed_values_function: ''
module: options
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,22 @@
uuid: ced369f0-c81f-44c2-9715-c80f73ba58ae
langcode: en
status: true
dependencies:
module:
- block_content
- media
_core:
default_config_hash: Jwsq7a6-H6IvdO7Gnpw9Tm1tBb2O0a9O7DOcWne62KM
id: block_content.field_ping_pong_media_items
field_name: field_ping_pong_media_items
entity_type: block_content
type: entity_reference
settings:
target_type: media
module: core
locked: false
cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,3 @@
_core:
default_config_hash: G28OpfOStb3binh5JnrnKOrYQfViQi14-GWN8Zp3o20
lbat_enable_admin_theme: true

View File

@ -0,0 +1,35 @@
name: Ping Pong
props:
type: object
properties:
mediaAlign:
type: string
title: Media Alignment
description: 'Which side to put media on.'
layout:
type: string
title: Layout
description: 'The layout widths'
enum: ['50-50', '33-66', '66-33', '25-75', '75-25']
bgColor:
type: string
title: Color
description: 'The background color.'
slots:
headline:
title: Headline
description: This is the headline for the text block.
body:
title: Body
description: This is the body for the text block.
cta:
title: CTA
description: The CTA link.
media:
title: Media
description: The media item(s).
libraryOverrides:
dependencies:
- core/drupal
- core/once

View File

@ -0,0 +1,95 @@
.ping-pong-wrapper {
max-height: 600px;
display: flex;
width: 100%;
}
.ping-pong {
display: flex;
flex-wrap: wrap;
}
.ping-pong__info {
justify-content: center;
align-items: center;
display: flex;
flex-wrap: wrap;
flex-direction: row;
}
.ping-pong__info-inner {
width: 65%;
margin: auto;
}
@media screen and (max-width: 767px) {
.ping-pong__info-inner {
width: 100%;
padding: 30px;
}
}
.ping-pong__info h2 {
margin: 0;
}
.ping-pong.right {
flex-direction: row-reverse;
}
.ping-pong > div {
flex: 1;
}
@media screen and (max-width: 767px) {
.ping-pong > div {
flex: 1 0 100%;
}
}
.field--name-field-ping-pong-cta a {
background: rgba(255, 255, 255, 0.66);
padding: 10px 20px;
border-radius: 10px;
transition: background .5s ease;
cursor: pointer;
}
.field--name-field-ping-pong-cta a:hover {
background: white;
}
/** slider styles */
.ping-pong .slide img {
width: 100%;
object-fit: cover;
display: block;
height: 400px;
}
.ping-pong .slide.active img {
display: block;
opacity: 1;
visibility: visible;
transition: all .5s ease-in-out;
}
.ping-pong .slide.hide img {
opacity: 0;
visibility: hidden;
transition: all .5s ease-in-out;
}
.ping-pong .slide img {
display: none;
visibility: hidden;
opacity: 0;
transition: all .5s ease-in-out;
}
.ping-pong ul.slides {
list-style-type: none;
padding: 0;
margin: 0;
max-height: 100%;
}

View File

@ -0,0 +1,38 @@
(function (Drupal, once) {
Drupal.behaviors.pingPongSlider = {
attach: function (context, settings) {
let sliders = once('pingPongSlider', '.slider', context);
sliders.forEach((slider) => {
// get the slides
let slides = slider.querySelectorAll('.slide');
slides[0].classList.add("active");
if (slides.length <= 1) {
return;
}
changeSlide(slider);
});
function changeSlide(sliderDiv, loop = 1) {
setTimeout(() => {
let slideCount = sliderDiv.querySelectorAll('.slide').length;
let activeSlide = sliderDiv.querySelector('.slide.active');
let nextSlide = activeSlide.nextElementSibling;
if (loop == slideCount) {
nextSlide = sliderDiv.querySelectorAll('.slide')[0];
return;
// get the first slide
}
else {
loop++;
activeSlide.classList.toggle('active');
nextSlide.classList.toggle('active');
changeSlide(sliderDiv, loop);
}
}, 10000);
}
}
};
})(Drupal, once);

View File

@ -0,0 +1,40 @@
{#
* Component variables
*
* props:
* layout
* media_alignment
* background_color
*
* slots
* headline
* body
* cta
* media
*
#}
{% set classes = [
'ping-pong',
mediaAlign|clean_class
] %}
<div {{ attributes.addClass(classes) }} style="background-color: {{ bgColor }}">
{{ title_prefix }}
{{ title_suffix }}
<div class="ping-pong__media">
{% block media %}{% endblock %}
</div>
<div class="ping-pong__info">
<div class="ping-pong__info-inner">
<div class="ping-pong__info-headline">
{% block headline %}{% endblock %}
</div>
<div class="ping-pong__info-text">
{% block body %}{% endblock %}
</div>
<div class="ping-pong__info-cta">
{% block cta %}{% endblock %}
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,8 @@
uuid: 62221ff8-bff9-4615-b8b1-b5387c5c5fb8
langcode: en
status: true
dependencies: { }
id: ping_pong
label: 'Ping Pong'
revision: false
description: 'A ping pong component.'

View File

@ -0,0 +1,66 @@
uuid: cec1a040-81f5-465e-93b0-7f8c1b329a3b
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.field.block_content.ping_pong.field_ping_pong_background_color
- field.field.block_content.ping_pong.field_ping_pong_body
- field.field.block_content.ping_pong.field_ping_pong_cta
- field.field.block_content.ping_pong.field_ping_pong_layout
- field.field.block_content.ping_pong.field_ping_pong_media_alignment
- field.field.block_content.ping_pong.field_ping_pong_media_items
module:
- color_field
- link
- media_library
- text
id: block_content.ping_pong.default
targetEntityType: block_content
bundle: ping_pong
mode: default
content:
field_ping_pong_background_color:
type: color_field_widget_box
weight: 1
region: content
settings:
default_colors: '#ac725e,#d06b64,#f83a22,#fa573c,#ff7537,#ffad46,#42d692,#16a765,#7bd148,#b3dc6c,#fbe983'
third_party_settings: { }
field_ping_pong_body:
type: text_textarea
weight: 5
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_ping_pong_cta:
type: link_default
weight: 26
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_ping_pong_layout:
type: options_select
weight: 2
region: content
settings: { }
third_party_settings: { }
field_ping_pong_media_alignment:
type: options_select
weight: 3
region: content
settings: { }
third_party_settings: { }
field_ping_pong_media_items:
type: media_library_widget
weight: 4
region: content
settings:
media_types: { }
third_party_settings: { }
hidden:
info: true

View File

@ -0,0 +1,75 @@
uuid: ed5314c0-a437-46a6-8f0a-8a09370c01b2
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.field.block_content.ping_pong.field_ping_pong_background_color
- field.field.block_content.ping_pong.field_ping_pong_body
- field.field.block_content.ping_pong.field_ping_pong_cta
- field.field.block_content.ping_pong.field_ping_pong_layout
- field.field.block_content.ping_pong.field_ping_pong_media_alignment
- field.field.block_content.ping_pong.field_ping_pong_media_items
module:
- color_field
- link
- options
- text
id: block_content.ping_pong.default
targetEntityType: block_content
bundle: ping_pong
mode: default
content:
field_ping_pong_background_color:
type: color_field_formatter_text
label: hidden
settings:
format: hex
opacity: true
third_party_settings: { }
weight: 5
region: content
field_ping_pong_body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 6
region: content
field_ping_pong_cta:
type: link
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 11
region: content
field_ping_pong_layout:
type: list_default
label: hidden
settings: { }
third_party_settings: { }
weight: 8
region: content
field_ping_pong_media_alignment:
type: list_default
label: hidden
settings: { }
third_party_settings: { }
weight: 9
region: content
field_ping_pong_media_items:
type: entity_reference_entity_view
label: hidden
settings:
view_mode: ping_pong
link: false
third_party_settings: { }
weight: 10
region: content
hidden:
search_api_excerpt: true

View File

@ -0,0 +1,40 @@
uuid: ad80e641-9853-4131-9802-0394aa966e30
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.ping_pong
- field.field.media.image.field_media_image
- image.style.large
- media.type.image
module:
- image
- layout_builder
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
_core:
default_config_hash: 73xaTNkI5J6sfFcBmNYeuk070X3mQS_iwwWaPYyfG2M
id: media.image.ping_pong
targetEntityType: media
bundle: image
mode: ping_pong
content:
field_media_image:
type: image
label: visually_hidden
settings:
image_link: ''
image_style: large
image_loading:
attribute: lazy
third_party_settings: { }
weight: 1
region: content
hidden:
created: true
name: true
search_api_excerpt: true
thumbnail: true
uid: true

View File

@ -0,0 +1,42 @@
uuid: fd852e6e-b857-45f5-9ff9-125ab5611d51
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.ping_pong
- field.field.media.video.field_media_video_file
- media.type.video
module:
- file
- layout_builder
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
_core:
default_config_hash: SxvbuGh-6cQMxl9bBV27-hGI46u7ZvwlMm5ObaJMNnw
id: media.video.ping_pong
targetEntityType: media
bundle: video
mode: ping_pong
content:
field_media_video_file:
type: file_video
label: visually_hidden
settings:
controls: true
autoplay: false
loop: false
multiple_file_display_type: tags
muted: false
width: 640
height: 480
third_party_settings: { }
weight: 0
region: content
hidden:
created: true
name: true
search_api_excerpt: true
thumbnail: true
uid: true

View File

@ -0,0 +1,11 @@
uuid: 3907b7a9-1d74-4907-bcd5-ec4cc1071ed2
langcode: en
status: true
dependencies:
module:
- media
id: media.ping_pong
label: 'Ping Pong'
description: ''
targetEntityType: media
cache: true

View File

@ -0,0 +1,22 @@
uuid: 31cd8a2a-3bdf-43cd-9a64-43282c7e94be
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_background_color
module:
- color_field
id: block_content.ping_pong.field_ping_pong_background_color
field_name: field_ping_pong_background_color
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Background Color'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
opacity: 0
field_type: color_field_type

View File

@ -0,0 +1,22 @@
uuid: 943e8d34-238f-4de9-9196-87ed7785bf74
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_body
module:
- text
id: block_content.ping_pong.field_ping_pong_body
field_name: field_ping_pong_body
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Body'
description: 'The body text of the ping pong.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
allowed_formats: { }
field_type: text_long

View File

@ -0,0 +1,23 @@
uuid: 03279c7a-a355-4a6e-b9ad-b6c051d97963
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_cta
module:
- link
id: block_content.ping_pong.field_ping_pong_cta
field_name: field_ping_pong_cta
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong CTA'
description: 'CTA Link for the ping pong item.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
title: 1
link_type: 17
field_type: link

View File

@ -0,0 +1,21 @@
uuid: 71d04346-f3b6-4b11-ac4f-98cd5ad14b35
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_layout
module:
- options
id: block_content.ping_pong.field_ping_pong_layout
field_name: field_ping_pong_layout
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Layout'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -0,0 +1,21 @@
uuid: 00c6c95a-5f80-45c8-ab83-deecd252ce32
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_media_alignment
module:
- options
id: block_content.ping_pong.field_ping_pong_media_alignment
field_name: field_ping_pong_media_alignment
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Media Alignment'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string

View File

@ -0,0 +1,31 @@
uuid: 207b28f1-37af-4c91-9cb1-d75d76ab2277
langcode: en
status: true
dependencies:
config:
- block_content.type.ping_pong
- field.storage.block_content.field_ping_pong_media_items
- media.type.image
- media.type.video
id: block_content.ping_pong.field_ping_pong_media_items
field_name: field_ping_pong_media_items
entity_type: block_content
bundle: ping_pong
label: 'Ping Pong Media Items'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:media'
handler_settings:
target_bundles:
image: image
video: video
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: image
field_type: entity_reference

View File

@ -0,0 +1,20 @@
uuid: 2c91aadc-de94-4014-80b0-0165cb294d7e
langcode: en
status: true
dependencies:
module:
- block_content
- color_field
id: block_content.field_ping_pong_background_color
field_name: field_ping_pong_background_color
entity_type: block_content
type: color_field_type
settings:
format: '#HEXHEX'
module: color_field
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,19 @@
uuid: 251a77bd-a105-4525-b528-0d1acdb5dea0
langcode: en
status: true
dependencies:
module:
- block_content
- text
id: block_content.field_ping_pong_body
field_name: field_ping_pong_body
entity_type: block_content
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,19 @@
uuid: 5f9b0f7a-f3ed-4b92-9558-d02846914aff
langcode: en
status: true
dependencies:
module:
- block_content
- link
id: block_content.field_ping_pong_cta
field_name: field_ping_pong_cta
entity_type: block_content
type: link
settings: { }
module: link
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,36 @@
uuid: cb0cf63f-b12d-42a4-9ad8-151a6b45e5c4
langcode: en
status: true
dependencies:
module:
- block_content
- options
id: block_content.field_ping_pong_layout
field_name: field_ping_pong_layout
entity_type: block_content
type: list_string
settings:
allowed_values:
-
value: '50_50'
label: 50-50
-
value: '67_33'
label: 67-33
-
value: '33_67'
label: 33-67
-
value: '25_75'
label: 25-75
-
value: '75_25'
label: 75-25
allowed_values_function: ''
module: options
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,27 @@
uuid: 5aad3453-4210-45e5-a891-949efed0792c
langcode: en
status: true
dependencies:
module:
- block_content
- options
id: block_content.field_ping_pong_media_alignment
field_name: field_ping_pong_media_alignment
entity_type: block_content
type: list_string
settings:
allowed_values:
-
value: left
label: Left
-
value: right
label: Right
allowed_values_function: ''
module: options
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,20 @@
uuid: ced369f0-c81f-44c2-9715-c80f73ba58ae
langcode: en
status: true
dependencies:
module:
- block_content
- media
id: block_content.field_ping_pong_media_items
field_name: field_ping_pong_media_items
entity_type: block_content
type: entity_reference
settings:
target_type: media
module: core
locked: false
cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,5 @@
name: DC Component Library
description: 'Components for use on a site.'
type: module
package: custom
core_version_requirement: ^10.3 || ^11

View File

@ -0,0 +1,12 @@
swiffy:
theme:
css:
libraries/swiffy-slider.min.css: { minified: true }
js:
libraries/swiffy-slider.min.js: { minified: true }
glide:
theme:
css:
libraries/glide.core.min.css: { minified: true }
js:
libraries/glide.min.js: { minified: true }

View File

@ -0,0 +1,17 @@
<?php
/**
* Implements hook_theme().
*/
function dc_components_theme() {
return [
'block__inline_block__ping_pong' => [
'render element' => 'elements',
'base hook' => 'block',
],
'field__block_content__field_ping_pong_media_items__ping_pong' => [
'render element' => 'elements',
'base hook' => 'field'
]
];
}

View File

@ -0,0 +1 @@
.glide{position:relative;width:100%;box-sizing:border-box}.glide *{box-sizing:inherit}.glide__track{overflow:hidden}.glide__slides{position:relative;width:100%;list-style:none;backface-visibility:hidden;transform-style:preserve-3d;touch-action:pan-Y;overflow:hidden;margin:0;padding:0;white-space:nowrap;display:flex;flex-wrap:nowrap;will-change:transform}.glide__slides--dragging{user-select:none}.glide__slide{width:100%;height:100%;flex-shrink:0;white-space:normal;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.glide__slide a{user-select:none;-webkit-user-drag:none;-moz-user-select:none;-ms-user-select:none}.glide__arrows{-webkit-touch-callout:none;user-select:none}.glide__bullets{-webkit-touch-callout:none;user-select:none}.glide--rtl{direction:rtl}/*# sourceMappingURL=glide.core.min.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
{
"version": 3,
"sources": [
"swiffy-slider.css"
],
"names": [],
"mappings": "AAAA,eACI,SAAU,SACV,QAAS,MACT,MAAO,KACP,2BAA4B,OAC5B,2BAA4B,KAC5B,yBAA0B,KAC1B,4BAA6B,KAC7B,2BAA4B,CAAC,CAAC,EAC9B,2BAA4B,EAC5B,0BAA2B,KAC3B,yBAA0B,KAC1B,yBAA0B,EAC1B,8BAA+B,IAC/B,6BAA8B,EAC9B,iCAAkC,OAClC,uCAAwC,OACxC,mCAAoC,KACpC,gCAAiC,GACjC,iCAAkC,YAGtC,eACA,sBACA,uBACI,WAAY,WAGhB,mCACI,OAAQ,kCAGZ,yCACI,WAAY,+CAGhB,yCACI,WAAY,eACZ,cAAe,KAGnB,+CACI,WAAY,eAGhB,kBACI,oCAAqC,4EACrC,2BAA4B,6HAC5B,WAAY,KACZ,2BAA4B,MAC5B,qBAAsB,EAAE,UACpB,iBAAkB,EAAE,UACxB,gBAAiB,OACjB,QAAS,KACT,YAAa,OACb,OAAQ,KACR,KAAM,IAAK,CAAE,UAAU,oBACvB,KAAM,IAAK,CAAE,UAAU,YACvB,eAAgB,KAChB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AmB,iDAEvB,wDACI,kBAAmB,yDAEvB,0DACI,kBAAmB,MAEvB,iEACI,QAAS,IACT,QAAS,MACT,SAAU,SACV,KAAM,2CACN,IAAK,EAEL,MAAO,IACP,OAAQ,IACR,kBAAmB,OAGvB,mBADA,oBAEI,MAAO,KACP,OAAQ,KACR,QAAS,MAEb,qCACA,sCACI,MAAO,QACP,OAAQ,QACR,OAAQ,QAGZ,sCADA,6CAEI,OAAQ,EAAE,KAEd,6CACI,OAAQ,EAAE,sCAEd,uCACI,QAAS,EAKb,8CADA,6CADA,+CADA,8CAII,MAAO,MACP,OAAQ,MAEZ,mBACI,cAAe,MACf,QAAS,KAEb,yCACI,cAAe,EAEnB,qBACI,MAAO,KACP,OAAQ,QACR,aAAc,OAElB,yCACA,wCACI,QAAS,MAIjB,yBACI,qCACI,kBAAmB,+CAEvB,wDACI,kBAAmB,yDAI3B,oBACI,4CACI,WAAY,QAGhB,2EADA,kFAEI,OAAQ,EAAE,EAEd,0BACI,2BAA4B"
}

View File

@ -0,0 +1,2 @@
const swiffyslider={version:"1.6.0",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let i=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,i),{passive:!0})}for(let t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}if(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){const t=e.getAttribute("data-slider-nav-animation-threshold")?e.getAttribute("data-slider-nav-animation-threshold"):.3;this.setVisibleSlides(e,t)}},setVisibleSlides(e,t=.3){let i=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let t of e.querySelectorAll(".slider-container>*"))i.observe(t)},slide(e,t=!0){const i=e.querySelector(".slider-container"),s=e.classList.contains("slider-nav-page"),l=e.classList.contains("slider-nav-noloop"),r=e.classList.contains("slider-nav-nodelay"),o=i.children,n=parseInt(window.getComputedStyle(i).columnGap),a=o[0].offsetWidth+n;let d=t?i.scrollLeft+a:i.scrollLeft-a;s&&(d=t?i.scrollLeft+i.offsetWidth:i.scrollLeft-i.offsetWidth),i.scrollLeft<1&&!t&&!l&&(d=i.scrollWidth-i.offsetWidth),i.scrollLeft>=i.scrollWidth-i.offsetWidth&&t&&!l&&(d=0),i.scroll({left:d,behavior:r?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),i=e.parentElement.children.length,s=e.closest(".swiffy-slider"),l=s.querySelector(".slider-container").children.length/i*t;this.slideTo(s,l)},slideTo(e,t){const i=e.querySelector(".slider-container"),s=parseInt(window.getComputedStyle(i).columnGap),l=i.children[0].offsetWidth+s,r=e.classList.contains("slider-nav-nodelay");i.scroll({left:l*t,behavior:r?"auto":"smooth"})},onSlideEnd(e,t,i=125){let s;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(s),s=setTimeout(t,i)}),{capture:!1,passive:!0})},autoPlay(e,t,i){t=t<750?750:t;let s=setInterval(()=>this.slide(e),t);const l=()=>this.autoPlay(e,t,i);return i&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(s)}),{once:!0,passive:!0})})),["mouseout","touchend"].forEach((function(t){e.addEventListener(t,(function(){l()}),{once:!0,passive:!0})}))),s},handleIndicators(e){if(!e)return;const t=e.querySelector(".slider-container"),i=t.scrollWidth-t.offsetWidth,s=t.scrollLeft/i;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,i=Math.abs(Math.round((e.length-1)*s));for(let t of e)t.classList.remove("active");e[i].classList.add("active")}}};window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||(document.currentScript.hasAttribute("defer")?swiffyslider.init():document.onreadystatechange=()=>{"interactive"===document.readyState&&swiffyslider.init()});
//# sourceMappingURL=swiffy-slider.min.js.map

View File

@ -0,0 +1,104 @@
{
"version": 3,
"sources": [
"swiffy-slider.js"
],
"names": [
"swiffyslider",
"version",
"[object Object]",
"rootElement",
"document",
"body",
"sliderElement",
"querySelectorAll",
"this",
"initSlider",
"navElement",
"next",
"classList",
"contains",
"addEventListener",
"slide",
"passive",
"indicatorElement",
"slideToByIndicator",
"onSlideEnd",
"handleIndicators",
"timeout",
"getAttribute",
"autoPlay",
"some",
"className",
"threshold",
"setVisibleSlides",
"observer",
"IntersectionObserver",
"slides",
"forEach",
"isIntersecting",
"target",
"add",
"remove",
"querySelector",
"root",
"observe",
"container",
"fullpage",
"noloop",
"nodelay",
"children",
"gapWidth",
"parseInt",
"window",
"getComputedStyle",
"columnGap",
"scrollStep",
"offsetWidth",
"scrollLeftPosition",
"scrollLeft",
"scrollWidth",
"scroll",
"left",
"behavior",
"indicator",
"event",
"indicatorIndex",
"Array",
"from",
"parentElement",
"indexOf",
"indicatorCount",
"length",
"closest",
"relativeSlideIndex",
"slideTo",
"slideIndex",
"delegate",
"isScrolling",
"clearTimeout",
"setTimeout",
"capture",
"autopause",
"autoplayTimer",
"setInterval",
"autoplayer",
"once",
"slidingAreaWidth",
"percentSlide",
"scrollIndicatorContainers",
"scrollIndicators",
"activeIndicator",
"Math",
"abs",
"round",
"element",
"currentScript",
"hasAttribute",
"init",
"onreadystatechange",
"readyState"
],
"mappings": "AAAA,MAAMA,aACK,CACHC,QAAS,QACTC,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AAa2F",
"file": "swiffy-slider.js"
}

View File

@ -0,0 +1,45 @@
{#
* Component variables
*
* props:
* layout
* mediaAlign
* bgColor
*
* slots
* headline
* body
* cta
* media
*
#}
{% set align = content.field_ping_pong_media_alignment.0['#markup'] %}
{% set bgColor = content.field_ping_pong_background_color.0['#markup']|default('#fff') %}
<div {{ attributes.addClass('ping-pong-wrapper') }}>
{{ title_prefix }}
{{ title_suffix }}
{% embed 'dc_components:ping-pong' with {
mediaAlign: align,
bgColor: bgColor,
}%}
{% block headline %}
<h2>{{ label }}</h2>
{% endblock%}
{% block body %}
{{ content.field_ping_pong_body }}
{% endblock %}
{% block cta %}
{{ content.field_ping_pong_cta }}
{% endblock %}
{% block media %}
{{ content.field_ping_pong_media_items }}
{% endblock %}
{% endembed %}
</div>

View File

@ -0,0 +1,50 @@
{#
/**
* @file
* Theme override for a field.
*
* To override output, copy the "field.html.twig" from the templates directory
* to your theme's directory and customize it, just like customizing other
* Drupal templates such as page.html.twig or node.html.twig.
*
* Instead of overriding the theming for all fields, you can also just override
* theming for a subset of fields using
* @link themeable Theme hook suggestions. @endlink For example,
* here are some theme hook suggestions that can be used for a field_foo field
* on an article node type:
* - field--node--field-foo--article.html.twig
* - field--node--field-foo.html.twig
* - field--node--article.html.twig
* - field--field-foo.html.twig
* - field--text-with-summary.html.twig
* - field.html.twig
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether to show the field label or not.
* - title_attributes: HTML attributes for the title.
* - label: The label for the field.
* - multiple: TRUE if a field can contain multiple items.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item's content.
* - entity_type: The entity type to which the field belongs.
* - field_name: The name of the field.
* - field_type: The type of the field.
* - label_display: The display settings for the label.
*
* @see template_preprocess_field()
*/
#}
{%
set title_classes = [
label_display == 'visually_hidden' ? 'visually-hidden',
]
%}
<div{{ attributes.addClass('slider') }}>
<ul class="slides">
{% for item in items %}
<li {{ item.attributes.addClass('slide') }}>{{ item.content }}</li>
{% endfor %}
</ul>
</div>

View File

@ -296,6 +296,11 @@ table.cols-5 td.incorrect {
html {
font-size: 100%;
box-sizing: border-box;
}
.region-content {
padding: 0;
}
body {

View File

@ -34,6 +34,11 @@ $container-plus-padding: 1216px;
html {
font-size: 100%;
box-sizing: border-box;
}
.region-content {
padding: 0;
}
body {