<template>
  <div class="wrapper">
    <header class="header">
      <div class="inner">
        <div class="header-logo">
          <a :href="url"><img src="../assets/logo.png" /></a>
        </div>
        <language-switch />
      </div>
    </header>
    <section class="main">
      <div class="bg"></div>
      <div class="inner">
        <div class="main-hd hidden-xs-only">
          <img src="../assets/login_logo.png" class="login-logo" />
          <h1 class="login-title">{{ $t('main.title') }}</h1>
        </div>
        <div class="main-bd">
          <router-view></router-view>
        </div>
      </div>
    </section>
    <footer class="footer">
      <p class="t2">
        Copyright © 2020 Zijing Education. All rights reserved.
        <br />清控紫荆（北京）教育科技股份有限公司 京ICP证150431号 京公网安备 11010802023681号
      </p>
    </footer>
  </div>
</template>

<script>
import languageSwitch from '@/components/languageSwitch.vue'
export default {
  components: { languageSwitch },
  data() {
    return {
      url: import.meta.env.VITE_CIIS_URL
    }
  }
}
</script>

<style lang="scss" scoped>
.header {
  padding: 15px 20px;
  .inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}
.main {
  position: relative;
  .inner {
    position: relative;
    display: flex;
    max-width: 700px;
    margin: -200px auto 0;
    background-color: #fff;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.3);
  }
}
.bg {
  height: 360px;
  background: url(../assets/login_bg.png) no-repeat center center;
  background-size: cover;
}
.main-hd {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 260px;
  text-align: center;
  background-color: #bb133e;
  color: #fff;
}
.login-logo {
  margin-bottom: 30px;
}
.login-title {
  font-weight: normal;
  font-size: 20px;
  line-height: 28px;
  color: #fff;
  margin: 0;
}
.main-bd {
  flex: 1;
  padding: 40px;
}
.footer {
  padding: 20px 10px;
  text-align: center;
  .t1 {
    color: #535353;
  }
  .t2 {
    margin-top: 10px;
    color: #898989;
  }
}
@media (max-width: 768px) {
  .bg {
    height: 215px;
  }
  .main .inner {
    margin: -120px 20px 0;
  }
  .main-bd {
    padding: 20px;
  }
}
</style>
