<template>
  <!--圖片 - 4x4-->
  <div class="q-mt-md">
    <section class="pr1 section-block">
      <div class="pr-banner-block">
        <ul class="pr-banner-list">
          <li v-for="(item,index) in plugData.Details" :key="index">
            <a @click="OpenNewUrl(item.LinkUrl)"  :title="item.TripTitle"
              :style="{backgroundImage:`url('${(item.TripImageUrl&&item.TripImageUrl!=''?item.TripImageUrl:item.ImageUrl)}')`}"></a>
          </li>
        </ul>
      </div>
      <div class="pr-text-block">
        <h2 class="block-title">{{plugData.Title}}</h2>
        <p class="title-teaser">{{plugData.SubTitle}}</p>
        <ul class="pr-text-list">
          <li v-for="(item,index) in plugData.Details" :key="index">
            <a @click="OpenNewUrl(item.LinkUrl)">
              <h3 class="pd-title">{{item.TripTitle}}</h3>
              <div class="price">
                <small class="unit">NT$</small>{{item.Price}}
                <small class="unit">元起</small>
              </div>
            </a>
          </li>
        </ul>
      </div>
    </section>
  </div>
</template>

<script>
  //圖片 - 4x4
  export default {
    props: ["plugData"]
  };

</script>

<style>
  .pr1 {
    padding: 20px 0;
    display: flex;
    flex-flow: row wrap;
  }

  .pr1 .pr-banner-block {
    flex: 1;
    flex-basis: 70%;
    margin-right: 30px;
  }

  .pr1 .pr-banner-block .pr-banner-list {
    font-size: 0;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .pr1 .pr-banner-block .pr-banner-list li:nth-child(odd) {
    margin-right: 20px;
  }

  .pr1 .pr-banner-block .pr-banner-list li:nth-child(-n + 2) {
    margin-bottom: 20px;
  }

  .pr1 .pr-banner-block .pr-banner-list li {
    display: inline-block;
    vertical-align: top;
    width: calc(50% - 10px);
  }

  .pr1 .pr-banner-block .pr-banner-list li a {
    border: 0;
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
    padding-bottom: 66.237%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: -webkit--webkit-transform 0.2s ease,
      -webkit--moz-transform 0.2s ease, -webkit--o-transform 0.2s ease,
      -webkit-transform 0.2s ease, -webkit-transform 0.2s ease,
      -moz-transform 0.2s ease, -o-transform 0.2s ease, transform 0.2s ease,
      box-shadow 0.2s ease;
  }

  .pr1 .pr-text-block {
    padding: 25px 30px;
    flex: 1;
    flex-basis: calc(30% - 30px);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.09);
    background-color: #fff;
    width: 100%;
  }

  .pr1 .block-title {
    font-size: 24px;
    font-weight: 600;
    line-height: unset;
    padding: 0;
    margin: 0;
  }

  .pr1 .title-teaser {
    margin: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #999;
    line-height: unset;
    padding: 0;
  }

  .pr1 .pr-text-list {
    border: 0;
    vertical-align: baseline;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .pr1 .pr-text-block .pr-text-list li {
    display: block;
    border-bottom: 1px solid #eee;
    margin: 0;
    padding: 0;
  }

  .pr1 .pr-text-block .pr-text-list li:last-child {
    border: none;
  }

  .pr1 .pr-text-block .pr-text-list a {
    padding: 10px 0;
    display: block;
    color: #333;
    font-size: 16px;
    cursor: pointer;
  }

  .pr1 .pr-text-block .pr-text-list a .pd-title {
    padding: 0;
    margin: 0;
    margin-bottom: 4px;
    font-weight: 400;
    line-height: unset;
    font-size: 1.17em;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .pr1 .pr-text-block .pr-text-list .price {
    text-align: right;
    color: #00afff;
    font-size: 20px;
    font-weight: 700;
    font-family: "oswald";
  }

  .pr1 .pr-text-block .pr-text-list .price .unit {
    font-size: 14px;
  }

  @media only screen and (max-width: 1200px) {
    .pr1 .pr-banner-block {
      flex-basis: 100% !important;
      margin-right: 0 !important;
      margin-bottom: 20px !important;
    }

    .pr1 .pr-text-block .pr-text-list a {
      display: flex !important;
      padding: 12px 0 !important;
    }

    .pr1 .pr-text-block .pr-text-list a .pd-title {
      width: calc(100% - 150px) !important;
      margin-bottom: 0 !important;
      white-space: nowrap !important;
      text-overflow: ellipsis !important;
      overflow: hidden !important;
      word-break: break-all !important;
    }

    .pr1 .pr-text-block .pr-text-list .price {
      width: 150px !important;
    }
  }

  @media only screen and (max-width: 768px) {
    .pr1 .pr-banner-block {
      margin-bottom: 10px !important;
    }

    .pr1 .pr-banner-block .pr-banner-list li {
      width: 100% !important;
      margin-right: 0 !important;
      margin-bottom: 20px !important;
    }
  }

</style>
