mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-01-14 12:14:33 +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' }],
|
||||
})
|
||||
|
||||
const head = useLocaleHead({
|
||||
addDirAttribute: true,
|
||||
identifierAttribute: 'id',
|
||||
addSeoAttributes: true,
|
||||
const date = ref<Date>(new Date())
|
||||
onMounted(() => {
|
||||
setInterval(() => date.value = new Date(), 1000)
|
||||
})
|
||||
|
||||
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>
|
||||
|
||||
<template>
|
||||
<Html
|
||||
:dir="head.htmlAttrs.dir"
|
||||
:lang="head.htmlAttrs.lang"
|
||||
>
|
||||
<Head>
|
||||
<template
|
||||
v-for="link in head.link"
|
||||
:key="link.id"
|
||||
>
|
||||
<Link
|
||||
: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>
|
||||
<NuxtLoadingIndicator color="#808080" />
|
||||
<UContainer class="my-8">
|
||||
<div v-if="date" class="flex flex-col items-center">
|
||||
<h1 class="text-6xl font-bold">
|
||||
{{ useDateFormat(date, 'HH:mm') }}
|
||||
</h1>
|
||||
<h1 class="text-2xl">
|
||||
{{ useDateFormat(date, 'dddd D MMMM YYYY', { locales: () => 'fr-FR' }) }}
|
||||
</h1>
|
||||
</div>
|
||||
</Body>
|
||||
</Html>
|
||||
<div v-if="apps" class="space-y-12">
|
||||
<Application title="Personal" :apps="perso" />
|
||||
<Application title="Social" :apps="social" />
|
||||
<Application title="Nuxt" :apps="nuxt" />
|
||||
<Application title="Mathematics" :apps="maths" />
|
||||
</div>
|
||||
</UContainer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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({
|
||||
future: { compatibilityVersion: 4 },
|
||||
|
||||
compatibilityDate: '2024-08-21',
|
||||
|
||||
// Nuxt App
|
||||
app: {
|
||||
pageTransition: { name: 'page', mode: 'out-in' },
|
||||
@@ -15,15 +17,11 @@ export default defineNuxtConfig({
|
||||
modules: [
|
||||
'@nuxthub/core',
|
||||
'@nuxt/ui',
|
||||
'@nuxt/content',
|
||||
'@vueuse/nuxt',
|
||||
'@nuxtjs/google-fonts',
|
||||
'@nuxthq/studio',
|
||||
'@nuxt/image',
|
||||
'@nuxtjs/i18n',
|
||||
'@pinia/nuxt',
|
||||
'@pinia-plugin-persistedstate/nuxt',
|
||||
'nuxt-auth-utils',
|
||||
"@nuxt/content",
|
||||
"@nuxthq/studio"
|
||||
],
|
||||
|
||||
// Nuxt Hub
|
||||
@@ -34,13 +32,6 @@ export default defineNuxtConfig({
|
||||
analytics: true,
|
||||
},
|
||||
|
||||
// Nuxt Content
|
||||
content: {
|
||||
highlight: {
|
||||
theme: 'github-dark',
|
||||
},
|
||||
},
|
||||
|
||||
// Nuxt Color Mode
|
||||
colorMode: {
|
||||
preference: 'system',
|
||||
@@ -53,24 +44,6 @@ export default defineNuxtConfig({
|
||||
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
|
||||
googleFonts: {
|
||||
display: 'swap',
|
||||
@@ -93,6 +66,4 @@ export default defineNuxtConfig({
|
||||
test: '',
|
||||
},
|
||||
},
|
||||
|
||||
compatibilityDate: '2024-07-23',
|
||||
})
|
||||
})
|
||||
33
package.json
33
package.json
@@ -14,34 +14,27 @@
|
||||
"db:generate": "drizzle-kit generate"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/json": "^2.2.230",
|
||||
"@nuxt/content": "^2.13.2",
|
||||
"@nuxt/image": "^1.7.0",
|
||||
"@nuxt/ui": "^2.17.0",
|
||||
"@nuxthq/studio": "^2.0.3",
|
||||
"@nuxthub/core": "^0.7.1",
|
||||
"@nuxthub/core": "^0.7.3",
|
||||
"@nuxtjs/google-fonts": "^3.2.0",
|
||||
"@nuxtjs/i18n": "^8.3.1",
|
||||
"@pinia/nuxt": "^0.5.1",
|
||||
"drizzle-orm": "^0.32.1",
|
||||
"drizzle-orm": "^0.33.0",
|
||||
"h3-zod": "^0.5.3",
|
||||
"nuxt": "^3.12.4",
|
||||
"nuxt-auth-utils": "^0.2.0",
|
||||
"pinia": "^2.1.7",
|
||||
"nuxt-auth-utils": "^0.3.4",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^2.23.2",
|
||||
"@nuxt/devtools": "^1.3.9",
|
||||
"@nuxt/ui": "^2.17.0",
|
||||
"@pinia-plugin-persistedstate/nuxt": "^1.2.1",
|
||||
"@types/node": "^20.14.11",
|
||||
"@vueuse/core": "^10.11.0",
|
||||
"@vueuse/nuxt": "^10.11.0",
|
||||
"drizzle-kit": "^0.23.0",
|
||||
"eslint": "^9.7.0",
|
||||
"@antfu/eslint-config": "^2.26.1",
|
||||
"@nuxt/devtools": "^1.3.14",
|
||||
"@nuxt/ui": "^2.18.4",
|
||||
"@types/node": "^22.4.2",
|
||||
"@vueuse/core": "^11.0.1",
|
||||
"@vueuse/nuxt": "^11.0.1",
|
||||
"drizzle-kit": "^0.24.0",
|
||||
"eslint": "^9.9.0",
|
||||
"typescript": "^5.5.4",
|
||||
"vue-tsc": "^2.0.28",
|
||||
"wrangler": "^3.66.0"
|
||||
"vue-tsc": "^2.0.29",
|
||||
"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