larva modules: vlanding-video-card
Available Variants
prototypevlanding-video-card
README
This pattern is included in vlanding-video-showcase
, and is intended to be used there only.
vlanding-video-card
Twig The markup file.
{% if vlanding_video_card_permalink_url %}
{% if vlanding_video_card_use_button %}
<button class="vlanding-video-card__link lrv-a-unstyle-button lrv-u-width-100p {{ vlanding_video_card_link_classes }}"
data-video-showcase-trigger="{{ vlanding_video_card_link_showcase_trigger_data_attr }}"
data-video-showcase-type="{{ vlanding_video_card_link_showcase_type_data_attr }}"
data-video-showcase-dek="{{ vlanding_video_card_link_showcase_dek_data_attr }}"
data-video-showcase-title="{{ vlanding_video_card_link_showcase_title_data_attr }}"
data-video-showcase-permalink="{{ vlanding_video_card_link_showcase_permalink_data_url }}"
{% if vlanding_video_card_link_aria_controls_attr %}
aria-controls="{{ vlanding_video_card_link_aria_controls_attr }}"
{% endif %}
>
{% else %}
<a href="{{ vlanding_video_card_permalink_url }}" class="vlanding-video-card__link {{ vlanding_video_card_link_classes }}" data-video-showcase-trigger="{{ vlanding_video_card_link_showcase_trigger_data_attr }}" data-video-showcase-type="{{ vlanding_video_card_link_showcase_type_data_attr }}" data-video-showcase-dek="{{ vlanding_video_card_link_showcase_dek_data_attr }}" data-video-showcase-title="{{ vlanding_video_card_link_showcase_title_data_attr }}" data-video-showcase-permalink="{{ vlanding_video_card_link_showcase_permalink_data_url }}">
{% endif %}
{% endif %}
<div class="vlanding-video-card {{ vlanding_video_card_classes }}" data-video-showcase-player>
<div class="{{ vlanding_video_card_crop_class }}" data-video-showcase-active-text="{{ vlanding_video_card_active_txt_attr }}">
{% if c_lazy_image %}
{% include "@larva/components/c-lazy-image/c-lazy-image.twig" with c_lazy_image %}
{% endif %}
{% if vlanding_video_card_is_player %}
<iframe hidden id="youtubePlayerContainer" frameborder="0" data-video-showcase-iframe></iframe>
<div hidden id="jwplayerContainer" data-video-showcase-jwplayer></div>
{% endif %}
</div>
{% if c_span %}
{% include "@larva/components/c-span/c-span.twig" with c_span %}
{% endif %}
{% if c_title %}
{% include "@larva/components/c-title/c-title.twig" with c_title %}
{% endif %}
</div>
{% if vlanding_video_card_permalink_url %}
{% if vlanding_video_card_use_button %}
</button>
{% else %}
</a>
{% endif %}
{% endif %}
{% if vlanding_video_card_social_share_markup %}
<div class="lrv-a-hidden" data-video-showcase-trigger-social-share>
{{ vlanding_video_card_social_share_markup }}
</div>
{% endif %}
vlanding-video-card
JSON The data object for this pattern.
{
"vlanding_video_card_permalink_url": "#",
"vlanding_video_card_use_button": true,
"vlanding_video_card_link_aria_controls_attr": "",
"vlanding_video_card_link_classes": "lrv-a-unstyle-link",
"vlanding_video_card_link_showcase_trigger_data_attr": "x3HbbzHK5Mc",
"vlanding_video_card_link_showcase_type_data_attr": "youtube",
"vlanding_video_card_link_showcase_dek_data_attr": "text for the dek, update this",
"vlanding_video_card_link_showcase_title_data_attr": "title that should be the same as the card",
"vlanding_video_card_link_showcase_permalink_data_url": "#",
"vlanding_video_card_active_txt_attr": "Now Playing",
"vlanding_video_card_classes": "",
"vlanding_video_card_crop_class": "",
"c_lazy_image": {
"c_lazy_image_classes": "",
"c_lazy_image_link_url": false,
"c_lazy_image_link_classes": "lrv-a-unstyle-link",
"c_lazy_image_crop_class": "lrv-a-crop-16x9",
"c_lazy_image_crop_style_attr": false,
"c_lazy_image_link_tab_index_attr": false,
"c_lazy_image_alt_attr": "Lazy loaded image",
"c_lazy_image_src_url": "https://farm5.staticflickr.com/4078/5441060528_31db7838ba_z.jpg",
"c_lazy_image_placeholder_url": "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",
"c_lazy_image_srcset_attr": "https://farm5.staticflickr.com/4078/5441060528_31db7838ba_m.jpg 240w,https://farm5.staticflickr.com/4078/5441060528_31db7838ba_n.jpg 320w,https://farm5.staticflickr.com/4078/5441060528_31db7838ba.jpg 500w,https://farm5.staticflickr.com/4078/5441060528_31db7838ba_z.jpg 640w,https://farm5.staticflickr.com/4078/5441060528_31db7838ba_b.jpg 1024w",
"c_lazy_image_sizes_attr": "auto",
"c_lazy_image_img_classes": "lrv-u-background-color-grey-lightest lrv-u-width-100p lrv-u-display-block lrv-u-height-auto",
"c_lazy_image_height_attr": "",
"c_lazy_image_width_attr": "",
"c_lazy_image_in_initial_viewport": false,
"c_lazy_image_decoding_attr": "async"
},
"vlanding_video_card_is_player": "",
"c_title": {
"c_title_classes": "",
"c_title_tag_text": "",
"c_title_id_attr": "title-of-a-story",
"c_title_text": "Title of a story",
"c_title_markup": "",
"c_title_link_classes": "",
"c_title_url": "#"
},
"c_span": {
"modifier_class": "",
"c_span_classes": "lrv-u-whitespace-nowrap",
"c_span_text": "Label Text",
"c_span_url": "",
"c_span_link_classes": ""
},
"vlanding_video_card_social_share_markup": ""
}