<template>
  <div class="menu">
    <div class="nav-left">
      <img class="logo" src="../../assets/img/logo-header.png" alt="logo" />
      <div class="text-title" @click="setStatus">选修课在线学习系统</div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    setStatus () {
      if (this.status) {
        this.status = false
      } else {
        this.status = true
      }
      this.$root.$emit('updateStatus', this.status)
    }
  }
}
</script>

<style scoped lang="scss">
.menu {
  width: 100%;
  height: 100%;
  color: #ffffff;
  .nav-left {
    float: left;
    position: relative;
    height: 100%;
    img.logo {
      position: absolute;
      top: 50%;
      height: 37%;
      width: auto;
      transform: translateY(-50%);
    }
    .text-title {
      float: left;
      margin-left: 190px;
      line-height: 60px;
      font-size: 16px;
    }
  }
}

@media (max-width: 767px) {
  .menu {
    .nav-left {
      img.logo {
        display: none;
      }
      .text-title {
        margin-left: 0;
      }
    }
  }
}
</style>
