mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-02-02 20:27:48 +01:00
Working on home page
This commit is contained in:
24
app.vue
24
app.vue
@@ -1,24 +0,0 @@
|
|||||||
<template>
|
|
||||||
<UContainer>
|
|
||||||
<UCard class="mt-10">
|
|
||||||
<template #header>
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<h1>Welcome to Nuxt UI Starter</h1>
|
|
||||||
<ColorScheme>
|
|
||||||
<USelect
|
|
||||||
v-model="$colorMode.preference"
|
|
||||||
:options="['system', 'light', 'dark']"
|
|
||||||
/>
|
|
||||||
</ColorScheme>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<UButton
|
|
||||||
icon="i-heroicons-book-open"
|
|
||||||
to="https://ui.nuxt.com"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
Open Nuxt UI Documentation
|
|
||||||
</UButton>
|
|
||||||
</UCard>
|
|
||||||
</UContainer>
|
|
||||||
</template>
|
|
||||||
66
app/app.vue
66
app/app.vue
@@ -3,50 +3,38 @@ useHead({
|
|||||||
link: [{ rel: 'icon', type: 'image/png', href: '/favicon.ico' }],
|
link: [{ rel: 'icon', type: 'image/png', href: '/favicon.ico' }],
|
||||||
})
|
})
|
||||||
|
|
||||||
const head = useLocaleHead({
|
const date = ref<Date>(new Date())
|
||||||
addDirAttribute: true,
|
onMounted(() => {
|
||||||
identifierAttribute: 'id',
|
setInterval(() => date.value = new Date(), 1000)
|
||||||
addSeoAttributes: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const apps = await queryContent('/').find()
|
||||||
|
const nuxt = apps.filter(app => app._dir === 'nuxt')
|
||||||
|
const perso = apps.filter(app => app._dir === 'perso')
|
||||||
|
const maths = apps.filter(app => app._dir === 'maths')
|
||||||
|
const social = apps.filter(app => app._dir === 'social')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Html
|
<div>
|
||||||
:dir="head.htmlAttrs.dir"
|
<NuxtLoadingIndicator color="#808080" />
|
||||||
:lang="head.htmlAttrs.lang"
|
<UContainer class="my-8">
|
||||||
>
|
<div v-if="date" class="flex flex-col items-center">
|
||||||
<Head>
|
<h1 class="text-6xl font-bold">
|
||||||
<template
|
{{ useDateFormat(date, 'HH:mm') }}
|
||||||
v-for="link in head.link"
|
</h1>
|
||||||
:key="link.id"
|
<h1 class="text-2xl">
|
||||||
>
|
{{ useDateFormat(date, 'dddd D MMMM YYYY', { locales: () => 'fr-FR' }) }}
|
||||||
<Link
|
</h1>
|
||||||
:id="link.id"
|
|
||||||
:href="link.href"
|
|
||||||
:hreflang="link.hreflang"
|
|
||||||
:rel="link.rel"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template
|
|
||||||
v-for="meta in head.meta"
|
|
||||||
:key="meta.id"
|
|
||||||
>
|
|
||||||
<Meta
|
|
||||||
:id="meta.id"
|
|
||||||
:content="meta.content"
|
|
||||||
:property="meta.property"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</Head>
|
|
||||||
<Body>
|
|
||||||
<div>
|
|
||||||
<NuxtLoadingIndicator color="#808080" />
|
|
||||||
<UContainer>
|
|
||||||
<NuxtPage />
|
|
||||||
</UContainer>
|
|
||||||
</div>
|
</div>
|
||||||
</Body>
|
<div v-if="apps" class="space-y-12">
|
||||||
</Html>
|
<Application title="Personal" :apps="perso" />
|
||||||
|
<Application title="Social" :apps="social" />
|
||||||
|
<Application title="Nuxt" :apps="nuxt" />
|
||||||
|
<Application title="Mathematics" :apps="maths" />
|
||||||
|
</div>
|
||||||
|
</UContainer>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
45
app/components/Application.vue
Normal file
45
app/components/Application.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import type { AppType } from '~~/types/types'
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
title: string
|
||||||
|
apps: AppType[]
|
||||||
|
}>()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h1 class="font-bold text-xl mb-4">
|
||||||
|
{{ title }}
|
||||||
|
</h1>
|
||||||
|
<div v-if="apps" class="grid grid-cols-5 gap-4">
|
||||||
|
<ULink v-for="app in apps" :key="app.name" :to="app.url" target="_blank">
|
||||||
|
<UCard :ui="{ body: { base: 'space-y-4' } }">
|
||||||
|
<div v-if="app.nuxt" class="text-xl flex gap-1 items-center">
|
||||||
|
<UIcon :name="app.icon" />
|
||||||
|
<div class="flex">
|
||||||
|
<p>{{ app.name }}</p>
|
||||||
|
<p :class="`text-${app.color}-400 font-medium`">
|
||||||
|
{{ app.nuxt }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else class="text-xl flex gap-1 items-center" :class="`text-${app.color}-400 font-medium`">
|
||||||
|
<UIcon :name="app.icon" />
|
||||||
|
<p>{{ app.name }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex gap-1">
|
||||||
|
<UBadge
|
||||||
|
v-for="tag in app.tags"
|
||||||
|
:key="tag.name"
|
||||||
|
variant="soft"
|
||||||
|
:label="tag.name"
|
||||||
|
:color="tag.color"
|
||||||
|
:ui="{ rounded: 'rounded-full' }"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</UCard>
|
||||||
|
</ULink>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<h1>Home</h1>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
12
content/maths/geogebra.json
Normal file
12
content/maths/geogebra.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "GeoGebra Calculator",
|
||||||
|
"url": "https://www.geogebra.org/calculator",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "maths",
|
||||||
|
"color": "amber"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-icon-park-outline:geometric-flowers",
|
||||||
|
"color": "indigo"
|
||||||
|
}
|
||||||
12
content/maths/mathdf.json
Normal file
12
content/maths/mathdf.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "MathDF",
|
||||||
|
"url": "https://mathdf.com/fr/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "maths",
|
||||||
|
"color": "amber"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:math-operations-duotone",
|
||||||
|
"color": "stone"
|
||||||
|
}
|
||||||
12
content/maths/worlfram.json
Normal file
12
content/maths/worlfram.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "WorlframAlpha",
|
||||||
|
"url": "https://www.wolframalpha.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "maths",
|
||||||
|
"color": "amber"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-vscode-icons:file-type-wolfram",
|
||||||
|
"color": "red"
|
||||||
|
}
|
||||||
16
content/nuxt/nuxt-content.json
Normal file
16
content/nuxt/nuxt-content.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"nuxt": "Content",
|
||||||
|
"url": "https://content.nuxt.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"color": "emerald"
|
||||||
|
}, {
|
||||||
|
"name": "Doc",
|
||||||
|
"color": "purple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-logos:nuxt-icon",
|
||||||
|
"color": "green"
|
||||||
|
}
|
||||||
16
content/nuxt/nuxt-hub.json
Normal file
16
content/nuxt/nuxt-hub.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"nuxt": "Hub",
|
||||||
|
"url": "https://nuxt.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"color": "emerald"
|
||||||
|
}, {
|
||||||
|
"name": "Doc",
|
||||||
|
"color": "purple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-logos:nuxt-icon",
|
||||||
|
"color": "green"
|
||||||
|
}
|
||||||
16
content/nuxt/nuxt-labs.json
Normal file
16
content/nuxt/nuxt-labs.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"nuxt": "Labs",
|
||||||
|
"url": "https://nuxtlabs.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"color": "emerald"
|
||||||
|
}, {
|
||||||
|
"name": "Doc",
|
||||||
|
"color": "purple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-logos:nuxt-icon",
|
||||||
|
"color": "zinc"
|
||||||
|
}
|
||||||
16
content/nuxt/nuxt-studio.json
Normal file
16
content/nuxt/nuxt-studio.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"nuxt": "Studio",
|
||||||
|
"url": "https://nuxt.studio/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"color": "emerald"
|
||||||
|
}, {
|
||||||
|
"name": "Doc",
|
||||||
|
"color": "purple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-logos:nuxt-icon",
|
||||||
|
"color": "green"
|
||||||
|
}
|
||||||
16
content/nuxt/nuxt-ui.json
Normal file
16
content/nuxt/nuxt-ui.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"nuxt": "UI",
|
||||||
|
"url": "https://ui.nuxt.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"color": "emerald"
|
||||||
|
}, {
|
||||||
|
"name": "Doc",
|
||||||
|
"color": "purple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-logos:nuxt-icon",
|
||||||
|
"color": "green"
|
||||||
|
}
|
||||||
15
content/nuxt/nuxt.json
Normal file
15
content/nuxt/nuxt.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"url": "https://nuxt.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Nuxt",
|
||||||
|
"color": "emerald"
|
||||||
|
}, {
|
||||||
|
"name": "Doc",
|
||||||
|
"color": "purple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-logos:nuxt-icon",
|
||||||
|
"color": "green"
|
||||||
|
}
|
||||||
17
content/nuxt/vueuse.json
Normal file
17
content/nuxt/vueuse.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"name": "Vue",
|
||||||
|
"url": "https://vueuse.org/",
|
||||||
|
"nuxt": "Use",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Vue",
|
||||||
|
"color": "emerald"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Doc",
|
||||||
|
"color": "purple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-logos:vueuse",
|
||||||
|
"color": "green"
|
||||||
|
}
|
||||||
16
content/perso/artsite.json
Normal file
16
content/perso/artsite.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "ArtSite",
|
||||||
|
"url": "https://arthurdanjou.fr/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Dev",
|
||||||
|
"color": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Perso",
|
||||||
|
"color": "pink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:globe-duotone",
|
||||||
|
"color": "blue"
|
||||||
|
}
|
||||||
12
content/perso/duolingo.json
Normal file
12
content/perso/duolingo.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "Duolingo",
|
||||||
|
"url": "https://duolingo.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Lang",
|
||||||
|
"color": "red"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:bird-duotone",
|
||||||
|
"color": "lime"
|
||||||
|
}
|
||||||
16
content/social/github.json
Normal file
16
content/social/github.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Github",
|
||||||
|
"url": "https://www.github.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Social",
|
||||||
|
"color": "teal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Perso",
|
||||||
|
"color": "pink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:github-logo-duotone",
|
||||||
|
"color": "black"
|
||||||
|
}
|
||||||
16
content/social/instagram.json
Normal file
16
content/social/instagram.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Instagram",
|
||||||
|
"url": "https://www.instagram.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Social",
|
||||||
|
"color": "teal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Perso",
|
||||||
|
"color": "pink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:instagram-logo-duotone",
|
||||||
|
"color": "fuchsia"
|
||||||
|
}
|
||||||
16
content/social/linkedin.json
Normal file
16
content/social/linkedin.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "LinkedIn",
|
||||||
|
"url": "https://www.linkedin.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Social",
|
||||||
|
"color": "teal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Perso",
|
||||||
|
"color": "pink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:linkedin-logo-duotone",
|
||||||
|
"color": "blue"
|
||||||
|
}
|
||||||
16
content/social/twitch.json
Normal file
16
content/social/twitch.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Twitch",
|
||||||
|
"url": "https://www.twitch.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Social",
|
||||||
|
"color": "teal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Perso",
|
||||||
|
"color": "pink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:twitch-logo-duotone",
|
||||||
|
"color": "purple"
|
||||||
|
}
|
||||||
16
content/social/x.json
Normal file
16
content/social/x.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Twitter",
|
||||||
|
"url": "https://www.x.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Social",
|
||||||
|
"color": "teal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Perso",
|
||||||
|
"color": "pink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:x-logo-duotone",
|
||||||
|
"color": "black"
|
||||||
|
}
|
||||||
16
content/social/youtube.json
Normal file
16
content/social/youtube.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Youtube",
|
||||||
|
"url": "https://www.x.com/",
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "Social",
|
||||||
|
"color": "teal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Perso",
|
||||||
|
"color": "pink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": "i-ph:youtube-logo-duotone",
|
||||||
|
"color": "red"
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
future: { compatibilityVersion: 4 },
|
future: { compatibilityVersion: 4 },
|
||||||
|
|
||||||
|
compatibilityDate: '2024-08-21',
|
||||||
|
|
||||||
// Nuxt App
|
// Nuxt App
|
||||||
app: {
|
app: {
|
||||||
pageTransition: { name: 'page', mode: 'out-in' },
|
pageTransition: { name: 'page', mode: 'out-in' },
|
||||||
@@ -15,15 +17,11 @@ export default defineNuxtConfig({
|
|||||||
modules: [
|
modules: [
|
||||||
'@nuxthub/core',
|
'@nuxthub/core',
|
||||||
'@nuxt/ui',
|
'@nuxt/ui',
|
||||||
'@nuxt/content',
|
|
||||||
'@vueuse/nuxt',
|
'@vueuse/nuxt',
|
||||||
'@nuxtjs/google-fonts',
|
'@nuxtjs/google-fonts',
|
||||||
'@nuxthq/studio',
|
|
||||||
'@nuxt/image',
|
|
||||||
'@nuxtjs/i18n',
|
|
||||||
'@pinia/nuxt',
|
|
||||||
'@pinia-plugin-persistedstate/nuxt',
|
|
||||||
'nuxt-auth-utils',
|
'nuxt-auth-utils',
|
||||||
|
"@nuxt/content",
|
||||||
|
"@nuxthq/studio"
|
||||||
],
|
],
|
||||||
|
|
||||||
// Nuxt Hub
|
// Nuxt Hub
|
||||||
@@ -34,13 +32,6 @@ export default defineNuxtConfig({
|
|||||||
analytics: true,
|
analytics: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Nuxt Content
|
|
||||||
content: {
|
|
||||||
highlight: {
|
|
||||||
theme: 'github-dark',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
// Nuxt Color Mode
|
// Nuxt Color Mode
|
||||||
colorMode: {
|
colorMode: {
|
||||||
preference: 'system',
|
preference: 'system',
|
||||||
@@ -53,24 +44,6 @@ export default defineNuxtConfig({
|
|||||||
timeline: { enabled: true },
|
timeline: { enabled: true },
|
||||||
},
|
},
|
||||||
|
|
||||||
// Nuxt I18N
|
|
||||||
i18n: {
|
|
||||||
strategy: 'no_prefix',
|
|
||||||
locales: [
|
|
||||||
{
|
|
||||||
code: 'en',
|
|
||||||
iso: 'en-EN',
|
|
||||||
icon: 'i-twemoji-flag-united-kingdom',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
code: 'fr',
|
|
||||||
iso: 'fr-FR',
|
|
||||||
icon: 'i-twemoji-flag-france',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
defaultLocale: 'en',
|
|
||||||
},
|
|
||||||
|
|
||||||
// Nuxt Google Fonts
|
// Nuxt Google Fonts
|
||||||
googleFonts: {
|
googleFonts: {
|
||||||
display: 'swap',
|
display: 'swap',
|
||||||
@@ -93,6 +66,4 @@ export default defineNuxtConfig({
|
|||||||
test: '',
|
test: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
compatibilityDate: '2024-07-23',
|
|
||||||
})
|
})
|
||||||
33
package.json
33
package.json
@@ -14,34 +14,27 @@
|
|||||||
"db:generate": "drizzle-kit generate"
|
"db:generate": "drizzle-kit generate"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify/json": "^2.2.230",
|
|
||||||
"@nuxt/content": "^2.13.2",
|
"@nuxt/content": "^2.13.2",
|
||||||
"@nuxt/image": "^1.7.0",
|
|
||||||
"@nuxt/ui": "^2.17.0",
|
|
||||||
"@nuxthq/studio": "^2.0.3",
|
"@nuxthq/studio": "^2.0.3",
|
||||||
"@nuxthub/core": "^0.7.1",
|
"@nuxthub/core": "^0.7.3",
|
||||||
"@nuxtjs/google-fonts": "^3.2.0",
|
"@nuxtjs/google-fonts": "^3.2.0",
|
||||||
"@nuxtjs/i18n": "^8.3.1",
|
"drizzle-orm": "^0.33.0",
|
||||||
"@pinia/nuxt": "^0.5.1",
|
|
||||||
"drizzle-orm": "^0.32.1",
|
|
||||||
"h3-zod": "^0.5.3",
|
"h3-zod": "^0.5.3",
|
||||||
"nuxt": "^3.12.4",
|
"nuxt": "^3.12.4",
|
||||||
"nuxt-auth-utils": "^0.2.0",
|
"nuxt-auth-utils": "^0.3.4",
|
||||||
"pinia": "^2.1.7",
|
|
||||||
"zod": "^3.23.8"
|
"zod": "^3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^2.23.2",
|
"@antfu/eslint-config": "^2.26.1",
|
||||||
"@nuxt/devtools": "^1.3.9",
|
"@nuxt/devtools": "^1.3.14",
|
||||||
"@nuxt/ui": "^2.17.0",
|
"@nuxt/ui": "^2.18.4",
|
||||||
"@pinia-plugin-persistedstate/nuxt": "^1.2.1",
|
"@types/node": "^22.4.2",
|
||||||
"@types/node": "^20.14.11",
|
"@vueuse/core": "^11.0.1",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/nuxt": "^11.0.1",
|
||||||
"@vueuse/nuxt": "^10.11.0",
|
"drizzle-kit": "^0.24.0",
|
||||||
"drizzle-kit": "^0.23.0",
|
"eslint": "^9.9.0",
|
||||||
"eslint": "^9.7.0",
|
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.5.4",
|
||||||
"vue-tsc": "^2.0.28",
|
"vue-tsc": "^2.0.29",
|
||||||
"wrangler": "^3.66.0"
|
"wrangler": "^3.72.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2062
pnpm-lock.yaml
generated
2062
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
|||||||
export default oauth.githubEventHandler({
|
|
||||||
config: {
|
|
||||||
emailRequired: true,
|
|
||||||
},
|
|
||||||
async onSuccess(event, { user }) {
|
|
||||||
await setUserSession(event, {
|
|
||||||
user: {
|
|
||||||
name: user.name,
|
|
||||||
imageUrl: user.avatar_url,
|
|
||||||
email: user.email,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
return sendRedirect(event, '/')
|
|
||||||
},
|
|
||||||
onError(event, error) {
|
|
||||||
console.error('GitHub OAuth error:', error)
|
|
||||||
return sendRedirect(event, '/')
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
export default oauth.googleEventHandler({
|
|
||||||
config: {
|
|
||||||
authorizationParams: {
|
|
||||||
access_type: 'offline',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async onSuccess(event, { user }) {
|
|
||||||
await setUserSession(event, {
|
|
||||||
user: {
|
|
||||||
name: user.name,
|
|
||||||
imageUrl: user.picture,
|
|
||||||
email: user.email,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return sendRedirect(event, '/')
|
|
||||||
},
|
|
||||||
// Optional, will return a json error and 401 status code by default
|
|
||||||
onError(event, error) {
|
|
||||||
console.error('Google OAuth error:', error)
|
|
||||||
return sendRedirect(event, '/')
|
|
||||||
},
|
|
||||||
})
|
|
||||||
15
types/types.ts
Normal file
15
types/types.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import type { ParsedContent } from '@nuxt/content'
|
||||||
|
|
||||||
|
export interface AppType extends ParsedContent {
|
||||||
|
name: string
|
||||||
|
nuxt?: string
|
||||||
|
url: string
|
||||||
|
icon: string
|
||||||
|
color: string
|
||||||
|
tags: Tag[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Tag {
|
||||||
|
name: string
|
||||||
|
color: string
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user