Thank you, your advice led me in the right direction. It took quite a bit of fine-tuning but I got it all set up.
To anyone who reads this in the future - I started by creating a field group in ACF Pro with one text field and two image URL fields:
I created a separate post for every one of my videos and entered the Vimeo embed code in the video_url field, uploaded a thumbnail image to the static_thumb field, and uploaded a Vimeo-generated 4-5 second gif to the hover_gif field. I also manually entered my project role and video category into the Excerpt section of each post (e.g. Editor | Corporate Promo).
In Cornerstone I added the Posts (Tiles) dynamic element to an empty single-row section. My Article div has five children:
- Hover GIF div with Looper Provider input of {{dc:acf:post_field field=“hover_gif”}}, containing an Image element with source URL of {{dc:acf:post_field field=“hover_gif”}} and Looper Consumer set to All. Under Effects on the div I set the opacity to 0 so the gif fades in on hover. Z-index = 1
- Published field with HTML of {{dc:post:excerpt}}. Z-index = 0
- Modal containing a Video element with the Embed code set to {{dc:acf:post_field field=“video_url”}}. Also added custom attribute with this Name (and no Value) to prevent videos from autoplaying when toggle is not opened: data-rvt-offscreen-reset
- The Title headline field containing this text content: {{dc:post:title}}. Z-index = 0
- Static Thumbnail div with Looper Provider input of {{dc:acf:post_field field=“static_thumb”}}, containing an Image with source URL of {{dc:acf:post_field field=“static_thumb”}} and Looper Consumer set to All. Z-index = -4
The hardest part was trying to center the toggle (play button graphic) within the tile while still having the lightbox dark overlay be full screen when the toggle is open. This is the final code I added to the modal’s Element CSS:
/*Center modal play button within parent tile*/
$el {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 200;
}
/*Force modal full screen when open*/
$el.x-modal {
position: fixed !important;
width: 100% !important;
height: 100% !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
}
/*Move lightbox close button out from under navbar on desktop*/
@media(min-width: 979px) {
$el.x-modal .x-modal-close {
top: 10%;
right: 2%;
}
}
Have fun. And thanks again for the resources X team!