@import "../../resources/scss/util/variables";
@import "../../resources/scss/util/mixins";
.block-video {
text-align: center;
.overline {
color: var(--color);
}
}
.video-inner {
max-width: 60rem;
margin: 0 auto;
}
.video-item {
position: relative;
overflow: hidden;
display: block;
img {
display: block;
aspect-ratio: 16 / 9;
object-fit: cover;
transition: transform 0.3s ease-in-out;
width: 100%;
}
&:after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba($black, 0.4);
z-index: 2;
}
.play-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 5;
width: 4rem;
height: 4rem;
border-radius: 100%;
background-color: $secondary;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.3s ease-in-out;
.icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: $primary;
transition: color 0.3s ease-in-out;
}
}
&:hover {
.play-icon {
background-color: $primary;
.icon {
color: $white;
}
}
img {
transform: scale(1.02);
}
}
}
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "strategiq/video-old",
"title": "Video OLD",
"description": "Example block to be used as a template",
"category": "strategiq",
"icon": "strategiq",
"acf": {
"mode": "preview",
"renderTemplate": "block-video.php"
},
"supports": {
"anchor": true,
"align": false,
"color": {
"background": true,
"text": false,
"gradients": true
},
"spacing": {
"padding": [
"top",
"bottom"
],
"margin": [
"top",
"bottom"
]
}
},
"example": {
"attributes": {
"mode": "preview",
"data": {
"heading_type": "h2",
"heading_text": "Example - Video",
"content": "This is some example content to represent what the content will look like"
}
}
},
"style": ["file:../../assets/css/video/block-video-old.css", "lity-css"],
"viewScript": ["lity-js"]
}
This component is not currently used on any pages.