mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-02-05 14:48:00 +01:00
fix some detail
This commit is contained in:
@@ -10,16 +10,3 @@ img, svg {
|
|||||||
* {
|
* {
|
||||||
@apply select-none outline-none;
|
@apply select-none outline-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nuxt-content {
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
|
||||||
@apply text-black dark:text-white
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
@apply text-gray-900 dark:text-gray-900;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{{ $t(title) }}
|
{{ $t(title) }}
|
||||||
<slot />
|
<slot />
|
||||||
</h1>
|
</h1>
|
||||||
<p class="w-5/6 text-gray-900 dark:text-dark-900 text-justify">{{ $t(description) }}</p>
|
<p class="w-5/6 text-gray-900 dark:text-dark-900 text-justify duration-300">{{ $t(description) }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-10 arrow duration-300">
|
<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">
|
<svg class="inline icon" height="25" width="25" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
@@ -44,7 +44,13 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.home-link:hover .arrow {
|
.home-link:hover {
|
||||||
transform: translateX(15px);
|
p {
|
||||||
|
@apply dark:text-dark-200;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow {
|
||||||
|
transform: translateX(15px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<h1
|
<h1
|
||||||
class="mt-16 md:mt-32 font-bold text-4xl mr-2 inline mb-4 border-b-2 border-solid"
|
class="mt-16 md:mt-32 font-bold text-2xl md:text-4xl mr-2 inline mb-4 border-b-2 border-solid"
|
||||||
:class="' border-'+ color +'-400'"
|
:class="' border-'+ color +'-400'"
|
||||||
>
|
>
|
||||||
{{ $t(title) }}
|
{{ $t(title) }}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
{
|
{
|
||||||
"slug": "idemia",
|
"slug": "idemia",
|
||||||
"title": "experiences.idemia",
|
"title": "experiences.idemia",
|
||||||
"company": "Idemia",
|
"company": "Idemia, Courbevoie",
|
||||||
"location": "France",
|
"location": "France",
|
||||||
"begin_date": "06-2019",
|
"begin_date": "06-2019",
|
||||||
"end_date": "06-2019"
|
"end_date": "06-2019"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
{
|
{
|
||||||
"slug": "la-salle-a-manger",
|
"slug": "la-salle-a-manger",
|
||||||
"title": "experiences.lsam",
|
"title": "experiences.lsam",
|
||||||
"company": "La Salle à manger",
|
"company": "La Salle à manger, Boulogne Billancourt",
|
||||||
"location": "France",
|
"location": "France",
|
||||||
"begin_date": "04-2018",
|
"begin_date": "04-2018",
|
||||||
"end_date": "04-2018"
|
"end_date": "04-2018"
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<nuxt-content
|
<nuxt-content
|
||||||
:document="post"
|
:document="post"
|
||||||
class="prose prose-sm sm:prose lg:prose-lg xl:prose-2xl my-6 md:my-12"
|
class="my-6 md:my-12 prose prose-sm sm:prose lg:prose-lg xl:prose-xl prose-black dark:prose-dark-900"
|
||||||
/>
|
/>
|
||||||
<p class="mb-3">
|
<p class="mb-3">
|
||||||
{{ $t('blog.read.thanks') }}
|
{{ $t('blog.read.thanks') }}
|
||||||
@@ -105,12 +105,14 @@ export default {
|
|||||||
liked: false
|
liked: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async asyncData({ params, $content, app }) {
|
async asyncData({ params, $content, app, $axios }) {
|
||||||
const post = await $content(`articles/${app.i18n.locale}/`, params.slug).fetch()
|
const post = await $content(`articles/${app.i18n.locale}/`, params.slug).fetch()
|
||||||
const liked = false
|
const {data: likes} = await $axios.get(`posts/${params.slug}`)
|
||||||
|
const liked = await $axios.get(`posts/is/${params.slug}`)
|
||||||
return {
|
return {
|
||||||
post,
|
post,
|
||||||
liked: liked
|
likes,
|
||||||
|
liked: liked.data !== 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -123,13 +125,13 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleLike() {
|
async handleLike() {
|
||||||
if (this.liked) {
|
if (this.liked) {
|
||||||
const {data} = await this.$axios.get('/post/' + this.post.slug + '/unlike')
|
const {data} = await this.$axios.post(`posts/${this.post.slug}/unlike`)
|
||||||
if (data.code === 200) {
|
if (data.code === 200) {
|
||||||
this.liked = false
|
this.liked = false
|
||||||
this.likes = data.post.likes
|
this.likes = data.post.likes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const {data} = await this.$axios.get('/post/' + this.post.slug + '/like')
|
const {data} = await this.$axios.post(`posts/${this.post.slug}/like`)
|
||||||
if (data.code === 200) {
|
if (data.code === 200) {
|
||||||
this.liked = true
|
this.liked = true
|
||||||
this.likes = data.post.likes
|
this.likes = data.post.likes
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ module.exports = {
|
|||||||
'./nuxt.config.{js,ts}',
|
'./nuxt.config.{js,ts}',
|
||||||
],
|
],
|
||||||
presets: [],
|
presets: [],
|
||||||
darkMode: 'class', // or 'media' or 'class'
|
darkMode: 'class',
|
||||||
theme: {
|
theme: {
|
||||||
screens: {
|
screens: {
|
||||||
sm: '640px',
|
sm: '640px',
|
||||||
@@ -831,6 +831,7 @@ module.exports = {
|
|||||||
placeholderOpacity: ['responsive', 'focus'],
|
placeholderOpacity: ['responsive', 'focus'],
|
||||||
pointerEvents: ['responsive'],
|
pointerEvents: ['responsive'],
|
||||||
position: ['responsive'],
|
position: ['responsive'],
|
||||||
|
prose: ['dark'],
|
||||||
resize: ['responsive'],
|
resize: ['responsive'],
|
||||||
ringColor: ['responsive', 'dark', 'focus-within', 'focus'],
|
ringColor: ['responsive', 'dark', 'focus-within', 'focus'],
|
||||||
ringOffsetColor: ['responsive', 'dark', 'focus-within', 'focus'],
|
ringOffsetColor: ['responsive', 'dark', 'focus-within', 'focus'],
|
||||||
|
|||||||
Reference in New Issue
Block a user