Page Header Homepage

<h1 class="u-sr-only">Home</h1>

<div class="c-page-header-home" data-bkg-theme="base">
    <div class="o-container">
        <a href="#" class="c-page-header-home__header">
            <div class="c-page-header-home__title-wrapper u-hover-large-arrow">
                <h2 class="c-page-header-home__title f-title--h3 js-watch u-watch--fade-blur">Gideon Mendel: Drowning world</h2>
                <span class="c-page-header-home__icon js-watch u-watch--fade-blur u-watch--delay-3" aria-hidden="true">
                    <span class="c-page-header-home__icon-inner">
                        <svg width="104" height="34" viewBox="0 0 104 34" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path class="u-ct-stroke u-large-arrow" d="M0 16.9204H73M73 16.9204L57 1M73 16.9204L57 32.8404" stroke="black" stroke-width="1.5" />

                        </svg>

                    </span>
                </span>
            </div>
            <div class="c-page-header-home__meta  js-watch u-watch--fade-up u-watch--delay-5">

                <p class="c-page-header-home__meta-title f-bold">Exhibit</p>

                <p class="c-page-header-home__meta-text">Opening Month DD, YYYY </p>

            </div>

        </a>
    </div>

    <div class="c-page-header-home__image js-watch">
        <image src="/images/sample/sample-homepage.jpeg" alt="Mountains from above" />
        <div class="c-page-header-home__image-screen c-page-header-home__image-screen--left">
            <div class="c-page-header-home__image-screen-inner"></div>
        </div>
        <div class="c-page-header-home__image-screen c-page-header-home__image-screen--right">
            <div class="c-page-header-home__image-screen-inner"></div>
        </div>
    </div>

    <div class="c-page-header-home__cta is-fixed">
        <div class="c-page-header-home__cta-inner">
            <p class="c-page-header-home__cta-content">The Academy is open today 10 a.m.–5 p.m.</p>
            <a href="#" class="c-page-header-home__cta-link o-btn o-btn--primary--ocean">Plan your visit</a>
        </div>
    </div>

</div>
{% set pageTitle = pageTitle is defined ? pageTitle : 'Home' %}

<h1 class="u-sr-only">{{ pageTitle }}</h1>

<div class="c-page-header-home" data-bkg-theme="base">
  <div class="o-container">
    <a href="{{ link }}" class="c-page-header-home__header">
      <div class="c-page-header-home__title-wrapper u-hover-large-arrow">
        <h2 class="c-page-header-home__title f-title--h3 js-watch u-watch--fade-blur">{{ title }}</h2>
        <span class="c-page-header-home__icon js-watch u-watch--fade-blur u-watch--delay-3" aria-hidden="true">
          <span class="c-page-header-home__icon-inner">
            {% include "03-icons/arrow-large" %}
          </span>
        </span>
      </div>
      <div class="c-page-header-home__meta  js-watch u-watch--fade-up u-watch--delay-5">
        {% if tag %}
          <p class="c-page-header-home__meta-title f-bold">{{ tag }}</p>
        {% endif %}
        {% if status %}
          <p class="c-page-header-home__meta-text">{{ status }}</p>
        {% endif %}
      </div>

    </a>
  </div>

  <div class="c-page-header-home__image js-watch">
    {{ image|raw }}
    <div class="c-page-header-home__image-screen c-page-header-home__image-screen--left">
      <div class="c-page-header-home__image-screen-inner"></div>
    </div>
    <div class="c-page-header-home__image-screen c-page-header-home__image-screen--right">
      <div class="c-page-header-home__image-screen-inner"></div>
    </div>
  </div>

  {% if ctaContent or ctaLinkText %}

  <div class="c-page-header-home__cta is-fixed">
    <div class="c-page-header-home__cta-inner">
      <p class="c-page-header-home__cta-content">{{ ctaContent }}</p>
      <a href="{{ ctaLink }}" class="c-page-header-home__cta-link o-btn o-btn--primary--ocean">{{ ctaLinkText }}</a>
    </div>
  </div>
  {% endif %}


