<a href="#" class="efl-carousel-card efl-carousel-card--video efl-carousel-card--trending">
    <img class="efl-carousel-card--image" src=/assets/example-content/image-singpost-1.png alt="">
    <div class="efl-carousel-card__content">
        <p class="efl-carousel-card__content--category">course</p>
        <h4 class="efl-carousel-card__content--title">BT Playmaker by England Football</h4>
    </div>
    <div class="efl-carousel-card--trending__number"><span>01</span></div>
</a>

No notes defined.

{
  "category": "course",
  "title": "BT Playmaker by England Football",
  "hasVideo": true,
  "image": "/assets/example-content/image-singpost-1.png",
  "number": "01"
}
  • Content:
    .efl-carousel-card {
      position: relative;
      flex-direction: column;
      width: 20rem !important;
      max-height: 24.9rem;
      min-height: 24.9rem;
      border-radius: 0.4rem;
      overflow: hidden;
      transition: box-shadow 0.3s ease-in-out;
      border: none;
      display: flex;
      margin-top: 3.2rem;
      margin-bottom: 3.9rem;
      background-color: $black;
      &:focus {
        outline: 3px solid $blue-accent3;
      }
    
      &--trending {
        &__number {
          display: flex;
          flex-direction: column;
          justify-content: flex-end;
          position: absolute;
          left: 0;
          bottom: 0;
          width: 100%;
          height: 11.7rem;
          font-family: $text-font-ef;
          font-size: 4.8rem;
          font-style: italic;
          font-weight: 700;
          line-height: 6.4rem;
          letter-spacing: 0;
          text-align: left;
          -webkit-text-fill-color: rgba(255, 255, 255, 0.1);
          -webkit-text-stroke-color: $white;
          -webkit-text-stroke-width: 0.2rem;
          & > span {
            position: relative;
            z-index: 3;
            padding-left: 2.3rem;
            padding-bottom: 0;
          }
          &::after {
            content: '';
            position: absolute;
            z-index: 2;
            width: 100%;
            height: 100%;
            background: linear-gradient(
              180deg,
              #1d1d1b 0%,
              rgba(29, 29, 27, 0) 100%
            );
            opacity: 0.8;
            transform: rotate(-180deg);
          }
        }
    
        &.efl-carousel-card--video {
          &::after {
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 1.7rem;
            height: 2.1rem;
          }
        }
      }
    
      &.large {
        min-width: 20rem !important;
        min-height: 26.9rem;
        flex-shrink: 0;
    
        @media screen and (min-width: 500px) {
          min-width: 29.3rem !important;
          max-height: 38rem;
        }
      }
    
      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: scale(1);
        transition: transform 0.3s ease-in-out;
        transition-delay: 0ms;
        margin-top: 4.5rem;
      }
    
      &::before {
        content: '';
        position: absolute;
        margin-top: 4.5rem;
        z-index: 1;
        width: 110%;
        height: 100%;
        background: linear-gradient(
          180deg,
          #1d1d1b 0%,
          rgba(29, 29, 27, 0) 36.32%,
          rgba(29, 29, 27, 0) 69.21%,
          #1d1d1b 100%
        );
        opacity: 1;
        transform: rotate(-180deg);
        transition: margin-top 0.3s ease-in-out;
        transition-delay: 100ms;
      }
    
      &:hover {
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
        img {
          transform: scale(1.1);
          transition-delay: 100ms;
        }
        &::before {
          margin-top: 3.4rem;
          transition-delay: 0ms;
        }
      }
    
      &__content {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        padding: 2.4rem;
        position: absolute;
        z-index: 2;
        top: 0;
        left: 0;
        text-decoration: none;
        white-space: break-spaces;
    
        &--category {
          font-family: $text-font-ef;
          text-transform: uppercase;
          color: $light-blue;
          font-size: 1.2rem;
          font-weight: 400;
          line-height: 1.2rem;
          letter-spacing: 0.08em;
    
          @include text-limit(1);
        }
    
        &--title {
          color: $white;
          font: $efl-heading-4;
          font-weight: 500;
    
          @include text-limit(2);
        }
      }
    
      &--video::after {
        position: absolute;
        content: '';
        display: block;
        z-index: 2;
        background-color: #e1261c;
        background-image: url('./assets/images/video-play.svg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: 1.2rem 1.4rem;
        padding: 1.6rem;
        bottom: 0;
        left: 0;
      }
    
      @media screen and (min-width: $mq-small) {
        width: 27.4rem !important;
        min-width: 27.4rem !important;
        min-height: 39rem;
        max-height: 39rem;
    
        &:hover {
          &::before {
            margin-top: 2.5rem;
          }
        }
    
        &--video::after {
          background-size: 1.7rem 2.1rem;
          padding: 2.8rem;
        }
    
        &--trending {
          &__number {
            > span {
              padding-bottom: 1.51rem;
              font-size: 8.4rem;
            }
          }
        }
      }
    }
    
    .latest-sessions {
      .efl-carousel-card {
        margin-top: 2.4rem;
        margin-bottom: 3.2rem;
      }
    }
    
  • URL: /components/raw/efl-carousel-card/efl-carousel-card.scss
  • Filesystem Path: src/library/components/efl-carousel-card/efl-carousel-card.scss
  • Size: 4.2 KB
<a href="#" class="efl-carousel-card {{#if hasVideo}}efl-carousel-card--video{{/if}} efl-carousel-card--trending">
  <img class="efl-carousel-card--image" src={{image}} alt="">
  <div class="efl-carousel-card__content">
    <p class="efl-carousel-card__content--category">{{category}}</p>
    <h4 class="efl-carousel-card__content--title">{{title}}</h4>
  </div>
  <div class="efl-carousel-card--trending__number"><span>{{number}}</span></div>
</a>