<script setup>
import { useData } from 'vitepress'
import {t, routerPath} from '../locale'

const { site,theme,lang } = useData()
</script>

<template>
  <div class="NotFound">
    <p class="code">404</p>
    <h1 class="title">{{ t(lang, 'nofound.nopage') }}</h1>
    <div class="divider" />
    <p class="message">
      {{ t(lang, 'nofound.follow1') }} <span class="text-primary font-bold">ISLENOTE岛屿笔记</span> {{ t(lang, 'nofound.follow2') }}
    </p>
    <div class="action">
      <a class="link" :href="routerPath(lang, site.base)" aria-label="go to home">
        {{ t(lang, 'nofound.gohome') }}
      </a>
    </div>
  </div>
</template>

<style scoped>
.message{
  margin: 10px auto;
  width:300px;
  text-align: center;
}
.NotFound {
  padding: 64px 24px 96px;
  text-align: center;
}
@media (min-width: 768px) {
  .NotFound {
    padding: 96px 32px 168px;
  }
}
.code {
  line-height: 64px;
  font-size: 64px;
  font-weight: 600;
}

.title {
  padding-top: 12px;
  letter-spacing: 2px;
  line-height: 20px;
  font-size: 20px;
  font-weight: 700;
}
.divider {
  margin: 24px auto 18px;
  width: 64px;
  height: 1px;
  background-color: var(--vp-c-divider)
}
.action {
  padding-top: 20px;
}
.link {
  display: inline-block;
  border: 1px solid var(--vp-c-brand);
  border-radius: 16px;
  padding: 3px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vp-c-brand);
  transition: border-color 0.25s, color .25s;
}
.link:hover {
  border-color: var(--vp-c-brand-dark);
  color: var(--vp-c-brand-dark);
}
</style>