---
import Layout from '@/layouts/Layout.astro'
---

<Layout title="首页">
  <div style="width: 100px; height: 100px; margin: auto; padding-top: 100px;">
    <div class="spinner-border text-light" role="status">
      <span class="visually-hidden">Loading...</span>
    </div>
  </div>
</Layout>

<script>
  let lang = window.localStorage.getItem('lang')
  if (!lang) {
    lang = window.navigator.language.toLocaleLowerCase().includes('zh')
      ? 'zh'
      : 'en'
    window.localStorage.setItem('lang', lang);
  }

  window.location.replace(`${window.location.origin}/${lang}/`)
</script>
