Working hard

This commit is contained in:
2021-06-01 22:24:32 +02:00
parent 85eb45f9a6
commit a2058d50d6
41 changed files with 125 additions and 78 deletions

View File

@@ -6,30 +6,39 @@
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
"generate": "nuxt generate",
"lint": "eslint '**/*.{js,ts,vue,json}'",
"lint:fix": "nr lint --fix"
},
"dependencies": {
"@nuxt/content": "^1.14.0",
"@nuxtjs/axios": "^5.13.1",
"@nuxtjs/axios": "^5.13.5",
"@nuxtjs/composition-api": "0.23.4",
"@nuxtjs/dotenv": "^1.4.1",
"@nuxtjs/redirect-module": "^0.3.1",
"@nuxtjs/robots": "^2.5.0",
"@nuxtjs/sentry": "^5.0.3",
"@nuxtjs/sentry": "^5.1.0",
"@nuxtjs/sitemap": "^2.4.0",
"@nuxtjs/universal-storage": "^0.5.9",
"core-js": "^3.12.1",
"nuxt": "^2.15.5",
"core-js": "^3.13.1",
"ipx": "^0.6.1",
"nuxt": "^2.15.6",
"nuxt-i18n": "^6.27.0",
"prism-themes": "^1.7.0",
"sass": "^1.32.12",
"windicss": "^2.5.14"
"sass": "^1.34.0",
"windicss": "^3.0.12"
},
"devDependencies": {
"@nuxt/types": "^2.15.5",
"@nuxt/image": "^0.4.13",
"@nuxt/types": "^2.15.6",
"@nuxt/typescript-build": "^2.1.0",
"@nuxtjs/color-mode": "^2.0.5",
"nuxt-windicss": "^0.6.0",
"sass-loader": "10.1.1"
"@nuxtjs/color-mode": "^2.0.9",
"markdown-it-prism": "^2.1.6",
"nuxt-vite": "^0.1.1",
"nuxt-windicss": "^0.8.2",
"sass-loader": "10.1.1",
"vite-plugin-components": "^0.10.4",
"vite-plugin-md": "^0.6.7",
"vite-plugin-windicss": "^0.16.7"
}
}

View File

@@ -31,4 +31,8 @@ const buildDir = 'build'
const ssr = true
export default { srcDir, dir, build, pageTransition, target, server, buildDir, components, ssr }
const serverMiddleware = {
'/_ipx': '~/middleware/ipx.ts'
}
export default { srcDir, dir, build, pageTransition, target, server, buildDir, components, ssr, serverMiddleware }

View File

@@ -1,5 +1,10 @@
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
import {NuxtOptionsModule} from "@nuxt/types/config/module";
import {resolve} from 'path'
import ViteComponents from 'vite-plugin-components'
import WindiCSS from 'vite-plugin-windicss'
import Markdown from 'vite-plugin-md'
import Prism from 'markdown-it-prism'
const color_mode = {
preference: 'system',
@@ -32,9 +37,39 @@ const windicss = {
}
}
const vite = {
vue: {
include: [/\.vue$/, /\.md$/],
},
plugins: [
ViteComponents({
dirs: [
resolve('./components'),
],
extensions: ['vue', 'md'],
customLoaderMatcher: path => path.endsWith('.md'),
}),
WindiCSS({
scan: {
dirs: [
resolve('./pages'),
resolve('./components'),
],
},
}),
Markdown({
markdownItSetup(md) {
md.use(Prism)
},
}),
],
ssr: true
}
export default [
'@nuxt/typescript-build',
'@nuxtjs/composition-api/module',
['nuxt-windicss', windicss],
['@nuxtjs/color-mode', color_mode],
//['nuxt-vite', vite]
] as NuxtOptionsModule[]

View File