</div>
{
  "pageColorTheme": "teal",
  "title": "Gideon Mendel: Drowning world",
  "tag": "Exhibit",
  "status": "Opening Month DD, YYYY ",
  "image": "<image src=\"/images/sample/sample-homepage.jpeg\" alt=\"Mountains from above\" />",
  "link": "#",
  "ctaContent": "The Academy is open today 10 a.m.–5 p.m.",
  "ctaLinkText": "Plan your visit",
  "ctaLink": "#"
}
  • Content:
    .c-page-header-home {
      margin-bottom: 5.4rem;
      position: relative;
      overflow: hidden;
    
      @include break($sm) {
        margin: 7.4rem 0 3.8rem;
      }
    }
    .c-page-header-home .o-container {
      @include break($md) {
        margin: 0;
      }
    }
    .c-page-header-home__header {
      display: block;
      margin-bottom: 3.6rem;
    }
    
    .c-page-header-home__title-wrapper {
      margin-bottom: 2.4rem;
    
      @include break($sm) {
        display: flex;
      }
    }
    
    .c-page-header-home__icon {
      display: none;
    
      @include break($sm) {
        display: inline-flex;
        margin-left: 3.2rem;
        padding-top: 1.6rem;
      }
    
      svg {
        display: block;
      }
    }
    
    .c-page-header-home__icon-inner {
      transition: transform 0.3s $ease-reverse-cubic;
    }
    
    .c-page-header-home__meta {
      display: flex;
    
      p {
        font-size: 1.2rem;
        line-height: 1.15;
        text-transform: uppercase;
    
        @include break($sm) {
          font-size: 1.4rem;
        }
      }
    }
    
    .c-page-header-home__meta-title {
      margin-right: 2.4rem;
    }
    
    $phhTiming: 1.5s;
    $phhDelay: 0.3s;
    
    .c-page-header-home__image {
      overflow: hidden;
      position: relative;
    
      body:not(.is-experience-editor) & {
        opacity: 0;
        transform: scale(0.8);
        backface-visibility: hidden;
        transition: $phhTiming $ease-reverse-cubic $phhDelay;
        transition-property: opacity, transform;
    
        img {
          transform: scale(1.4);
          transition: transform $phhTiming $ease-reverse-cubic $phhDelay;
        }
    
        &.is-in-view {
          opacity: 1;
          transform: scale(1);
    
          img {
            transform: scale(1);
          }
        }
      }
    }
    
    .c-page-header-home__image-screen {
      display: none;
    
      @include break($sm) {
        width: 8rem;
        position: absolute;
        top: 0;
        height: 100%;
    
        body:not(.is-experience-editor) & {
          transform: scale(1.5);
          transition: $phhTiming $ease-reverse-cubic $phhDelay;
    
          .is-in-view & {
            transform: scale(1);
          }
        }
    
        &--left {
          &,
          .c-page-header-home__image-screen-inner {
            left: 0;
          }
        }
    
        &--right {
          &,
          .c-page-header-home__image-screen-inner {
            right: 0;
          }
        }
      }
    }
    
    .c-page-header-home__image-screen-inner {
      width: 100%;
      position: absolute;
      top: 0;
      height: 100%;
      background-color: var(--ct-bkg);
      transition: background $colorThemeTime $colorThemeEase;
      will-change: width;
    }
    
    
    .c-page-header-home__cta {
    
      @include break($sm) {
        position: absolute;
        bottom: 0;
        right: 0;
        padding-right: 8rem;
        opacity: 0;
        transition: opacity 0.3s $ease-reverse-cubic 1s;
    
        &.show {
          opacity: 1;
        }
    
        &.is-fixed {
          position: fixed;
        }
      }
    }
    
    .c-page-header-home__cta-inner {
      display: flex;
      flex-direction: column;
      align-items: center;
      background-color: var(--ct-bkg);
      padding: 3.2rem 2.4rem 0;
      position: relative;
    
      @include break($sm) {
        flex-direction: row;
        padding: 4rem 3.6rem 4rem 3.6rem;
      }
    
      &:after {
        content: '';
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 100%;
        width: 999rem;
        background-color: var(--ct-bkg);
      }
    }
    
    .c-page-header-home__cta-content {
      font-size: 1.2rem;
      font-family: $f-serif;
      line-height: 1.7;
      margin-bottom: 1.6rem;
    
      @include break($sm) {
        font-size: 1.3rem;
        max-width: 17.5rem;
        margin-right: 4.4rem;
      }
    }
    
  • URL: /components/raw/page-header-homepage/page-header-homepage.scss
  • Filesystem Path: patterns\06-components\page-header-homepage\page-header-homepage.scss
  • Size: 3.5 KB

No notes defined.