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)
|
||||
// vue-router does not incorporate scroll-margin-top on its own.
|
||||
if (el) {
|
||||
|
||||
@@ -8,12 +8,24 @@ function getColor() {
|
||||
</script>
|
||||
|
||||
<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">
|
||||
<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="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
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, useRuntimeConfig } from '#imports'
|
||||
import {computed, useRuntimeConfig} from '#imports'
|
||||
|
||||
const props = defineProps<{ id?: string }>()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { navs } from '~~/types'
|
||||
import {navs} from '~~/types'
|
||||
|
||||
const isOpenSidebar = ref(false)
|
||||
const isOpenModal = ref(false)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { otherTab } from '~~/types'
|
||||
import {otherTab} from '~~/types'
|
||||
|
||||
const route = useRoute()
|
||||
const isOpenModal = ref(false)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import {useColorStore} from '~/store/color'
|
||||
import {ColorsTheme} from '~~/types'
|
||||
import { useColorStore } from '~/store/color'
|
||||
import { ColorsTheme } from '~~/types'
|
||||
|
||||
const colors = Object.values(ColorsTheme)
|
||||
|
||||
|
||||
14
error.vue
14
error.vue
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { NuxtError } from 'nuxt/app'
|
||||
import type {NuxtError} from 'nuxt/app'
|
||||
|
||||
defineProps({
|
||||
error: Object as () => NuxtError,
|
||||
@@ -21,7 +21,10 @@ const getColor = computed(() => appConfig.ui.primary)
|
||||
<Header />
|
||||
<UContainer>
|
||||
<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 }}
|
||||
</h1>
|
||||
<p class="text-lg md:text-2xl text-subtitle text-center">
|
||||
@@ -34,7 +37,12 @@ const getColor = computed(() => appConfig.ui.primary)
|
||||
</p>
|
||||
</div>
|
||||
<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
|
||||
</UButton>
|
||||
</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: {
|
||||
'node/prefer-global/process': 'off',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { SpeedInsights } from '@vercel/speed-insights/nuxt'
|
||||
import {SpeedInsights} from '@vercel/speed-insights/nuxt'
|
||||
|
||||
const router = useRouter()
|
||||
router.afterEach((route) => {
|
||||
|
||||
@@ -16,6 +16,7 @@ export default defineNuxtConfig({
|
||||
'@pinia-plugin-persistedstate/nuxt',
|
||||
'@vueuse/nuxt',
|
||||
'@nuxt/ui',
|
||||
'@nuxt/eslint',
|
||||
],
|
||||
|
||||
colorMode: {
|
||||
@@ -38,6 +39,16 @@ export default defineNuxtConfig({
|
||||
},
|
||||
},
|
||||
|
||||
eslint: {
|
||||
config: {
|
||||
stylistic: {
|
||||
indent: 'tab',
|
||||
semi: false,
|
||||
blockSpacing: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
ui: {
|
||||
icons: 'all',
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"@pinia/nuxt": "0.5.1",
|
||||
"@vercel/analytics": "1.2.2",
|
||||
"@vercel/speed-insights": "1.0.10",
|
||||
"drizzle-kit": "0.20.14",
|
||||
"drizzle-kit": "0.20.16",
|
||||
"drizzle-orm": "0.30.8",
|
||||
"nuxt": "3.10.3",
|
||||
"nuxt-auth-utils": "0.0.20",
|
||||
@@ -32,8 +32,8 @@
|
||||
"zod": "3.22.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "2.15.0",
|
||||
"@iconify/json": "2.2.202",
|
||||
"@nuxt/eslint": "0.3.8",
|
||||
"@nuxthq/studio": "1.0.13",
|
||||
"@nuxtjs/seo": "2.0.0-rc.10",
|
||||
"@pinia-plugin-persistedstate/nuxt": "1.2.0",
|
||||
@@ -41,6 +41,7 @@
|
||||
"@vueuse/core": "10.9.0",
|
||||
"@vueuse/nuxt": "10.9.0",
|
||||
"eslint": "9.1.0",
|
||||
"typescript": "5.4.5"
|
||||
"typescript": "5.4.5",
|
||||
"vite-plugin-eslint2": "^4.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import {useTalentsStore} from '~/store/talents'
|
||||
import {providers} from '~~/types'
|
||||
import { useTalentsStore } from '~/store/talents'
|
||||
import { providers } from '~~/types'
|
||||
|
||||
useHead({
|
||||
title: 'Discover new talents • Arthur Danjou',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {z} from 'zod'
|
||||
import { z } from 'zod'
|
||||
|
||||
const PostSchema = z.object({ slug: z.string() }).parse
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import {defineStore} from 'pinia'
|
||||
|
||||
export const useBookmarksStore = defineStore(
|
||||
'bookmarks',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ColorsTheme } from '~~/types'
|
||||
import {defineStore} from 'pinia'
|
||||
import {ColorsTheme} from '~~/types'
|
||||
|
||||
export const useColorStore = defineStore(
|
||||
'color',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import {defineStore} from 'pinia'
|
||||
|
||||
export const useTalentsStore = defineStore(
|
||||
'talents',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Config } from 'tailwindcss'
|
||||
import { ColorsTheme } from './types'
|
||||
import type {Config} from 'tailwindcss'
|
||||
import {ColorsTheme} from './types'
|
||||
|
||||
export default {
|
||||
content: [
|
||||
|
||||
2
types.ts
2
types.ts
@@ -1,4 +1,4 @@
|
||||
import type {MarkdownParsedContent, ParsedContent} from '@nuxt/content/dist/runtime/types'
|
||||
import type { MarkdownParsedContent, ParsedContent } from '@nuxt/content/dist/runtime/types'
|
||||
|
||||
export enum ColorsTheme {
|
||||
RED = 'red',
|
||||
|
||||
Reference in New Issue
Block a user