mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-14 12:14:42 +01:00
Fixing the invisibles posts
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
import {defineNuxtConfig} from "@nuxtjs/composition-api";
|
|
||||||
import {NuxtConfig} from "@nuxt/types";
|
|
||||||
import head from './settings/Head'
|
import head from './settings/Head'
|
||||||
import buildModules from './settings/BuildModules'
|
import buildModules from './settings/BuildModules'
|
||||||
import modules from './settings/Modules'
|
import modules from './settings/Modules'
|
||||||
@@ -9,7 +7,7 @@ import plugins from './settings/Plugins'
|
|||||||
import css from './settings/Style'
|
import css from './settings/Style'
|
||||||
import configs from './settings/RuntimeConfig'
|
import configs from './settings/RuntimeConfig'
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default {
|
||||||
head,
|
head,
|
||||||
modules,
|
modules,
|
||||||
...arch,
|
...arch,
|
||||||
@@ -18,4 +16,4 @@ export default defineNuxtConfig({
|
|||||||
css,
|
css,
|
||||||
buildModules,
|
buildModules,
|
||||||
...configs
|
...configs
|
||||||
} as NuxtConfig)
|
}
|
||||||
|
|||||||
@@ -11,24 +11,23 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/content": "^1.14.0",
|
"@nuxt/content": "^1.14.0",
|
||||||
"@nuxtjs/axios": "^5.13.1",
|
"@nuxtjs/axios": "^5.13.1",
|
||||||
"@nuxtjs/composition-api": "^0.22.4",
|
"@nuxtjs/composition-api": "0.22.4",
|
||||||
"@nuxtjs/dotenv": "^1.4.1",
|
"@nuxtjs/dotenv": "^1.4.1",
|
||||||
"@nuxtjs/redirect-module": "^0.3.1",
|
"@nuxtjs/redirect-module": "^0.3.1",
|
||||||
"@nuxtjs/robots": "^2.5.0",
|
"@nuxtjs/robots": "^2.5.0",
|
||||||
"@nuxtjs/sitemap": "^2.4.0",
|
"@nuxtjs/sitemap": "^2.4.0",
|
||||||
"@nuxtjs/universal-storage": "^0.5.9",
|
"@nuxtjs/universal-storage": "^0.5.9",
|
||||||
"core-js": "^3.10.1",
|
"core-js": "^3.10.2",
|
||||||
"nuxt": "^2.15.4",
|
"nuxt": "^2.15.4",
|
||||||
"nuxt-i18n": "^6.25.0",
|
"nuxt-i18n": "^6.25.0",
|
||||||
"prism-themes": "^1.6.0",
|
"prism-themes": "^1.6.0",
|
||||||
"sass": "^1.32.9",
|
"sass": "^1.32.11",
|
||||||
"windicss": "^2.5.14"
|
"windicss": "^2.5.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxt/types": "^2.15.4",
|
"@nuxt/types": "^2.15.4",
|
||||||
"@nuxt/typescript-build": "^2.1.0",
|
"@nuxt/typescript-build": "^2.1.0",
|
||||||
"@nuxtjs/color-mode": "^2.0.5",
|
"@nuxtjs/color-mode": "^2.0.5",
|
||||||
"nuxt-vite": "^0.0.36",
|
|
||||||
"nuxt-windicss": "^0.5.4",
|
"nuxt-windicss": "^0.5.4",
|
||||||
"sass-loader": "10.1.1"
|
"sass-loader": "10.1.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,16 +32,9 @@ const windicss = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const vite = {
|
|
||||||
vue: {
|
|
||||||
jsx: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
'@nuxt/typescript-build',
|
'@nuxt/typescript-build',
|
||||||
'@nuxtjs/composition-api',
|
'@nuxtjs/composition-api',
|
||||||
['nuxt-windicss', windicss],
|
['nuxt-windicss', windicss],
|
||||||
//['nuxt-vite', vite],
|
|
||||||
['@nuxtjs/color-mode', color_mode],
|
['@nuxtjs/color-mode', color_mode],
|
||||||
] as NuxtOptionsModule[]
|
] as NuxtOptionsModule[]
|
||||||
|
|||||||
@@ -20,10 +20,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {useAsync, useContext} from "@nuxtjs/composition-api";
|
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
|
||||||
import {InfoData} from "../../@types/types";
|
import {InfoData} from "../../@types/types";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "AboutPreview",
|
name: "AboutPreview",
|
||||||
setup() {
|
setup() {
|
||||||
const {$content} = useContext()
|
const {$content} = useContext()
|
||||||
@@ -35,5 +35,5 @@ export default {
|
|||||||
info
|
info
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {computed} from "@nuxtjs/composition-api";
|
import {computed, defineComponent} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
interface AdProps {
|
interface AdProps {
|
||||||
color: string
|
color: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "Ad",
|
name: "Ad",
|
||||||
props: {
|
props: {
|
||||||
color: {
|
color: {
|
||||||
@@ -35,5 +35,5 @@ export default {
|
|||||||
getColor
|
getColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -21,6 +21,3 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -67,10 +67,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {computed, ref, useContext} from "@nuxtjs/composition-api";
|
import {computed, defineComponent, ref, useContext} from "@nuxtjs/composition-api";
|
||||||
import {Form} from "../../@types/types";
|
import {Form} from "../../@types/types";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "ContactForm",
|
name: "ContactForm",
|
||||||
setup() {
|
setup() {
|
||||||
const error = ref(false)
|
const error = ref(false)
|
||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
handleForm
|
handleForm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {computed, useContext} from "@nuxtjs/composition-api";
|
import {computed, defineComponent, useContext} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
interface ExperienceProps {
|
interface ExperienceProps {
|
||||||
title: string,
|
title: string,
|
||||||
@@ -26,7 +26,7 @@ interface ExperienceProps {
|
|||||||
end: string
|
end: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "Experience",
|
name: "Experience",
|
||||||
props: {
|
props: {
|
||||||
title: {
|
title: {
|
||||||
@@ -71,7 +71,7 @@ export default {
|
|||||||
isSameDate
|
isSameDate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {useAsync, useContext} from "@nuxtjs/composition-api";
|
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
|
||||||
import {Experience} from "../../@types/types";
|
import {Experience} from "../../@types/types";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "ExperiencesAbout",
|
name: "ExperiencesAbout",
|
||||||
setup() {
|
setup() {
|
||||||
const {$content} = useContext()
|
const {$content} = useContext()
|
||||||
@@ -36,7 +36,7 @@ export default {
|
|||||||
experiences
|
experiences
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -47,9 +47,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {computed, ref, useContext} from "@nuxtjs/composition-api";
|
import {computed, defineComponent, ref, useContext} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "Footer",
|
name: "Footer",
|
||||||
setup() {
|
setup() {
|
||||||
const {$colorMode} = useContext()
|
const {$colorMode} = useContext()
|
||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
isDarkMode
|
isDarkMode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {computed, useContext} from "@nuxtjs/composition-api";
|
import {computed, defineComponent, useContext} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
interface FormationProps {
|
interface FormationProps {
|
||||||
title: string,
|
title: string,
|
||||||
@@ -25,7 +25,7 @@ interface FormationProps {
|
|||||||
end: string
|
end: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "Formation",
|
name: "Formation",
|
||||||
props: {
|
props: {
|
||||||
title: {
|
title: {
|
||||||
@@ -65,7 +65,7 @@ export default {
|
|||||||
getEndDate
|
getEndDate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {useAsync, useContext} from "@nuxtjs/composition-api";
|
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
|
||||||
import {Formation} from "../../@types/types";
|
import {Formation} from "../../@types/types";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "FormationsHome",
|
name: "FormationsHome",
|
||||||
setup() {
|
setup() {
|
||||||
const {$content} = useContext()
|
const {$content} = useContext()
|
||||||
@@ -36,7 +36,7 @@ export default {
|
|||||||
formations
|
formations
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -107,9 +107,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {onMounted, onUnmounted, ref, useAsync, useContext, useRouter} from "@nuxtjs/composition-api";
|
import {defineComponent, onMounted, onUnmounted, ref, useAsync, useContext, useRouter} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "Header",
|
name: "Header",
|
||||||
setup() {
|
setup() {
|
||||||
const {$colorMode} = useContext()
|
const {$colorMode} = useContext()
|
||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
changeLanguage
|
changeLanguage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {computed, useContext} from "@nuxtjs/composition-api";
|
import {computed, defineComponent, useContext} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
interface PostProps {
|
interface PostProps {
|
||||||
title: string,
|
title: string,
|
||||||
@@ -36,7 +36,7 @@ interface PostProps {
|
|||||||
reading_time: number
|
reading_time: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "Post",
|
name: "Post",
|
||||||
props: {
|
props: {
|
||||||
title: {
|
title: {
|
||||||
@@ -82,7 +82,7 @@ export default {
|
|||||||
formatDate
|
formatDate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -30,29 +30,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {useAsync, useContext} from "@nuxtjs/composition-api";
|
import {defineComponent} from "@nuxtjs/composition-api";
|
||||||
import {Post} from "../../@types/types";
|
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "PostsHome",
|
name: "PostsHome",
|
||||||
setup() {
|
props: {
|
||||||
const { $content, i18n } = useContext()
|
posts: {
|
||||||
|
default: () => [],
|
||||||
const posts = useAsync(() => {
|
|
||||||
return $content(`articles/${i18n.locale}`)
|
|
||||||
.sortBy('date', 'asc')
|
|
||||||
.limit(3)
|
|
||||||
.fetch<Post>()
|
|
||||||
})
|
|
||||||
|
|
||||||
const debug = () => {
|
|
||||||
console.log(posts)
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
posts,
|
|
||||||
debug
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {computed} from "@nuxtjs/composition-api";
|
import {computed, defineComponent} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
interface ProjectProp {
|
interface ProjectProp {
|
||||||
title: string,
|
title: string,
|
||||||
@@ -30,7 +30,7 @@ interface ProjectProp {
|
|||||||
url: string,
|
url: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "Project",
|
name: "Project",
|
||||||
props: {
|
props: {
|
||||||
title: {
|
title: {
|
||||||
@@ -61,7 +61,7 @@ export default {
|
|||||||
getCover
|
getCover
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -28,28 +28,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {useAsync, useContext} from "@nuxtjs/composition-api";
|
import {defineComponent} from "@nuxtjs/composition-api";
|
||||||
import {Project} from "../../@types/types";
|
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "ProjectsHome",
|
name: "ProjectsHome",
|
||||||
setup() {
|
props: {
|
||||||
const { $content } = useContext()
|
projects: {
|
||||||
|
default: () => [],
|
||||||
const projects = useAsync(() => {
|
|
||||||
return $content(`projects`)
|
|
||||||
.limit(3)
|
|
||||||
.fetch<Project>()
|
|
||||||
})
|
|
||||||
|
|
||||||
const debug = () => {
|
|
||||||
console.log(projects)
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
projects,
|
|
||||||
debug
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {computed} from '@nuxtjs/composition-api'
|
import {computed, defineComponent} from '@nuxtjs/composition-api'
|
||||||
|
|
||||||
interface SkillProps {
|
interface SkillProps {
|
||||||
skill: string,
|
skill: string,
|
||||||
@@ -18,7 +18,7 @@ interface SkillProps {
|
|||||||
cover: string
|
cover: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "Skill",
|
name: "Skill",
|
||||||
props: {
|
props: {
|
||||||
skill: {
|
skill: {
|
||||||
@@ -70,5 +70,5 @@ export default {
|
|||||||
getCoverLink
|
getCoverLink
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {useAsync, useContext} from "@nuxtjs/composition-api";
|
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
|
||||||
import {Skill} from "../../@types/types";
|
import {Skill} from "../../@types/types";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "SkillsAbout",
|
name: "SkillsAbout",
|
||||||
setup() {
|
setup() {
|
||||||
const {$content} = useContext()
|
const {$content} = useContext()
|
||||||
@@ -35,5 +35,5 @@ export default {
|
|||||||
skills
|
skills
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
import {defineComponent} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
name: "TagPreview",
|
name: "TagPreview",
|
||||||
props: {
|
props: {
|
||||||
content: {
|
content: {
|
||||||
@@ -20,5 +22,5 @@ export default {
|
|||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -42,10 +42,10 @@
|
|||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import {useRouter} from "@nuxtjs/composition-api";
|
import {defineComponent, useRouter} from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "error",
|
name: "error",
|
||||||
props: ['error'],
|
props: ['error'],
|
||||||
head: {
|
head: {
|
||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
|
|
||||||
return {next}
|
return {next}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -37,10 +37,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {useAsync, useContext} from "@nuxtjs/composition-api";
|
import {defineComponent, useAsync, useContext} from "@nuxtjs/composition-api";
|
||||||
import {Post} from "../../../@types/types";
|
import {Post} from "../../../@types/types";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "blog",
|
name: "blog",
|
||||||
head() {
|
head() {
|
||||||
return {
|
return {
|
||||||
@@ -61,5 +61,5 @@ export default {
|
|||||||
posts,
|
posts,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,20 +2,43 @@
|
|||||||
<main>
|
<main>
|
||||||
<Banner />
|
<Banner />
|
||||||
<AboutHome />
|
<AboutHome />
|
||||||
<PostsHome />
|
<PostsHome :posts="posts"/>
|
||||||
<ProjectsHome />
|
<ProjectsHome :projects="projects"/>
|
||||||
<AdHome />
|
<AdHome />
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
import {useAsync, useContext} from "@nuxtjs/composition-api";
|
||||||
|
import {Post, Project} from "../../@types/types";
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
head() {
|
head() {
|
||||||
return {
|
return {
|
||||||
title: 'Arthur Danjou - FullStack Web & Software Developer'
|
title: 'Arthur Danjou - FullStack Web & Software Developer'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
const { $content, i18n } = useContext()
|
||||||
|
|
||||||
|
const projects = useAsync(() => {
|
||||||
|
return $content(`projects`)
|
||||||
|
.limit(3)
|
||||||
|
.fetch<Project>()
|
||||||
|
})
|
||||||
|
|
||||||
|
const posts = useAsync(() => {
|
||||||
|
return $content(`articles/${i18n.locale}`)
|
||||||
|
.sortBy('date', 'asc')
|
||||||
|
.limit(3)
|
||||||
|
.fetch<Post>()
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
posts,
|
||||||
|
projects
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user