@@ -90,6 +90,11 @@ const sentry = {
}
}
const image = {
domains: ['https://arthurdanjou.fr'],
dir: 'static'
}
export default [
['@nuxtjs/axios', axios],
['nuxt-i18n', i18n],
@@ -99,5 +104,6 @@ export default [
['@nuxtjs/sitemap', sitemap],
['@nuxtjs/redirect-module', redirect],
['@nuxtjs/dotenv', env],
['@nuxtjs/sentry', sentry]
['@nuxtjs/sentry', sentry],
['@nuxt/image', image]
] as NuxtOptionsModule[]

View File

@@ -1,4 +1,9 @@
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
export default [
{ src: '~/plugins/i18n.ts' }
{
src: '~/plugins/i18n.ts'
},
{
src: '~/plugins/main.ts',
}
]

View File

@@ -21,7 +21,6 @@ body {
@apply dark:(bg-dark-800 text-white) border dark:border-white border-black border-solid;
}
//TODO remove with windicss/typography
.nuxt-content-container, .nuxt-content {
p {
@apply text-gray-700 dark:text-gray-400

View File

@@ -1 +0,0 @@
<svg id="twitter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 126.24 102.59"><defs><style>.cls-1{fill:#1da1f2;}</style></defs><title>twitter-original</title><path id="original" class="cls-1" d="M40.58,115.3c47.64,0,73.69-39.47,73.69-73.69,0-1.12,0-2.24-.07-3.35a52.7,52.7,0,0,0,12.92-13.41,51.7,51.7,0,0,1-14.87,4.08A26,26,0,0,0,123.63,14.6a51.9,51.9,0,0,1-16.45,6.29A25.92,25.92,0,0,0,63.05,44.51,73.53,73.53,0,0,1,9.67,17.45a25.92,25.92,0,0,0,8,34.58A25.71,25.71,0,0,1,6,48.78c0,.11,0,.22,0,.33A25.91,25.91,0,0,0,26.73,74.5a25.86,25.86,0,0,1-11.7.44,25.93,25.93,0,0,0,24.2,18A52,52,0,0,1,7.06,104a52.72,52.72,0,0,1-6.18-.36,73.32,73.32,0,0,0,39.7,11.63" transform="translate(-0.88 -12.7)"/></svg>

Before

Width:  |  Height:  |  Size: 702 B

View File

@@ -2,7 +2,7 @@
<section v-if="info && info.age" class="w-full flex items-center justify-center my-12">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-12 md:mb-0 w-full md:w-1/2 flex justify-center">
<img src="@/assets/images/memojies/Hat.png" alt="It's me !" class="xl:w-1/2">
<nuxt-img src="/memojies/Hat.png" alt="It's me !" class="xl:w-1/2" />
</div>
<div class="md:w-1/2 text-justify">
<h2 class="text-4xl font-bold text-center md:text-justify">
@@ -21,7 +21,7 @@
<script lang="ts">
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
import {InfoData} from "../../@types/types";
import {InfoData} from "../../types/types";
export default defineComponent({
name: "AboutPreview",

View File

@@ -1,5 +1,5 @@
<template>
<div class="rounded-3xl p-2 lg:p-8 text-center" :class="getColor">
<div class="rounded-3xl p-2 lg:p-8 text-center h-full block" :class="getColor">
<slot />
</div>
</template>

View File

@@ -1,10 +1,10 @@
<template>
<section class="w-full my-12">
<section class="w-full my-12 h-full">
<div class="md:space-x-12 space-y-8 md:space-y-0 flex flex-col md:flex-row items-center justify-around h-full">
<nuxt-link to="/env" class="h-full md:w-2/5">
<nuxt-link to="/env" class="block h-auto md:w-2/5">
<Ad color="rose" class="w-full flex flex-col justify-between items-center">
<div>
<img class="h-48" src="~/assets/images/memojies/Dev.png" alt="Dev Memoji" />
<nuxt-img class="h-48" src="/memojies/Dev.png" alt="Dev Memoji" />
</div>
<div>
<h1 class="font-bold text-black text-4xl">
@@ -16,10 +16,10 @@
</div>
</Ad>
</nuxt-link>
<nuxt-link to="/contact" class="h-full md:w-2/5">
<nuxt-link to="/contact" class="min-h-full md:w-2/5">
<Ad color="blue" class="w-full flex flex-col justify-between items-center">
<div>
<img class="h-48" src="~/assets/images/memojies/Fiesta.png" alt="Fiesta Memoji" />
<nuxt-img class="h-48" src="/memojies/Fiesta.png" alt="Fiesta Memoji" />
</div>
<div>
<h1 class="font-bold text-black text-4xl">

View File

@@ -68,7 +68,7 @@
<script lang="ts">
import {computed, defineComponent, ref, useContext} from "@nuxtjs/composition-api";
import {Form} from "../../@types/types";
import {Form} from "../../types/types";
export default defineComponent({
name: "ContactForm",

View File

@@ -19,7 +19,7 @@
<script lang="ts">
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
import {Experience} from "../../@types/types";
import {Experience} from "../../types/types";
export default defineComponent({
name: "ExperiencesAbout",

View File

@@ -6,16 +6,16 @@
<p class="inline">{{ $t('footer.find_me') }}
<br class="md:hidden"/>
<a class="font-semibold" href="https://twitch.com/ArthurDanjou" target="_blank" rel="noopener noreferrer">
<img class="inline" src="@/assets/images/socials/twitch.svg" alt="Twitch logo" height="20" width="20" />
<nuxt-img format="svg" class="inline" src="/socials/twitch.svg" alt="Twitch logo" height="20" width="20" />
<span class="link">Twitch</span>
</a>,
<a class="font-semibold" href="https://github.com/ArthurDanjou" target="_blank" rel="noopener noreferrer">
<img v-if="!isDarkMode" class="inline" src="@/assets/images/socials/github-black.svg" alt="Github logo" height="20" width="20" />
<img v-else class="inline" src="@/assets/images/socials/github-white.svg" alt="Github logo" height="20" width="20" />
<nuxt-img format="svg" v-if="!isDarkMode" class="inline" src="/socials/github-black.svg" alt="Github logo" height="20" width="20" />
<nuxt-img format="svg" v-else class="inline" src="/socials/github-white.svg" alt="Github logo" height="20" width="20" />
<span class="link">Github</span>
</a> &
<a class="font-semibold" href="https://twitter.com/ArthurDanj" target="_blank" rel="noopener noreferrer">
<img class="inline" src="@/assets/images/socials/twitter.svg" alt="Twitter logo" height="20" width="20" />
<nuxt-img format="svg" class="inline" src="/socials/twitter.svg" alt="Twitter logo" height="" width="20" />
<span class="link">Twitter</span>
</a>
<br class="md:hidden"/>
@@ -35,7 +35,7 @@
<p>
{{ $t('footer.credits') }}
<a class="font-semibold" target="_blank" href="https://nuxtjs.org" rel="noopener noreferrer">
<img class="inline" src="@/assets/images/socials/nuxtjs.svg" alt="NuxtJs logo" height="20" width="20" />
<nuxt-img format="svg" class="inline" src="/socials/nuxtjs.svg" alt="NuxtJs logo" width="20" />
<span class="link">NuxtJs</span>
</a>
{{ $t('footer.credits_separator') }} <span>Arthur DANJOU</span>
@@ -46,7 +46,7 @@
</footer>
</template>
<script>
<script lang="ts">
import {computed, defineComponent, ref, useContext} from "@nuxtjs/composition-api";
export default defineComponent({
@@ -54,7 +54,7 @@ export default defineComponent({
setup() {
const {$colorMode} = useContext()
const isDarkMode = computed(() => {
return $colorMode.preference === 'dark' | undefined
return $colorMode.preference === 'dark'
})
const getDate = ref(new Date().getFullYear())

View File

@@ -19,7 +19,7 @@
<script lang="ts">
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
import {Formation} from "../../@types/types";
import {Formation} from "../../types/types";
export default defineComponent({
name: "FormationsHome",

View File

@@ -2,7 +2,7 @@
<header class="dark:bg-black dark:text-white fixed z-50 top-0 left-0 bg-white w-full duration-400" :class="scrollPosition > 50 ? ' shadow-md dark:shadow-white h-16 lg:h-20' : 'h-20 lg:h-24'">
<div class="header-container z-index-50 flex justify-between items-center h-full px-5 xl:px-32">
<nuxt-link to="/">
<img src="@/assets/images/logo-header.png" alt="Logo Circle" class="h-10 left cursor-pointer duration-500" />
<nuxt-img src="/logo-header.png" alt="Logo Circle" class="h-10 left cursor-pointer duration-500" />
</nuxt-link>
<nav class="right">
<div class="flex flex-col md:flex-row items-center">
@@ -161,7 +161,7 @@ export default defineComponent({
}
.nuxt-link-exact-active {
@apply text-black dark:text-white !important;
@apply text-black dark:text-white;
}
.navbar-bottom-items li {

View File

@@ -31,7 +31,7 @@
<script lang="ts">
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
import {Post} from "../../@types/types";
import {Post} from "../../types/types";
export default defineComponent({
name: "PostsHome",

View File

@@ -1,7 +1,7 @@
<template>
<section class="flex flex-col 2xl:flex-row justify-center items-center py-8">
<div class="lg:mr-12">
<img class="logo-img rounded-full my-5" src="@/assets/images/memojies/Hey.png" alt="It's me !" />
<nuxt-img class="logo-img rounded-full my-5" src="/memojies/Hey.png" alt="It's me !" />
</div>
<div class="ml-2 text-lg leading-6 xl:w-2/3 text-justify dark:text-gray-400 text-gray-700">
<p>{{ $t('about.banner.hello') }} <span class="text-indigo-600 font-bold">Arthur DANJOU</span> 👋.</p> <br/>

View File

@@ -29,7 +29,7 @@
<script lang="ts">
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
import {Project} from "../../@types/types";
import {Project} from "../../types/types";
export default defineComponent({
name: "ProjectsHome",

View File

@@ -2,7 +2,7 @@
<div class="mb-3 mr-2 p-1 md:p-2 h-32 w-32 border-gray-900 dark:border-dark-200 border-2 duration-300 rounded-3xl hover:bg-opacity-25" :class="getColor">
<div class="w-full h-full flex flex-col justify-center items-center">
<div>
<img class="rounded-sm" alt="Skill Img" :src="getCoverLink">
<img class="rounded-sm" alt="Skill Img" :src="getCoverLink" />
</div>
<h1 class="md:text-lg text-md font-bold text-center text-gray-700 dark:text-gray-400">{{ skill }}</h1>
</div>

View File

@@ -20,7 +20,7 @@
<script lang="ts">
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
import {Skill} from "../../@types/types";
import {Skill} from "../../types/types";
export default defineComponent({
name: "SkillsAbout",

8
src/middleware/ipx.ts Normal file
View File

@@ -0,0 +1,8 @@
import { createIPX, createIPXMiddleware } from 'ipx'
// https://github.com/unjs/ipx
const ipx = createIPX({
dir: 'src/static'
})
export default createIPXMiddleware(ipx)

View File

@@ -43,7 +43,7 @@
<nuxt-content
:document="post"
class="my-6 md:my-10 w-full text-justify max-w-none
prose prose-sm sm:prose lg:prose-lg lg:max-w-none sm:max-w-none
prose prose-sm lg:prose-lg lg:max-w-none sm:max-w-none
dark:prose-dark dark:max-w-none"
/>
<p class="mb-3">
@@ -66,7 +66,7 @@
:href="'https://twitter.com/intent/tweet?url=https%3A%2F%2Farthurdanjou.fr%2Fblog%2F' + this.post.slug + '&text=' + $t('blog.tweet') + ' ' + post.title"
class="h-16 mr-2 end-blog cursor-pointer duration-300 text-3xl p-3 border-solid border border-gray-400 dark:border-dark-200 hover:border-cyan-500 dark:hover:border-cyan-400 justify-center items-center"
>
<img class="inline img icon-hover" src="@/assets/images/socials/twitter.svg" alt="Twitter logo" height="40" width="40" />
<nuxt-img class="inline img icon-hover" src="/socials/twitter.svg" alt="Twitter logo" height="40" width="40" />
</a>
<div @click="scrollToTop"
class="h-16 mr-2 end-blog cursor-pointer duration-300 text-3xl p-3 border-solid border border-gray-400 dark:border-dark-200 hover:border-dark-800 dark:hover:border-white">
@@ -113,7 +113,7 @@ import {
useMeta,
useRoute, useStatic, watch
} from "@nuxtjs/composition-api";
import {Post} from "../../../@types/types";
import {Post} from "../../../types/types";
export default defineComponent({
name: "blog",

View File

@@ -31,7 +31,7 @@
<script lang="ts">
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
import {Post} from "../../../@types/types";
import {Post} from "../../../types/types";
export default defineComponent({
name: "blog",

View File

@@ -28,7 +28,7 @@
<script lang="ts">
import {computed, useAsync, useContext} from "@nuxtjs/composition-api";
import {InfoData} from "../../@types/types";
import {InfoData} from "../../types/types";
export default {
name: "contact",

View File

@@ -23,7 +23,7 @@
<script lang="ts">
import {useAsync, useContext, useMeta} from "@nuxtjs/composition-api";
import {Project} from "../../@types/types";
import {Project} from "../../types/types";
export default {
name: "index",

1
src/plugins/main.ts Normal file
View File

@@ -0,0 +1 @@
import 'windi.css'

View File

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 185 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View File

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,9 +1,8 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-92.4 101 489.5 512" enable-background="new -92.4 101 489.5 512" xml:space="preserve">
<g>
<path fill="#65459B" d="M263.6,546.1H163.4L96.7,613H30v-66.9H-92.4v-356l33.3-89.1h456.2v311.6L263.6,546.1z M352.7,390.5V145.5
H-14.6v322.7H85.6V535l66.7-66.7h122.4L352.7,390.5z"/>
<g id="Solo_Glitch_136_">
<g>
<path fill="#65459B" d="M263.6,546.1H163.4L96.7,613H30v-66.9H-92.4v-356l33.3-89.1h456.2v311.6L263.6,546.1z M352.7,390.5V145.5H-14.6v322.7H85.6V535l66.7-66.7h122.4L352.7,390.5z"/>
<g id="Solo_Glitch_136_">
<g>
<path fill="#65459B" d="M230.2,234.6v133.6h44.5V234.6H230.2z M107.8,368.1h44.5V234.6h-44.5V368.1z"/>
</g>

Before

Width:  |  Height:  |  Size: 573 B

After

Width:  |  Height:  |  Size: 578 B

View File

@@ -0,0 +1,2 @@
<svg id="twitter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 126.24 102.59">
<defs><style>.cls-1{fill:#1da1f2;}</style></defs><path id="original" class="cls-1" d="M40.58,115.3c47.64,0,73.69-39.47,73.69-73.69,0-1.12,0-2.24-.07-3.35a52.7,52.7,0,0,0,12.92-13.41,51.7,51.7,0,0,1-14.87,4.08A26,26,0,0,0,123.63,14.6a51.9,51.9,0,0,1-16.45,6.29A25.92,25.92,0,0,0,63.05,44.51,73.53,73.53,0,0,1,9.67,17.45a25.92,25.92,0,0,0,8,34.58A25.71,25.71,0,0,1,6,48.78c0,.11,0,.22,0,.33A25.91,25.91,0,0,0,26.73,74.5a25.86,25.86,0,0,1-11.7.44,25.93,25.93,0,0,0,24.2,18A52,52,0,0,1,7.06,104a52.72,52.72,0,0,1-6.18-.36,73.32,73.32,0,0,0,39.7,11.63" transform="translate(-0.88 -12.7)"/></svg>

After

Width:  |  Height:  |  Size: 675 B

View File

@@ -1,6 +1,8 @@
import {defineConfig} from "windicss/helpers";
const colors = require('windicss/colors')
module.exports = {
module.exports = defineConfig({
presets: [],
darkMode: 'class',
theme: {
@@ -127,14 +129,8 @@ module.exports = {
gray: colors.gray,
coolGray: colors.coolGray,
blueGray: colors.blueGray,
dark: {
100: 'rgb(150,150,150)',
200: 'rgb(112,112,112)',
850: '#404040',
700: '#272727',
800: '#212121',
900: '#121212',
}
dark: colors.dark,
light: colors.light
},
spacing: {
px: '1px',
@@ -812,23 +808,7 @@ module.exports = {
50: '50',
},
},
variantOrder: [
'first',
'last',
'odd',
'even',
'visited',
'checked',
'group-hover',
'group-focus',
'focus-within',
'hover',
'focus',
'focus-visible',
'active',
'disabled',
],
plugins: [
require('windicss/plugin/typography')
require('windicss/plugin/typography'),
],
}
})