<template>
  <NuxtLayout>
    <v-app>
      <a id="top" />

      <div class="body">
        <header>
          <Topbar />
        </header>

        <NuxtPage />

        <BackToTheTop />

        <v-footer no-gutters :height="36">
        </v-footer>
      </div>
    </v-app>
  </NuxtLayout>
</template>

<script setup lang="ts">
const route = useRoute()

useHead(() => ({
  link: [
    {
      rel: 'canonical',
      href: 'https://olivier-massot.ogene.fr' + route.path,
    },
  ],
}))
</script>

<style lang="scss">
html {
  scroll-behavior: smooth;
}

.v-application {
  background: rgb(var(--v-theme-neutral));
  color: rgb(var(--v-theme-on-neutral));
  font-family: Inter, sans-serif;
}

.body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0 auto;
  max-width: 1400px;

  @media (max-width: 1280px) {
    margin: 0 10%;
  }

  @media (max-width: 600px) {
    margin: 0 3%;
  }
}

.topbar-container {
  padding: 32px 0;
  border-bottom: solid 1px rgba(var(--v-theme-on-neutral), 0.2);
  margin-bottom: 3rem;
  position: sticky;
  top: 0;
  background: rgb(var(--v-theme-neutral));
  z-index: 1000;
}

:deep(h2) {
  margin: 48px 0 24px 0;
  padding-bottom: 9px;
  border-bottom: solid 1px rgba(var(--v-theme-on-neutral), 0.2);

  @media (max-width: 600px) {
    margin: 24px 0;
  }
}

.v-footer {
  max-height: 36px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  border-top: rgb(var(--v-theme-neutral-strong));
  font-size: 12px;

  a {
    color: rgb(var(--v-theme-on-neutral));
  }

  span {
    margin: 0 24px;
  }
}

</style>