larva modules: carousel-grid.overlay

Available Variants

overlay prototype
carousel-grid README

This module renders Carousel block posts in the Gutenberg editor.

The default pattern renders a primary post, with two secondary posts in the sidebar.

The overlay pattern displays a fuller width primary post with text overlay, and a stacked row of three secondary posts.

The primary post displays section title, a post image and title, author byline and timestamp; the secondary posts display a post image and title only.

carousel-grid Twig The markup file.
<div class="carousel-grid //">
	<div class="lrv-a-wrapper">
		<div class="lrv-a-carousel-grid {{ carousel_grid_overlay_layout_classes }}">

			<div class="lrv-u-padding-a-1">
				{% include "@larva/objects/o-card/o-card.twig" with o_card_large %}
			</div>

			<div class="lrv-u-padding-a-1 {{ carousel_grid_overlay_secondary_classes }}">
				{% for item in o_card_items %}
					{% include "@larva/objects/o-card/o-card.twig" with item %}
				{% endfor %}
			</div>

		</div>
	</div>
</div>
carousel-grid.overlay JSON The data object for this pattern.
{
	"o_card_large": {
		"o_card_classes": "lrv-a-carousel-grid__overlay--primary",
		"o_card_tag_text": "",
		"o_card_link_url": "",
		"o_card_link_classes": "",
		"o_card_image_wrap_classes": "",
		"o_card_content_classes": "lrv-u-padding-a-1 lrv-a-carousel-grid__overlay--primary-content",
		"c_lazy_image": {
			"c_lazy_image_classes": "lrv-a-carousel-grid__overlay--primary-img",
			"c_lazy_image_link_url": "#",
			"c_lazy_image_link_classes": "lrv-a-unstyle-link",
			"c_lazy_image_crop_class": "lrv-a-crop-3x2",
			"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"
		},
		"c_svg": false,
		"c_span": {
			"modifier_class": "",
			"c_span_classes": "lrv-u-whitespace-nowrap",
			"c_span_text": "Film",
			"c_span_url": "#",
			"c_span_link_classes": ""
		},
		"c_tagline": false,
		"c_title": {
			"c_title_classes": "lrv-a-font-primary-xs lrv-u-margin-tb-050",
			"c_title_tag_text": "",
			"c_title_id_attr": "title-of-a-story",
			"c_title_text": "‘Avengers: Infinity War’ vs. ‘Black Panther’: 10 Factors That Will Determine Which Film Is Box-Office King",
			"c_title_markup": "",
			"c_title_link_classes": "lrv-a-unstyle-link",
			"c_title_url": "#"
		},
		"c_timestamp": {
			"c_timestamp_classes": "",
			"c_timestamp_datetime_attr": "00:00-YY-DD-MM",
			"c_timestamp_text": false,
			"c_timestamp_aria_label_attr": false
		},
		"o_author": {
			"o_author_classes": "lrv-a-font-secondary-regular-m",
			"o_author_text": "By ",
			"c_span": {
				"modifier_class": "",
				"c_span_classes": "lrv-u-whitespace-nowrap",
				"c_span_text": "Author Name",
				"c_span_url": "",
				"c_span_link_classes": ""
			},
			"c_timestamp": {
				"c_timestamp_classes": "lrv-a-icon-before lrv-a-icon-bullet",
				"c_timestamp_datetime_attr": "00:00-YY-DD-MM",
				"c_timestamp_text": "July 7, 2021",
				"c_timestamp_aria_label_attr": false
			},
			"c_tagline_author": false
		},
		"article_kicker": false,
		"article_kicker_outer_classes": ""
	},
	"o_card_items": [
		{
			"o_card_classes": "lrv-u-margin-b-1 lrv-a-carousel-grid__overlay--secondary-card lrv-u-align-items-center",
			"o_card_tag_text": "",
			"o_card_link_url": "",
			"o_card_link_classes": "",
			"o_card_image_wrap_classes": "",
			"o_card_content_classes": " lrv-u-margin-t-050",
			"c_lazy_image": {
				"c_lazy_image_classes": "  lrv-u-width-100p",
				"c_lazy_image_link_url": "#",
				"c_lazy_image_link_classes": "lrv-a-unstyle-link",
				"c_lazy_image_crop_class": "lrv-a-crop-1x1",
				"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"
			},
			"c_svg": false,
			"c_span": {
				"modifier_class": "",
				"c_span_classes": "lrv-u-whitespace-nowrap",
				"c_span_text": false,
				"c_span_url": "#",
				"c_span_link_classes": ""
			},
			"c_tagline": false,
			"c_title": {
				"c_title_classes": "lrv-a-font-secondary-m",
				"c_title_tag_text": "",
				"c_title_id_attr": "title-of-a-story",
				"c_title_text": "‘Solo: A Star Wars Story’ Is Going to Cannes, So Does That Mean It’s Good?",
				"c_title_markup": "",
				"c_title_link_classes": "lrv-a-unstyle-link",
				"c_title_url": "#"
			},
			"c_timestamp": {
				"c_timestamp_classes": "",
				"c_timestamp_datetime_attr": "00:00-YY-DD-MM",
				"c_timestamp_text": false,
				"c_timestamp_aria_label_attr": false
			},
			"o_author": false,
			"article_kicker": false,
			"article_kicker_outer_classes": ""
		},
		{
			"o_card_classes": "lrv-u-margin-b-1 lrv-a-carousel-grid__overlay--secondary-card lrv-u-align-items-center",
			"o_card_tag_text": "",
			"o_card_link_url": "",
			"o_card_link_classes": "",
			"o_card_image_wrap_classes": "",
			"o_card_content_classes": " lrv-u-margin-t-050",
			"c_lazy_image": {
				"c_lazy_image_classes": "  lrv-u-width-100p",
				"c_lazy_image_link_url": "#",
				"c_lazy_image_link_classes": "lrv-a-unstyle-link",
				"c_lazy_image_crop_class": "lrv-a-crop-1x1",
				"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"
			},
			"c_svg": false,
			"c_span": {
				"modifier_class": "",
				"c_span_classes": "lrv-u-whitespace-nowrap",
				"c_span_text": false,
				"c_span_url": "#",
				"c_span_link_classes": ""
			},
			"c_tagline": false,
			"c_title": {
				"c_title_classes": "lrv-a-font-secondary-m",
				"c_title_tag_text": "",
				"c_title_id_attr": "title-of-a-story",
				"c_title_text": "‘Solo: A Star Wars Story’ Is Going to Cannes, So Does That Mean It’s Good?",
				"c_title_markup": "",
				"c_title_link_classes": "lrv-a-unstyle-link",
				"c_title_url": "#"
			},
			"c_timestamp": {
				"c_timestamp_classes": "",
				"c_timestamp_datetime_attr": "00:00-YY-DD-MM",
				"c_timestamp_text": false,
				"c_timestamp_aria_label_attr": false
			},
			"o_author": false,
			"article_kicker": false,
			"article_kicker_outer_classes": ""
		},
		{
			"o_card_classes": "lrv-u-margin-b-1 lrv-a-carousel-grid__overlay--secondary-card lrv-u-align-items-center",
			"o_card_tag_text": "",
			"o_card_link_url": "",
			"o_card_link_classes": "",
			"o_card_image_wrap_classes": "",
			"o_card_content_classes": " lrv-u-margin-t-050",
			"c_lazy_image": {
				"c_lazy_image_classes": "  lrv-u-width-100p",
				"c_lazy_image_link_url": "#",
				"c_lazy_image_link_classes": "lrv-a-unstyle-link",
				"c_lazy_image_crop_class": "lrv-a-crop-1x1",
				"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"
			},
			"c_svg": false,
			"c_span": {
				"modifier_class": "",
				"c_span_classes": "lrv-u-whitespace-nowrap",
				"c_span_text": false,
				"c_span_url": "#",
				"c_span_link_classes": ""
			},
			"c_tagline": false,
			"c_title": {
				"c_title_classes": "lrv-a-font-secondary-m",
				"c_title_tag_text": "",
				"c_title_id_attr": "title-of-a-story",
				"c_title_text": "‘Solo: A Star Wars Story’ Is Going to Cannes, So Does That Mean It’s Good?",
				"c_title_markup": "",
				"c_title_link_classes": "lrv-a-unstyle-link",
				"c_title_url": "#"
			},
			"c_timestamp": {
				"c_timestamp_classes": "",
				"c_timestamp_datetime_attr": "00:00-YY-DD-MM",
				"c_timestamp_text": false,
				"c_timestamp_aria_label_attr": false
			},
			"o_author": false,
			"article_kicker": false,
			"article_kicker_outer_classes": ""
		}
	],
	"carousel_grid_overlay_layout_classes": "lrv-a-carousel-grid__overlay",
	"carousel_grid_overlay_secondary_classes": "lrv-a-carousel-grid__overlay--secondary"
}