mirror of
https://github.com/ArthurDanjou/artdanj-fallback.git
synced 2026-01-22 07:51:29 +01:00
Initial commit
This commit is contained in:
14
src/App.vue
Normal file
14
src/App.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const title = useTitle()
|
||||
title.value = t('title')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="h-full w-full flex items-center justify-center">
|
||||
<router-view />
|
||||
</main>
|
||||
</template>
|
||||
2
src/composables/dark.ts
Normal file
2
src/composables/dark.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const isDark = useDark()
|
||||
export const toggleDark = useToggle(isDark)
|
||||
1
src/composables/index.ts
Normal file
1
src/composables/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './dark'
|
||||
34
src/main.ts
Normal file
34
src/main.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import { createI18n } from 'vue-i18n'
|
||||
import routes from 'virtual:generated-pages'
|
||||
import App from './App.vue'
|
||||
|
||||
import './styles/main.css'
|
||||
import 'virtual:windi.css'
|
||||
|
||||
const app = createApp(App)
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes,
|
||||
})
|
||||
app.use(router)
|
||||
|
||||
const messages = Object.fromEntries(
|
||||
Object.entries(
|
||||
import.meta.globEager('../locales/*.json'))
|
||||
.map(([key, value]) => {
|
||||
return [key.slice(11, -5), value.default]
|
||||
}),
|
||||
)
|
||||
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
locale: 'en',
|
||||
messages,
|
||||
fallbackLocale: 'en',
|
||||
})
|
||||
|
||||
app.use(i18n)
|
||||
|
||||
app.mount('#app')
|
||||
22
src/pages/index.vue
Normal file
22
src/pages/index.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const title = useTitle()
|
||||
title.value = t('error')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="w-2/3 text-justify">
|
||||
<h1 class="text-5xl font-black">
|
||||
{{ t('error_reason') }}
|
||||
</h1>
|
||||
<h3 class="text-3xl my-4">
|
||||
{{ t('error_description') }}
|
||||
</h3>
|
||||
<p class="text-xl text-gray-300">
|
||||
{{ t('team') }}
|
||||
</p>
|
||||
</section>
|
||||
</template>
|
||||
22
src/pages/maintenance.vue
Normal file
22
src/pages/maintenance.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const title = useTitle()
|
||||
title.value = t('maintenance')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="w-2/3 text-justify">
|
||||
<h1 class="text-5xl font-black">
|
||||
{{ t('maintenance_reason') }}
|
||||
</h1>
|
||||
<h3 class="text-3xl my-4">
|
||||
{{ t('maintenance_description') }}
|
||||
</h3>
|
||||
<p class="text-xl text-gray-300">
|
||||
{{ t('team') }}
|
||||
</p>
|
||||
</section>
|
||||
</template>
|
||||
14
src/styles/main.css
Executable file
14
src/styles/main.css
Executable file
@@ -0,0 +1,14 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&display=swap');
|
||||
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
background: #121212;
|
||||
}
|
||||
Reference in New Issue
Block a user