mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 12:14:42 +01:00
@@ -1,6 +1,6 @@
|
|||||||
import type {RouterConfig} from '@nuxt/schema'
|
import type {RouterConfig} from '@nuxt/schema'
|
||||||
|
|
||||||
function findHashPosition(hash: any): { el: any, behavior: ScrollBehavior, top: number } | undefined {
|
function findHashPosition(hash: string): { el: string, behavior: ScrollBehavior, top: number } | undefined {
|
||||||
const el = document.querySelector(hash)
|
const el = document.querySelector(hash)
|
||||||
// vue-router does not incorporate scroll-margin-top on its own.
|
// vue-router does not incorporate scroll-margin-top on its own.
|
||||||
if (el) {
|
if (el) {
|
||||||
|
|||||||
@@ -8,12 +8,24 @@ function getColor() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="announce" class="w-container flex justify-center mt-8">
|
<div
|
||||||
|
v-if="announce"
|
||||||
|
class="w-container flex justify-center mt-8"
|
||||||
|
>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<h1 class="px-4 py-2 bg-white dark:bg-zinc-900 rounded-md border border-zinc-100 dark:border-zinc-300/10" v-html="announce.content" />
|
<h1
|
||||||
|
class="px-4 py-2 bg-white dark:bg-zinc-900 rounded-md border border-zinc-100 dark:border-zinc-300/10"
|
||||||
|
v-html="announce.content"
|
||||||
|
/>
|
||||||
<span class="absolute -top-0.5 -right-0.5 flex h-2 w-2">
|
<span class="absolute -top-0.5 -right-0.5 flex h-2 w-2">
|
||||||
<span class="animate-ping absolute inline-flex h-full w-full rounded-full opacity-75" :class="getColor()" />
|
<span
|
||||||
<span class="relative inline-flex rounded-full h-2 w-2" :class="getColor()" />
|
class="animate-ping absolute inline-flex h-full w-full rounded-full opacity-75"
|
||||||
|
:class="getColor()"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
class="relative inline-flex rounded-full h-2 w-2"
|
||||||
|
:class="getColor()"
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
12
error.vue
12
error.vue
@@ -21,7 +21,10 @@ const getColor = computed(() => appConfig.ui.primary)
|
|||||||
<Header />
|
<Header />
|
||||||
<UContainer>
|
<UContainer>
|
||||||
<div class="flex flex-col items-center gap-4 mt-12">
|
<div class="flex flex-col items-center gap-4 mt-12">
|
||||||
<h1 class="font-medium text-[8rem] md:text-[16rem] leading-none bg-error bg-clip-text tracking-wider font-error" :class="`text-${getColor}-500`">
|
<h1
|
||||||
|
class="font-medium text-[8rem] md:text-[16rem] leading-none bg-error bg-clip-text tracking-wider font-error"
|
||||||
|
:class="`text-${getColor}-500`"
|
||||||
|
>
|
||||||
{{ error?.statusCode }}
|
{{ error?.statusCode }}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-lg md:text-2xl text-subtitle text-center">
|
<p class="text-lg md:text-2xl text-subtitle text-center">
|
||||||
@@ -34,7 +37,12 @@ const getColor = computed(() => appConfig.ui.primary)
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-center mt-8 mb-12">
|
<div class="flex justify-center mt-8 mb-12">
|
||||||
<UButton to="/" size="md" variant="soft" color="primary">
|
<UButton
|
||||||
|
to="/"
|
||||||
|
size="md"
|
||||||
|
variant="soft"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
Go back to the main page
|
Go back to the main page
|
||||||
</UButton>
|
</UButton>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import antfu from '@antfu/eslint-config'
|
import withNuxt from './.nuxt/eslint.config.mjs'
|
||||||
|
|
||||||
export default antfu({
|
export default withNuxt({
|
||||||
rules: {
|
rules: {
|
||||||
'node/prefer-global/process': 'off',
|
'vue/multi-word-component-names': 'off',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export default defineNuxtConfig({
|
|||||||
'@pinia-plugin-persistedstate/nuxt',
|
'@pinia-plugin-persistedstate/nuxt',
|
||||||
'@vueuse/nuxt',
|
'@vueuse/nuxt',
|
||||||
'@nuxt/ui',
|
'@nuxt/ui',
|
||||||
|
'@nuxt/eslint',
|
||||||
],
|
],
|
||||||
|
|
||||||
colorMode: {
|
colorMode: {
|
||||||
@@ -38,6 +39,16 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
eslint: {
|
||||||
|
config: {
|
||||||
|
stylistic: {
|
||||||
|
indent: 'tab',
|
||||||
|
semi: false,
|
||||||
|
blockSpacing: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
ui: {
|
ui: {
|
||||||
icons: 'all',
|
icons: 'all',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"@pinia/nuxt": "0.5.1",
|
"@pinia/nuxt": "0.5.1",
|
||||||
"@vercel/analytics": "1.2.2",
|
"@vercel/analytics": "1.2.2",
|
||||||
"@vercel/speed-insights": "1.0.10",
|
"@vercel/speed-insights": "1.0.10",
|
||||||
"drizzle-kit": "0.20.14",
|
"drizzle-kit": "0.20.16",
|
||||||
"drizzle-orm": "0.30.8",
|
"drizzle-orm": "0.30.8",
|
||||||
"nuxt": "3.10.3",
|
"nuxt": "3.10.3",
|
||||||
"nuxt-auth-utils": "0.0.20",
|
"nuxt-auth-utils": "0.0.20",
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
"zod": "3.22.5"
|
"zod": "3.22.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "2.15.0",
|
|
||||||
"@iconify/json": "2.2.202",
|
"@iconify/json": "2.2.202",
|
||||||
|
"@nuxt/eslint": "0.3.8",
|
||||||
"@nuxthq/studio": "1.0.13",
|
"@nuxthq/studio": "1.0.13",
|
||||||
"@nuxtjs/seo": "2.0.0-rc.10",
|
"@nuxtjs/seo": "2.0.0-rc.10",
|
||||||
"@pinia-plugin-persistedstate/nuxt": "1.2.0",
|
"@pinia-plugin-persistedstate/nuxt": "1.2.0",
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
"@vueuse/core": "10.9.0",
|
"@vueuse/core": "10.9.0",
|
||||||
"@vueuse/nuxt": "10.9.0",
|
"@vueuse/nuxt": "10.9.0",
|
||||||
"eslint": "9.1.0",
|
"eslint": "9.1.0",
|
||||||
"typescript": "5.4.5"
|
"typescript": "5.4.5",
|
||||||
|
"vite-plugin-eslint2": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user