mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-14 12:14:42 +01:00
Import artapi in website
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -91,3 +91,6 @@ sw.*
|
||||
/build/
|
||||
|
||||
/dist/
|
||||
|
||||
# Local Netlify folder
|
||||
.netlify
|
||||
@@ -1,4 +1,4 @@
|
||||
export default {
|
||||
credentials: true,
|
||||
baseURL: 'http://localhost:5555/'
|
||||
baseURL: 'https://api.arthurdanjou.fr/'
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Axios, Head, ColorMode, Tailwind, Translation, Content } from './config'
|
||||
import { Axios, Head, ColorMode, Tailwind, Translation, Content, Netlify } from './config'
|
||||
|
||||
export default {
|
||||
head: Head,
|
||||
@@ -22,6 +22,7 @@ export default {
|
||||
'@nuxt/typescript-build',
|
||||
['@nuxtjs/tailwindcss', Tailwind],
|
||||
['@nuxtjs/color-mode', ColorMode],
|
||||
['@nuxtjs/netlify-files', Netlify]
|
||||
],
|
||||
|
||||
modules: [
|
||||
|
||||
@@ -126,12 +126,12 @@ export default {
|
||||
.catch(() => {
|
||||
error({ statusCode: 404, message: "Post not found" });
|
||||
});
|
||||
//const {data: likes} = await $axios.get(`posts/${params.slug}`)
|
||||
//const liked = 0 await $axios.get(`posts/is/${params.slug}`)
|
||||
const {data: likes} = await $axios.get(`posts/${params.slug}`)
|
||||
const liked = 0 await $axios.get(`posts/is/${params.slug}`)
|
||||
return {
|
||||
post,
|
||||
likes: 0,
|
||||
liked: true//liked.data !== 0
|
||||
likes,
|
||||
liked: liked.data !== 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -149,7 +149,7 @@ export default {
|
||||
}, 7000)
|
||||
},
|
||||
async handleLike() {
|
||||
/*if (this.liked) {
|
||||
if (this.liked) {
|
||||
const {data} = await this.$axios.post(`posts/${this.post.slug}/unlike`)
|
||||
if (data.code === 200) {
|
||||
this.liked = false
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
this.liked = true
|
||||
this.likes = data.post.likes
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="w-full lg:w-1/2 ml-5 ">
|
||||
<h1 class="text-xl lg:text-3xl font-bold">
|
||||
{{ $t(work.title) }}
|
||||
{{ work.title }}
|
||||
</h1>
|
||||
<p class="mt-5 mb-10 text-md lg:text-lg text-gray-900 dark:text-dark-100">
|
||||
{{ $t(work.description) }}
|
||||
|
||||
Reference in New Issue
Block a user