<a class="match-tile match-tile--small" target="_blank" href="/">
    <div class="match-tile__image-bg">
        <img src="/assets/example-content/match-hub-hero.png" />
    </div>
    <div class="match-tile__text">stadium guide</div>
</a>

No notes defined.

{
  "thumbnail": "/assets/example-content/match-hub-hero.png",
  "href": "/",
  "text": "stadium guide",
  "modifier": "small"
}
  • Content:
    .match-tile {
      position: relative;
      display: flex;
      text-decoration: none;
      justify-content: center;
      border: 0.3rem solid transparent;
      border-radius: 0.4rem;
      overflow: hidden;
    
      &__image-bg {
        position: relative;
        width: 100%;
        border-radius: 0.4rem;
        transition: 0.2s all ease-in-out;
    
        img {
          object-fit: cover;
          width: 100%;
          height: 100%;
          border-radius: 0.4rem;
        }
    
        &::after {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          border-radius: 0.4rem;
          background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.6) 100%
          );
          transition: 0.2s all ease-in-out;
        }
      }
    
      &__text {
        position: absolute;
        color: $white;
        font-family: $ef-font;
        font-size: 2.8rem;
        font-weight: 700;
        font-style: italic;
        text-transform: uppercase;
        line-height: 2.6rem;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1;
        text-align: center;
      }
    
      &--big {
        .match-tile__image-bg {
          width: 34.3rem;
          height: 29.3rem;
        }
    
        .match-tile__text {
          max-width: 29.3rem;
          width: 100%;
          font-size: 2.8rem;
          line-height: 2.6rem;
          bottom: 3.2rem;
        }
      }
    
      &--small {
        flex-direction: column;
        align-self: flex-start;
    
        .match-tile__image-bg {
          width: 16.1rem;
          height: 12rem;
        }
    
        .match-tile__text {
          max-width: 16.1rem;
          width: 100%;
          font-size: 1.4rem;
          line-height: 2rem;
          position: static;
          margin-top: 1rem;
        }
      }
    
      @media screen and (min-width: 920px) {
        &--big {
          .match-tile__image-bg {
            width: 100%;
            height: 100%;
            max-width: 58.6rem;
            max-height: 58.6rem;
          }
    
          .match-tile__text {
            max-width: 45.3rem;
            font-size: 4rem;
            line-height: 4.6rem;
            margin: 0 6.6rem;
            bottom: 7.2rem;
          }
        }
    
        &--small {
          flex-direction: inherit;
          align-self: inherit;
    
          .match-tile__image-bg {
            width: 100%;
            height: 100%;
            max-width: 28rem;
            max-height: 27rem;
          }
    
          .match-tile__text {
            max-width: 23.2rem;
            font-size: 2.8rem;
            line-height: 3rem;
            bottom: 3.2rem;
            margin: 0 2.4rem;
            position: absolute;
            padding: 0 1rem;
          }
        }
      }
      &:hover {
        border: 0.3rem solid $white;
        border-radius: 0.4rem;
    
        .match-tile__text {
          text-decoration: underline;
        }
    
        .match-tile__image-bg {
          transform: scale(1.1);
          &::after {
            transform: scale(1.1);
          }
        }
      }
    }
    
  • URL: /components/raw/match-tile/match-tile.scss
  • Filesystem Path: src/library/components/match-tile/match-tile.scss
  • Size: 2.9 KB
<a class="match-tile match-tile--{{modifier}}" target="_blank" href="{{#if href}}{{href}}{{/if}}">
  <div class="match-tile__image-bg">
    <img src="{{thumbnail}}"/>
  </div>
  <div class="match-tile__text">{{text}}</div>
</a>