<template>
  <a-layout class="layout">
    <a-layout-header class="layout-navbar">
      <Navbar />
    </a-layout-header>
    <a-layout class="layout-content">
        <router-view class="page"/>
        <Footer />
    </a-layout>
  </a-layout>
</template>

<script setup>
import PageLayout from './page-layout.vue'
import Navbar from '@/components/Navbar/index.vue'
import Footer from '@/components/Footer/index.vue'
</script>

<style scoped lang="less">
@nav-size-height: 60px;

.layout {
  width: 100%;
  height: 100%;
}

.layout-navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: @nav-size-height;
}

.layout-content {
  position: absolute;
  top: @nav-size-height;
  bottom: 0;
  width: 100%;
  height: calc(100% - @nav-size-height);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--color-fill-2);
}

.page {
  padding-bottom: 8px;
}

</style>
