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

Quote Block

Field
Field Type
Field Name
Instructions
Block Data
tab
Quote
textarea
quote
Team Member Link
post_object
team_member_link
Name
text
name
Background Image
image
background_img
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/colours";
@import "../../resources/scss/util/variables";
@import "../../resources/scss/util/mixins";

.block-quote-block {
	padding-top: 0;
	padding-bottom: 0;
	overflow: hidden;

	@include bp($sm) {
		padding-top: rem-calc(60);
		padding-bottom: rem-calc(60);
	}

	&__quote {
		@include fluid-type(26, 38);
		font-family: $font-family-heading;
		line-height: normal;

		p {
			@include fluid-type(26, 38);
			font-family: $font-family-heading;
			line-height: normal;

			&:last-of-type {
				margin-bottom: 0;
			}
		}
	}

	&__name {
		margin-top: rem-calc(35);
		text-transform: uppercase;
		font-weight: 700;
		letter-spacing: 1.5px;
		font-size: rem-calc(12);
		position: relative;
		padding-left: rem-calc(60);

		&:before {
			content: '';
			width: rem-calc(50);
			height: rem-calc(1);
			background-color: $white;
			position: absolute;
			top: rem-calc(8);
			left: 0;
		}

		&--link {
			display: inline-block;
			color: $white;
			text-decoration: none;
			transition: all 0.2s ease-in-out;

			&:hover {
				color: $orange;
			}
		}
	}

	&__content {
		background-color: $navy;
		color: $white;
		position: relative;
		z-index: 2;
		padding: rem-calc(40 30);

		@include bp($lg) {
			padding: rem-calc(60);
		}

		.align-items-start & {
			@include bp($lg) {
				margin-top: rem-calc(-60);
			}
		}

		.align-items-end & {
			@include bp($lg) {
				margin-bottom: rem-calc(-60);
			}
		}
	}

	.align-items-start {
		@include bp($lg) {
			margin-top: rem-calc(60);
		}
	}

	.align-items-end {
		@include bp($lg) {
			margin-bottom: rem-calc(60);
		}
	}

	&__copy {
		p {
			&:last-of-type {
				margin-bottom: 0;
			}
		}
	}

	&__image {
		display: block;
		padding-top: 50%;
		position: relative;

		@include bp($lg) {
			padding-top: 100%;
		}

		img {
			width: 100%;
		}

		&--link {
			img {
				transition: transform 4s ease-out;
			}

			picture {
				overflow: hidden;
			}
		}
	}


	&__image-column {
		@include bp($lg) {
			margin-left: calc(2 / 12 * -100%);
		}
	}

	&__content-column {
		.flex-row-reverse & {
			@include bp($lg) {
				margin-left: calc(2 / 12 * -100%);
			}
		}
	}
}
class QuoteBlockCarousel {
	/**
	 * 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-quote-block');
		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, {
				loop: true,
				slidesPerView: 1,
				navigation: {
					nextEl: navNext,
					prevEl: navPrev,
				},
				// speed: 3000,
				breakpoints: {
					992: {
						slidesPerView: 1,
					},
					// 992: {
					// 	slidesPerView: 5,
					// }
				}
			});
		});
	}
}

new QuoteBlockCarousel();
This component is not currently used on any pages.

Animation / States

  • As the user scrolls to this component the items will be lazyloaded fade in one by one
  • As the user scrolls there will be a slight parallax effect on the overlapping layers

External Libraries

  • ScrollTrigger (GSAP)

Notes (Design / Dev / SEO)

  • When adding a quote the user can link a quote to a team member which by default will bring through their profile image. Alternatively, they can add a quote and image themselves.