<div class="wishlist">
    <h1 class="wishlist__title">Your Wishlist</h1>
    <div class="wishlist__actions--empty">
        <div class="wishlist__empty-brand-wrapper">
            <img class="wishlist__empty-brand" alt="Maui Jim logo" src="/assets/images/mauijim-brand-mark-grey.png" sizes="(min-width: 1025px) 166px, 83px" srcset="/assets/images/mauijim-brand-mark-grey-small.png 83w, /assets/images/mauijim-brand-mark-grey.png 166w">
        </div>
        <div class="wishlist__empty-message">Your Wishlist is empty</div>
        <button class="wishlist__start-shopping button button--primary">Start Shopping</button>
    </div>
</div>
<div class="wishlist">
  <h1 class="wishlist__title">{{title}}</h1>
  {{#if products}}
  <div class="wishlist__items">
    {{#each products}}
    <div class="wishlist__item">
      <a class="wishlist__item-link" href="#">
        <div class="wishlist__item-image-wrapper">
          <img class="wishlist__item-image" src="{{productImage variants.0.images.front 225}}">
        </div>
        <div class="wishlist__item-summary">
          {{#if ../rating}}{{render '@rating'}}{{/if}}
          <div class="wishlist__item-name">{{name}}</div>
          <div class="wishlist__item-info-wrapper">
            <span class="wishlist__item-info">{{variants.0.name}}</span>
            <span class="wishlist__item-info">{{variants.0.lens}}</span>
            <span class="wishlist__item-info">{{variants.0.lensMaterial}}</span>
          </div>
        </div>
      </a>
      <div class="wishlist__item-actions">
        {{#unless ../ excludePrice}}
        <div class="wishlist__item-price-wrapper">
          <span class="wishlist__item-price">{{variants.0.price}}</span>
          {{#if tax}}
          <span class="wishlist__item-tax">{{tax}}</span>
          {{/if}}
        </div>
        {{/unless}}
        {{#each ../controls}}
        <form class="wishlist__item-{{wrapper}}">
          {{render (dynamicVariant 'buttons' modifier) this}}
        </form>
        {{/each}}
      </div>
    </div>
    {{/each}}
  </div>
  <div class="wishlist__actions">
    <button class="wishlist__show-all button button--outlined">Show All (15)</button>
  </div>
  {{else}}
  <div class="wishlist__actions--empty">
    <div class="wishlist__empty-brand-wrapper">
      <img class="wishlist__empty-brand" alt="{{brandImage.alt}}" src="{{brandImage.large.src}}" sizes="(min-width: {{brandImage.breakpoint}}px) {{brandImage.large.width}}px, {{brandImage.small.width}}px" srcset="{{brandImage.small.src}} {{brandImage.small.width}}w, {{brandImage.large.src}} {{brandImage.large.width}}w">
    </div>
    <div class="wishlist__empty-message">{{message}}</div>
    <button class="wishlist__start-shopping button button--primary">Start Shopping</button>
  </div>
  {{/if}}
</div>
{
  "pageCss": [
    "account"
  ],
  "title": "Your Wishlist",
  "rating": true,
  "products": null,
  "controls": [
    {
      "wrapper": "add-to-cart",
      "modifier": "primary",
      "buttonValue": "Add to Cart"
    },
    {
      "wrapper": "remove",
      "modifier": "plain-text",
      "buttonValue": "Remove"
    }
  ],
  "brandImage": {
    "breakpoint": "1025",
    "alt": "Maui Jim logo",
    "small": {
      "src": "/assets/images/mauijim-brand-mark-grey-small.png",
      "width": "83"
    },
    "large": {
      "src": "/assets/images/mauijim-brand-mark-grey.png",
      "width": "166"
    }
  },
  "message": "Your Wishlist is empty"
}
  • Content:
    .wishlist__title {
      margin-top: 5px;
      padding-bottom: 5px;
      border-bottom: 1px solid $color-light;
      color: $color-dark;
      font-size: 1.6rem;
      font-weight: $font-weight-bold;
      letter-spacing: 1px;
      line-height: 1.9rem;
      text-shadow: none;
      text-transform: none;
    
      @include breakpoint($breakpoint-xl) {
        font-size: 2.4rem;
        line-height: 2.8rem;
      }
    }
    
    .wishlist__item {
      position: relative;
      padding: 40px 0 0;
      border-bottom: 1px solid $color-light;
    
      @include breakpoint($breakpoint-md) {
        padding: 10px 0 15px;
      }
    
      @include breakpoint($breakpoint-xl) {
        display: flex;
        position: relative;
        justify-content: flex-start;
        padding: 0;
      }
    }
    
    .wishlist__item-link {
      width: 100%;
      text-decoration: none;
    }
    
    .wishlist__item-summary {
      margin-bottom: 20px;
    
      @include breakpoint($breakpoint-xl) {
        margin: 5px 0 15px;
      }
    
      & > .rating {
        position: absolute;
        top: 20px;
        right: 0;
        left: 0;
    
        @include breakpoint($breakpoint-md) {
          top: 5px;
          left: 115px;
          text-align: left;
    
          .rating__star {
            margin: 0 3px;
    
            &:first-child {
              margin-left: 0;
            }
          }
    
          .rating__star .icon {
            width: 8px;
            height: 8px;
          }
        }
    
        @include breakpoint($breakpoint-xl) {
          top: 8px;
          left: 225px;
    
          .rating__star .icon {
            width: 15px;
            height: 15px;
          }
        }
      }
    }
    
    .wishlist__item-image-wrapper {
      @include breakpoint($breakpoint-md) {
        width: 115px;
        min-height: 40px;
        padding-top: 8px;
        float: left;
        text-align: center;
      }
    
      @include breakpoint($breakpoint-xl) {
        width: 225px;
        min-height: 100px;
        margin: 12px 0;
        padding-top: 20px;
      }
    }
    
    .wishlist__item-image {
      margin: 0 auto;
    
      @include breakpoint($breakpoint-md) {
        max-height: 40px;
      }
    
      @include breakpoint($breakpoint-xl) {
        max-height: 80px;
      }
    }
    
    .wishlist__item-name {
      margin-bottom: 10px;
      color: $color-darkest;
      font-size: 1.6rem;
      letter-spacing: 1px;
      line-height: 1.9rem;
    
      @include breakpoint($breakpoint-md) {
        width: calc(100% - 115px);
        margin-top: 15px;
        margin-left: 115px;
      }
    
      @include breakpoint($breakpoint-xl) {
        width: calc(100% - 610px);
        margin-top: 30px;
        margin-bottom: 5px;
        margin-left: 225px;
        font-size: 2.4rem;
        line-height: 2.8rem;
      }
    }
    
    .wishlist__item-info-wrapper {
      @include breakpoint($breakpoint-xl) {
        width: calc(100% - 610px);
        margin-left: 225px;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
      }
    }
    
    .wishlist__item-info {
      color: $color-darkest;
      font-size: 1.4rem;
      letter-spacing: 1px;
      line-height: 2.0rem;
    
      &:not(:last-child)::after {
        width: 1px;
        margin: 0 1em;
        border-right: 1px solid $color-darkest;
        content: '';
      }
    }
    
    .wishlist__item-actions {
      @include clearfix;
    
      @include breakpoint($breakpoint-md) {
        text-align: right;
      }
    
      @include breakpoint($breakpoint-xl) {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
      }
    }
    
    .wishlist__item-price-wrapper {
      @include breakpoint($breakpoint-md) {
        float: left;
      }
    }
    
    .wishlist__item-price {
      height: 30px;
      float: left;
      color: $color-medium-dark;
      font-size: 2.7rem;
      letter-spacing: 0;
      line-height: 30px;
    
      @include breakpoint($breakpoint-sm-only) {
        margin-bottom: 8px;
      }
    
      @include breakpoint($breakpoint-md) {
        float: left;
      }
    
      @include breakpoint($breakpoint-xl) {
        height: 50px;
        line-height: 50px;
      }
    }
    
    .wishlist__item-tax {
      color: $color-medium-dark;
      font-size: 1.2rem;
      line-height: 2.0rem;
    
      @include breakpoint($breakpoint-sm-only) {
        margin-top: 10px;
        float: right;
      }
    
      @include breakpoint($breakpoint-md) {
        margin-top: -2px;
        float: right;
        clear: both;
      }
    
      @include breakpoint($breakpoint-xl) {
        margin-top: -12px;
        font-size: 1.4rem;
      }
    }
    
    .wishlist__item-add-to-cart,
    .wishlist__item-find-an-optician,
    .wishlist__item-remove {
      margin-bottom: 5px;
    
      .button {
        display: block;
      }
    
      @include breakpoint($breakpoint-sm-only) {
        .button {
          width: 100%;
          padding: 0;
        }
      }
    
      @include breakpoint($breakpoint-md) {
        display: inline-block;
        margin: 0;
    
        .button {
          height: 30px;
          line-height: 30px;
        }
      }
    
      @include breakpoint($breakpoint-xl) {
        .button {
          height: 50px;
          line-height: 50px;
        }
      }
    }
    
    .wishlist__item-add-to-cart,
    .wishlist__item-find-an-optician {
      @include breakpoint($breakpoint-md) {
        min-width: 150px;
        float: right;
    
        .button {
          width: 100%;
        }
      }
    }
    
    .wishlist__item-remove {
      .button {
        color: $color-error;
      }
    
      @include breakpoint($breakpoint-sm-only) {
        .button {
          height: 40px;
          line-height: 4.0rem;
        }
      }
    
      @include breakpoint($breakpoint-md) {
        .button {
          padding: 0 20px;
        }
      }
    }
    
    .wishlist__actions {
      padding: 20px 0 0;
      text-align: center;
    }
    
    .wishlist__actions--empty {
      margin: 0 auto;
      padding: 0 20px;
      text-align: center;
    
      @include breakpoint($breakpoint-md) {
        margin: 0;
        float: left;
      }
    
      @include breakpoint($breakpoint-xl) {
        margin-left: 20%;
      }
    }
    
    .wishlist__empty-brand-wrapper {
      height: 130px;
    
      @include breakpoint($breakpoint-md) {
        height: 110px;
      }
    
      @include breakpoint($breakpoint-xl) {
        height: 215px;
      }
    }
    
    .wishlist__empty-brand {
      max-width: 123px;
      margin: 0 auto;
    
      @include breakpoint($breakpoint-md) {
        max-width: 166px;
      }
    
      @include breakpoint($breakpoint-xl) {
        max-width: none;
      }
    }
    
    .wishlist__empty-message {
      margin: 35px 0;
    
      @include breakpoint($breakpoint-xl) {
        font-size: 2.4rem;
        line-height: 2.8rem;
      }
    }
    
  • URL: /components/raw/wishlist/wishlist.scss
  • Filesystem Path: src/components/02-components/wishlist/wishlist.scss
  • Size: 5.7 KB

There are no notes for this item.