<template>
  <div class="nav" id="navbar">
    <div class="container">
      <div class="logo-container">
        <img src="@/assets/imgs/home/logo.png" />
      </div>
      <div class="right">
        <div class="tabs">
          <div class="tab-item" v-for="(item, index) in pages" :key="index">
            <a>{{ item.name }} </a>
          </div>
        </div>
        <div class="tools">
          <div class="wrapper">
            <el-button round>
              <i class="el-icon-user"></i>
              <i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "NavBar",
  data() {
    return {
      pages: [
        {
          name: "首页",
          path: "/",
        },
        {
          name: "精品展",
          path: "/boutique",
        },
        {
          name: "虚拟展厅",
          path: "/virtual",
        },
        {
          name: "展览",
          path: "/display",
        },
        {
          name: "文物展",
          path: "/culturalRelic",
        },
        {
          name: "博物馆",
          path: "/museum",
        },
      ],
    };
  },

};
</script>

<style lang="scss" scoped>
.tab-item {
  a {
    color: #fff;
    text-decoration: none;
  }
}

.home-nav {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  background-color: rgba(#000, 0.25) !important;
}
.header-fixed {
  position: fixed !important;
  background-color: #2069c4 !important;
  z-index: 99;
  top: 0;
}

.nav {
  height: 100px;
  width: 100%;
  transition: all 0.5s ease;
  background-color: #2069c4;
  box-shadow: rgba(0, 0, 0, 0.3) 0 1px 5px 0px;
  .container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 70px 0 100px;
    overflow: hidden;
    .logo-container {
      width: 380px;
      height: 74px;
    }
    .right {
      display: flex;
      height: 100%;
      align-items: center;

      .tabs {
        display: flex;
        margin-right: 80px;
        min-width: 512px;
        height: 100%;
        .tab-item {
          margin-right: 70px;
          color: #fff;
          display: flex;
          align-items: center;
          font-family: "Alibaba-PuHuiTi";
          position: relative;
          height: 100%;
          text-align: center;

          a {
            font-size: 18px;
            white-space: nowrap;
            transition: all 0.5s ease;
          }

          &:hover {
            a {
              // color: #182f68;
              color: #fff8a3;
              text-shadow: 0 1px 2px #9fafcb, 1px 0px 2px #9fafcb;
            }
          }
          .router-link-exact-active {
            // color: #182f68;
            color: #fff8a3;
            text-shadow: 0 1px 2px #9fafcb, 1px 0px 2px #9fafcb;
          }
        }
      }
    }
  }
}
::v-deep .tools {
  .el-button {
    background: transparent;
    border-color: #fff;
    color: #fff;
    i {
      font-size: 16px;
    }
  }
}
</style>
