Skip to content

Instantly share code, notes, and snippets.

@whizzbbig
Created February 4, 2022 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whizzbbig/e8d7e85b8fc33694d4532dd3ae73162c to your computer and use it in GitHub Desktop.
Save whizzbbig/e8d7e85b8fc33694d4532dd3ae73162c to your computer and use it in GitHub Desktop.
extends ../_includes/layout
block variables
- var template = 'about'
block content
.about(data-background="#b2b8c3" data-color="#37384c")
.about__wrapper
section.about__gallery
.about__gallery__wrapper
each media in about.data.gallery
figure.about__gallery__media
img.about__gallery__media__image(data-src=media.image.url alt=media.image.alt)
each section in about.data.body
if section.slice_type == 'title'
h2.about__title(data-animation="title")!=section.primary.text.replace(/\n/g, '<br>')
if section.slice_type == 'content'
section.about__content(class=`${section.primary.type === 'Left' ? 'about__content--left' : 'about__content--right' }`)
.about__content__wrapper
.about__content__box
p.about__content__label(data-animation="label")!=section.primary.label
.about__content__description!=PrismicH.RichText.asHtml(section.primary.description).replace(/<p>/g, '<p data-animation="paragraph">')
figure.about__content__media
img.about__content__media__image(data-src=section.primary.image.url alt=section.primary.image.alt)
if section.slice_type == 'highlight'
section.about__highlight
.about__highlight__wrapper
if section.primary.label
p.about__highlight__label(data-animation="label")=section.primary.label
h3.about__highlight__title(data-animation='highlight')=section.primary.title
each media in section.items
figure.about__highlight__media
img.about__highlight__media__image(data-src=media.image.url alt=media.image.alt)
if section.slice_type == 'gallery'
section.about__gallery
.about__gallery__wrapper
each media in section.items
figure.about__gallery__media
img.about__gallery__media__image(data-src=media.image.url alt=media.image.alt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment