<template>
  <div class="login-container">
    <el-row :gutter="20" class="top">
      <el-col :span="6" :offset="1">
        <div style="display: flex; flex-direction: row; align-items: center">
          <a href="/">
            <div v-if="siteData.frontLogo">
              <img :src="siteData.frontLogo" />
            </div>
            <div
              v-else
              style="
                font-weight: 700;
                font-size: 26px;
                color: #eee;
                flex-grow: 1;
                text-align: left;
                padding-left: 10px;
              "
            >
              {{ siteData.siteName }}
            </div>
          </a>
        </div>
      </el-col>

      <el-col :span="12" style="line-height: 60px; text-align: right" />
    </el-row>

    <el-row :gutter="20" class="content">
      <el-col :span="18" :offset="3">
        <app-main />
      </el-col>
      <!-- <div class="loginImgBox">
        <img src="@/assets/web/images/login3.png" />
      </div> -->
    </el-row>

    <el-row :gutter="20" class="footer">
      <!-- <el-col :span="18" :offset="3">
        <div v-html="siteData.copyRight" />
      </el-col> -->
      <div class="flex">
        <div v-html="siteData.copyRight" />
      </div>
    </el-row>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import AppMain from "@/layout/components/AppMain";

export default {
  name: "LoginLayout",
  components: { AppMain },

  data() {
    return {
      activeIndex: "",
    };
  },
  computed: {
    ...mapGetters(["siteData"]),
  },
  methods: {
    isActive(url) {
      if (this.activeIndex === url) {
        return "nav active";
      }
      return "nav";
    },
  },
};
</script>

<style scoped>
@import "~@/styles/login.css";

::v-deep .app-main {
  min-height: 84vh;
  width: 100%;
}

.header-bg {
  height: 60px;
  background: #4377fb;
}

.right-user {
  display: flex;
  justify-content: flex-end;
  flex-direction: row;
  line-height: 60px;
  align-items: center;
}

.right-user :nth-child(1),
.right-user :nth-child(2) {
  margin-right: 10px;
}

.right-user a {
  color: #efefef;
  font-size: 14px;
  font-weight: 500;
}

.right-user a:first-child {
  margin-right: 10px;
}

.right-user a:hover {
  color: #ffd550;
}

.nav {
  color: #333;
  border: none;
  background: transparent;
  font-weight: 500;
  font-size: 14px;
  padding: 5px 10px 5px 10px;
  margin-right: 20px;
  background: #fff;
}

.active {
  color: #000055;
  background: #ffd550;
}

.nav:hover {
  color: #000055;
  background: #ffd550;
}

.col-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 60px;
}

/deep/ .top-avatar {
  text-align: right;
  display: flex;
  align-items: center;
  margin-right: 5px !important;
}

/deep/ .top-avatar div {
  display: flex;
  align-items: center;
  margin-right: -10px !important;
}

/deep/ .top-avatar img {
  width: 30px;
  height: 30px;
  border-radius: 15px;
}

.footer .flex {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>


<style lang="scss" scoped>
.loginImgBox {
  position: absolute;
  height: 100%;
  width: 100%;

  img {
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
  }
}
</style>
