rework structure

This commit is contained in:
2020-12-04 11:11:34 +01:00
parent d3e6216edf
commit 79fa8739dc
41 changed files with 7 additions and 17 deletions

View File

@@ -1,15 +0,0 @@
<template>
<div class="w-full mb-10">
<slot />
</div>
</template>
<script>
export default {
name: "EnvGroup"
}
</script>
<style scoped>
</style>

View File

@@ -1,15 +0,0 @@
<template>
<ul class="list-disc ml-10 text-gray-800 dark:text-dark-900 text-xl">
<slot/>
</ul>
</template>
<script>
export default {
name: "EnvList"
}
</script>
<style scoped>
</style>

View File

@@ -1,30 +0,0 @@
<template>
<li>
{{ title }}:
<a class="duration-300 text-orange-400 font-medium border-b-2 border-opacity-0 hover:border-opacity-100 border-orange-400 border-solid" v-if="link" :href="link" target="_blank">{{ content }}</a>
<span v-else>{{ content }}</span>
</li>
</template>
<script>
export default {
name: "EnvListItem",
props:{
title: {
default: 'Title',
type: String
},
link: {
type: String
},
content: {
default: 'content',
type: String
},
}
}
</script>
<style scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template>
<h3 class="font-bold text-2xl md:text-4xl mb-2">
{{ $t(title) }}
<slot />
</h3>
</template>
<script>
export default {
name: "EnvTitle",
props:{
title: {
default: 'Title',
type: String
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,59 +0,0 @@
<template>
<div class="flex flex-row mb-5">
<div class="self-center flex h-4 w-4 mr-4 relative">
<span v-if="end === 'Today'" class="animate-ping relative inline h-full w-full rounded-full bg-orange-400 opacity-75"></span>
<span v-else class="inline relative h-full w-full rounded-full bg-gray-400 opacity-75"></span>
<span v-if="end === 'Today'" class="inline absolute rounded-full h-4 w-4 bg-orange-500"></span>
<span v-else class="inline absolute rounded-full h-4 w-4 bg-gray-500"></span>
</div>
<div class="leading-7">
<p class="text-base dark:text-dark-900 text-gray-800 leading-6">{{ formatDate(begin) }} - {{ formatDate(end) }} <span class="px-3">|</span> {{location}}</p>
<h1 class="text-2xl font-bold">{{ $t(title) }} - {{company}}</h1>
<h2 class="text-xl">{{ $t(description) }}</h2>
</div>
</div>
</template>
<script>
export default {
name: "Experience",
props: {
title: {
type: String,
default: "Title"
},
description: {
type: String,
default: "Description"
},
company: {
type: String,
default: "ArtDanjProduction"
},
location: {
type: String,
default: "France"
},
begin: {
type: String,
default: "Now"
},
end: {
type: String,
default: "Never"
}
},
methods: {
formatDate(date) {
const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sept", "Oct", "Nov", "Dec"
];
const dateFormat = new Date(date)
return date === 'Today' ? 'Today' : monthNames[dateFormat.getMonth()] + " " + dateFormat.getFullYear()
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -1,76 +0,0 @@
<template>
<footer class="footer w-full border-t-2 border-solid border-black dark:border-white mb-20 md:mb-0">
<div>
<div class="flex flex-col items-center py-4 text-center ">
<div class="mb-3">
<p class="inline">Retrouvez moi sur :
<br class="md:hidden"/>
<a class="font-semibold" href="https://twitch.com/ArthurDanjou" target="_blank">
<img class="inline img" src="@/assets/img/socials/twitch.svg" alt="Twitch logo" height="18" width="18" />
<span class="link">Twitch</span>
</a>,
<a class="font-semibold" href="https://github.com/ArthurDanjou" target="_blank">
<img class="inline img" src="@/assets/img/socials/github.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">
<img class="inline img" src="@/assets/img/socials/twitter.svg" alt="Twitter logo" height="20" width="20" />
<span class="link">Twitter</span>
</a> et par
<a class="font-semibold" href="mailto:contact@arthurdanjou.fr" target="_blank">
<svg class="inline img" width="20" height="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
</svg>
<span class="link">Mail</span>
</a>
</p>
<span class="inline dark:text-dark-900 text-gray-600 text-xs">
(Clique c'est gratuit 🔗)
</span>
</div>
<p>
Développé et conçu avec en utilisant
<a class="font-semibold" target="_blank" href="https://nuxtjs.org">
<img class="inline img" src="@/assets/img/socials/nuxtjs.svg" alt="NuxtJs logo" height="20" width="20" />
<span class="link">NuxtJs</span>
</a>
&
<a class="font-semibold" target="_blank" href="https://preview.adonisjs.com/">
<img class="inline img" src="@/assets/img/socials/adonisjs.svg" alt="AdonisJs logo" height="20" width="20" />
<span class="link">AdonisJs</span>
</a>
par <span>Arthur DANJOU</span>
</p>
<p>© Copyright {{date}} - Tous droits réservés</p>
</div>
</div>
</footer>
</template>
<script>
export default {
name: "Footer",
data () {
return {
date: new Date().getFullYear()
}
}
}
</script>
<style scoped lang="scss">
.footer {
.img {
transform: translateY(-3px);
}
.link {
transition-duration: .2s;
&:hover {
@apply border-b-2 border-opacity-0 dark:border-opacity-0 dark:hover:border-opacity-100 hover:border-opacity-100 border-black dark:border-white border-solid;
}
}
}
</style>

View File

@@ -1,56 +0,0 @@
<template>
<div class="flex flex-row relative mb-5">
<div class="self-center flex h-4 w-4 mr-4 relative">
<span v-if="end === 'Today'" class="animate-ping relative inline h-full w-full rounded-full bg-orange-400 opacity-75"></span>
<span v-else class="inline relative h-full w-full rounded-full bg-gray-400 opacity-75"></span>
<span v-if="end === 'Today'" class="inline absolute rounded-full h-4 w-4 bg-orange-500"></span>
<span v-else class="inline absolute rounded-full h-4 w-4 bg-gray-500"></span>
</div>
<div class="leading-7 relative">
<p class="text-base dark:text-dark-900 text-gray-800 leading-6">{{ formatDate(begin) }} - {{ formatDate(end) }} <span class="px-3">|</span> {{location}}</p>
<h1 class="text-2xl font-bold">{{ $t(title) }}</h1>
<h2 class="text-xl">{{ $t(description) }}</h2>
</div>
</div>
</template>
<script>
export default {
name: "Formation",
props: {
title: {
type: String,
default: "Title"
},
description: {
type: String,
default: "Description"
},
location: {
type: String,
default: "Location"
},
begin: {
type: String,
default: "Now"
},
end: {
type: String,
default: "Never"
}
},
methods: {
formatDate(date) {
const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sept", "Oct", "Nov", "Dec"
];
const dateFormat = new Date(date)
return monthNames[dateFormat.getMonth()] + " " + dateFormat.getFullYear()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,172 +0,0 @@
<template>
<header class="dark:bg-dark-200 dark:text-white fixed z-50 top-0 left-0 bg-white header tracking-wider w-full h-16 lg:h-24 duration-500" :class="scrollPosition > 50 ? ' shadow-md dark:shadow-white' : ''">
<div class="header-container z-index-50 flex justify-between items-center h-full px-5 xl:px-64">
<nuxt-link to="/">
<div class="left text-2xl font-bold cursor-pointer border-b-2 border-opacity-0 dark:border-opacity-0 dark:hover:border-opacity-100 hover:border-opacity-100 border-black dark:border-white border-solid duration-500">
{{ $t('header_title') }}
</div>
</nuxt-link>
<nav class="right">
<div class="flex flex-col md:flex-row items-center">
<ul class="flex text-xl">
<li class="mx-2 cursor-pointer">
<div v-if="this.$i18n.locale === 'en'" @click="changeLanguage('fr')">
🇫🇷
</div>
<div v-else @click="changeLanguage('en')">
🇬🇧
</div>
</li>
<li @click="changeColorMode()" class="mx-2 cursor-pointer flex items-center">
<div v-if="this.$colorMode.value === 'light'">
<svg height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
</svg>
</div>
<div v-else>
<svg height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
</div>
</li>
<nuxt-link class="red hidden md:inline-block" to="/">
<li class="hover:text-red-400 font-bold mx-2 cursor-pointer duration-300">
{{ $t('part_home') }}
</li>
</nuxt-link>
<nuxt-link class="orange hidden md:inline-block" to="/about">
<li class="hover:text-orange-400 font-bold mx-2 cursor-pointer duration-300">
{{ $t('part_about') }}
</li>
</nuxt-link>
<nuxt-link class="green hidden md:inline-block" to="/blog">
<li class="hover:text-green-400 font-bold mx-2 cursor-pointer duration-300">
{{ $t('part_blog') }}
</li>
</nuxt-link>
<nuxt-link class="blue hidden md:inline-block" to="/work">
<li class="hover:text-blue-400 font-bold mx-2 cursor-pointer duration-300">
{{ $t('part_work') }}
</li>
</nuxt-link>
<nuxt-link class="purple hidden md:inline-block" to="/contact">
<li class="hover:text-purple-400 font-bold mx-2 cursor-pointer duration-300">
{{ $t('part_contact') }}
</li>
</nuxt-link>
</ul>
</div>
<ul class="dark:text-white dark:bg-dark-200 z-index-50 bg-white md:hidden fixed bottom-0 left-0 w-full flex items-center justify-around h-20 border-t border-gray-200 border-solid navbar-bottom-items">
<nuxt-link class="red" to="/">
<li class="font-bold flex flex-col items-center justify-center">
<svg class="inline-block" height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
{{ $t('part_home') }}
</li>
</nuxt-link>
<nuxt-link to="/about" class="orange">
<li class="font-bold flex flex-col items-center justify-center">
<svg class="inline-block" height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />
</svg>
{{ $t('part_about') }}
</li>
</nuxt-link>
<nuxt-link to="/blog" class="green">
<li class="font-bold flex flex-col items-center justify-center">
<svg class="inline-block" height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z" />
</svg>
{{ $t('part_blog') }}
</li>
</nuxt-link>
<nuxt-link to="/work" class="blue">
<li class="font-bold flex flex-col items-center justify-center">
<svg class="inline-block" height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
</svg>
{{ $t('part_work') }}
</li>
</nuxt-link>
<nuxt-link to="/contact" class="purple">
<li class="font-bold flex flex-col items-center justify-center">
<svg class="inline-block" height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
{{ $t('part_contact') }}
</li>
</nuxt-link>
</ul>
</nav>
</div>
</header>
</template>
<script>
export default {
name: "Header",
data () {
return {
scrollPosition: null
}
},
methods: {
changeColorMode() {
this.$colorMode.preference = this.$colorMode.value === 'light' ? 'dark' : 'light'
},
updateScroll() {
this.scrollPosition = window.scrollY
},
changeLanguage(lang) {
this.$i18n.setLocale(lang)
},
},
mounted() {
window.addEventListener('scroll', this.updateScroll);
},
destroy() {
window.removeEventListener('scroll', this.updateScroll)
}
}
</script>
<style scoped lang="scss">
.header {
.header-container {
.nuxt-link-active {
&.green {
@apply text-green-400;
}
&.blue {
@apply text-blue-400;
}
}
.nuxt-link-exact-active {
&.red {
@apply text-red-400;
}
&.orange {
@apply text-orange-400;
}
&.green {
@apply text-green-400;
}
&.blue {
@apply text-blue-400;
}
&.purple {
@apply text-purple-400;
}
}
.navbar-bottom-items li {
transition: all .2s ease-in-out;
}
}
}
</style>

View File

@@ -1,50 +0,0 @@
<template>
<nuxt-link :to="link">
<div
class="home-link h-full duration-500 cursor-pointer flex flex-row justify-between py-3 w-full md:w-96 items-center"
:class="color ? 'hover:bg-' + color + '-400 dark:hover:bg-' + color + '-600 active:bg-' + color + '-400 dark:active:bg-' + color + '-600' : ''">
<div class="ml-4">
<h1 class="text-3xl font-bold my-2">
{{ $t(title) }}
<slot />
</h1>
<p class="w-5/6 text-gray-900 dark:text-dark-900 text-justify">{{ $t(description) }}</p>
</div>
<div class="mr-10 arrow duration-300">
<svg class="inline icon" height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3" />
</svg>
</div>
</div>
</nuxt-link>
</template>
<script>
export default {
name: "HomeLink",
props: {
title: {
default: "Title",
type: String
},
description: {
default: "Description",
type: String
},
color: {
default: "red-100",
type: String
},
link: {
default: "/",
type: String
}
}
}
</script>
<style scoped lang="scss">
.home-link:hover .arrow {
transform: translateX(15px);
}
</style>

View File

@@ -1,29 +0,0 @@
<template>
<h1
class="mt-16 md:mt-32 font-bold text-4xl mr-2 inline mb-4 border-b-2 border-solid"
:class="' border-'+ color +'-400'"
>
{{ $t(title) }}
<slot />
</h1>
</template>
<script>
export default {
name: "PageTitle",
props: {
title: {
default: 'Title',
type: String
},
color: {
default: 'red',
type: String
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,96 +0,0 @@
<template>
<article
class="border-2 border-black border-solid rounded-xl w-full h-blog p-2 flex flex-col justify-between my-5 duration-200 transform hover:scale-95"
:style="{ backgroundImage: 'url(http://localhost:5555/files/' + cover + ')' }"
>
<div>
<p
class="text-3xl font-bold text-justify leading-7 mb-3"
:class="lightBg === 1 ? 'text-black':'text-white'"
>{{ $t(title) }}</p>
<p
class="text-lg italic text-justify leading-5"
:class="lightBg === 1 ? 'text-gray-900':'text-dark-900'"
>{{ $t(description) }}</p>
</div>
<div
class="flex justify-between mt-8"
:class="lightBg ? 'text-gray-900':'text-dark-900'"
>
<div>
<div>{{formatDate}}</div>
<div>{{reading_time}} {{ $t('post_reading_time') }}</div>
<div>{{likes}} </div>
</div>
<div class="self-end flex flex-wrap flex-col md:flex-row">
<div v-for="(tag) in tags"
class="my-1 md:my-0 ml-2 py-1 px-2 rounded font-semibold"
:class="lightBg ? 'bg-black text-white':'bg-white text-black'"
>
#{{ $t(tag) }}
</div>
</div>
</div>
</article>
</template>
<script>
export default {
name: "Post",
props: {
title: {
type: String,
default: "New Post's title "
},
description: {
type: String,
default: "New Post's description"
},
reading_time: {
type: Number,
default: 0
},
date: {
type: String,
default: "Today"
},
likes: {
type: Number,
default: 0
},
tags: {
type: Array,
default: () => ["Tag1", "Tag2", "Tag3"],
},
cover: {
type: String,
default: "default.png"
},
lightBg: {
type: Number,
default: false
}
},
computed: {
tagsSplit() {
return this.tags.keys
},
formatDate() {
const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sept", "Oct", "Nov", "Dec"
];
const date = new Date(this.date)
return date.getDate() + " " + monthNames[date.getMonth()] + " " + date.getFullYear()
},
}
}
</script>
<style scoped lang="scss">
.h-blog {
min-height: 20rem;
background-position: center;
background-size: cover;
@apply bg-opacity-50;
}
</style>

View File

@@ -1,33 +0,0 @@
<template>
<div class="mb-3 mr-3 p-1 md:p-2 h-48 w-48 border-gray-900 dark:border-dark-800 border-2 duration-300 rounded-3xl hover:bg-opacity-25" :class="'hover:bg-'+color+'-600'">
<div class="w-full h-full flex flex-col justify-center items-center">
<div>
<img class="rounded-full" alt="Skill Img" width="95" height="95" :src="'http://localhost:5555/files/' + cover">
</div>
<h1 class="md:text-xl text-lg font-bold text-center">{{ $t(skill) }}</h1>
</div>
</div>
</template>
<script>
export default {
name: "Skill",
props: {
skill: {
type: String,
default: "Rien"
},
color: {
type: String,
default: "red-100"
},
cover: {
type: String,
default: "logo.jpg"
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -1,46 +0,0 @@
<template>
<div class="p-1 md:p-2 h-64 w-64 border-gray-900 dark:border-dark-800 border-2 duration-300 rounded-3xl hover:bg-opacity-25 hover:scale-105 transform cursor-pointer" :class="'hover:bg-'+color+ '-600'">
<div class="w-full h-full flex flex-col justify-center items-center">
<div>
<img alt="Project Img" width="95" height="95" :src="'http://localhost:5555/files/' + cover">
</div>
<div class="text-center">
<h1 class="md:text-2xl text-lg font-bold">{{ $t(title) }}</h1>
<a :href="url" :class="'text-' + color + '-500'">{{ formatLink }}</a>
</div>
</div>
</div>
</template>
<script>
export default {
name: "Work",
props: {
title: {
type: String,
default: 'Title'
},
url: {
type: String,
default: 'https://arthurdanjou.fr'
},
cover: {
type: String,
default: 'default.png'
},
color: {
type: String,
default: 'white'
}
},
computed: {
formatLink() {
return this.url.replace('https://', '').replace('http://', '')
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,34 +0,0 @@
<template>
<div class="m-4 p-1 md:p-2 h-48 w-48 border-gray-900 dark:border-dark-800 border-2 duration-300 rounded-3xl hover:bg-opacity-25" :class="'hover:bg-'+color+'-600'">
<div class="w-full h-full flex flex-col justify-center items-center">
<div>
<img class="rounded-full" alt="Skill Img" width="95" height="95" :src="'http://localhost:5555/files/' + cover">
</div>
<h1 class="md:text-2xl text-lg font-bold">{{ $t(skill) }}</h1>
</div>
</div>
</template>
<script>
export default {
name: "WorkSkill",
props: {
skill: {
type: String,
default: "Rien"
},
color: {
type: String,
default: "red-100"
},
cover: {
type: String,
default: "logo.jpg"
}
}
}
</script>
<style scoped>
</style>