Global Elements
2
Footer Header Services Strip Services Tabs
Components
36
Card Carousel Cards Grid Content Overlap Content Strip Cta Bar Featured Article Featured Blocks Featured Expert Featured Pods Featured Tabs Form Block Full Screen Carousel Full Width Content Heading Strip Hero Hero Featured Links List Location Tabs Logo Carousel Map Block People Grid Quote Block Reviews Carousel Reviews Tabs Service Tiles Services Strip Services Tabs Staggered Content Sticky Accordion Sticky List Sub Navigation Team Carousel Team Filters Team Strip Tile Carousel Tile Grid

Featured Pods

Field
Field Type
Field Name
Instructions
Block Data
tab
Use Sticky Posts
true_false
use_sticky_posts
Featured Items
relationship
featured_items
Block Meta
tab
ID
text
block_id
Block Classes
text
block_classes
Block Theme
select
block_theme
Background Colors
select
background_colors
Padding Top
select
padding_top
Padding Bottom
select
padding_bottom
Margin Top
select
margin_top
Margin Bottom
select
margin_bottom

				
@import "../../resources/scss/util/variables";
@import "../../resources/scss/util/colours";
@import "../../resources/scss/util/mixins";

.block-featured-pods {
	position: relative;
	z-index: 2;
	background-color: $veryLightBlue;
	padding-bottom: rem-calc(40);

	.swiper {
		margin-top: rem-calc(-40);
	}

	.swiper-slide {
		height: auto;
	}

	.e-carousel__navigation {
		margin-left: 0;
		justify-content: center;
		margin-top: rem-calc(20);
	}

	.e-article-pod {
		margin-top: rem-calc(0);
		transition: all 0.2s ease-in-out;
		height: 100%;
	}

	.st-stagger-reveal {
		height: 100%;
	}
}
class FeaturedPods {
	/**
	 * Create and initialise objects of this class
	 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor
	 * @param {object} block
	 */
	constructor() {
		this.blocks = document.querySelectorAll('.block-featured-pods');
		this.init();
	}

	/**
	 * Example function to run class logic
	 * Can access `this.block`
	 */
	init() {
		this.blocks.forEach((block) => {
			const blockCarousel = block.querySelector(".swiper");
			const navNext = block.querySelector(".e-carousel__next");
			const navPrev = block.querySelector(".e-carousel__prev");

			const swiper = new Swiper(blockCarousel, {
				slidesPerView: 1,
				spaceBetween: 15,
				navigation: {
					nextEl: navNext,
					prevEl: navPrev,
				},
				breakpoints: {
					992: {
						slidesPerView: 3,
					},
					// 992: {
					// 	slidesPerView: 5,
					// }
				}
			});
		});

	}
}

new FeaturedPods();
Page Title
Page Type
Page URL

Animation / States

  • As the user scrolls to this component the items will be lazyloaded fade in one by one
  • When a pod is hovered over, the pod will animate up slightly to show that it's been hovered over.

External Libraries

  • ScrollTrigger (GSAP)

Notes (Design / Dev / SEO)

  • By default this component will pull through the 3 most recent sticky posts. If no sticky posts are available then the latest 3 insights will be pulled through. The user has the ability to select which items are featured.