diff --git a/assets/css/style.scss b/assets/css/style.scss index 6fdfcdd..4fb7b50 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -10,16 +10,3 @@ img, svg { * { @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; - } - -} - diff --git a/components/HomeLink.vue b/components/HomeLink.vue index bfac217..f99db31 100644 --- a/components/HomeLink.vue +++ b/components/HomeLink.vue @@ -8,7 +8,7 @@ {{ $t(title) }} -

{{ $t(description) }}

+

{{ $t(description) }}

@@ -44,7 +44,13 @@ export default { diff --git a/components/PageTitle.vue b/components/PageTitle.vue index 140a229..81b3abd 100644 --- a/components/PageTitle.vue +++ b/components/PageTitle.vue @@ -1,6 +1,6 @@

{{ $t(title) }} diff --git a/content/experiences.json b/content/experiences.json index 3e1018a..426e1ab 100644 --- a/content/experiences.json +++ b/content/experiences.json @@ -18,7 +18,7 @@ { "slug": "idemia", "title": "experiences.idemia", - "company": "Idemia", + "company": "Idemia, Courbevoie", "location": "France", "begin_date": "06-2019", "end_date": "06-2019" @@ -26,7 +26,7 @@ { "slug": "la-salle-a-manger", "title": "experiences.lsam", - "company": "La Salle à manger", + "company": "La Salle à manger, Boulogne Billancourt", "location": "France", "begin_date": "04-2018", "end_date": "04-2018" diff --git a/pages/blog/_slug.vue b/pages/blog/_slug.vue index 92ac8ef..661215d 100644 --- a/pages/blog/_slug.vue +++ b/pages/blog/_slug.vue @@ -45,7 +45,7 @@

{{ $t('blog.read.thanks') }} @@ -105,12 +105,14 @@ export default { 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 liked = false + const {data: likes} = await $axios.get(`posts/${params.slug}`) + const liked = await $axios.get(`posts/is/${params.slug}`) return { post, - liked: liked + likes, + liked: liked.data !== 0 } }, methods: { @@ -123,13 +125,13 @@ export default { }, async handleLike() { 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) { this.liked = false this.likes = data.post.likes } } 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) { this.liked = true this.likes = data.post.likes diff --git a/tailwind.config.js b/tailwind.config.js index 93cbe4c..7ed7668 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -9,7 +9,7 @@ module.exports = { './nuxt.config.{js,ts}', ], presets: [], - darkMode: 'class', // or 'media' or 'class' + darkMode: 'class', theme: { screens: { sm: '640px', @@ -831,6 +831,7 @@ module.exports = { placeholderOpacity: ['responsive', 'focus'], pointerEvents: ['responsive'], position: ['responsive'], + prose: ['dark'], resize: ['responsive'], ringColor: ['responsive', 'dark', 'focus-within', 'focus'], ringOffsetColor: ['responsive', 'dark', 'focus-within', 'focus'],