<template>
  <div class="quiz-menu">
    <div
      v-if="!isMobile"
      class="pc-wrapper"
    >
      <button @click="$router.push({name: 'Login'})">
        <div class="text-wrapper">
          请先登录再答题
        </div>
      </button>
      <button @click="onClickRuleDesc">
        <div class="text-wrapper">
          规则说明
        </div>
      </button>
    </div>
    <div
      v-if="isMobile"
      class="mobile-wrapper"
    >
      <button>
        <img
          class=""
          src="@/assets/images/login.png"
          alt=""
          draggable="false"
        >
      </button>
      <button>
        <img
          class=""
          src="@/assets/images/rule-desc.png"
          alt=""
          draggable="false"
        >
      </button>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    onClickRuleDesc() {
      this.$router.push({ name: 'RuleDesc' })
    }
  }
}
</script>

<style lang="less" scoped>
.quiz-menu {
  > .pc-wrapper {
    position: fixed;
    top: 200px;
    right: 45px;
    width: 166px;
    height: 162px;
    background-image: url(@/assets/images/quiz-menu-bg-visitor-pc.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    padding-top: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    > button {
      background-image: url(@/assets/images/button-border-small.png);
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center center;
      width: 119px;
      height: 33px;
      padding: 3px;
      &:first-of-type {
        margin-bottom: 10px;
        > .text-wrapper {
          height: 100%;
          width: 100%;
          background: rgba(154, 45, 10, 0.8);
          display: flex;
          justify-content: center;
          align-items: center;
          font-size: 16px;
          font-family: LiSu-Regular, LiSu;
          color: #FFFFFF;
        }
      }
      &:last-of-type {
        > .text-wrapper {
          height: 100%;
          width: 100%;
          background: rgba(143, 72, 49, 0.8);
          display: flex;
          justify-content: center;
          align-items: center;
          font-size: 16px;
          font-family: LiSu-Regular, LiSu;
          color: #FFFFFF;
        }
      }
    }
  }
  > .mobile-wrapper {
    position: fixed;
    top: 126px;
    right: 15px;
    display: flex;
    flex-direction: column;
    > button {
      margin-bottom: 11px;
      width: 40px;
      height: 40px;
      > img {
        width: 100%;
        height: 100%;
      }
    }
  }
}
</style>