1
1
<template >
2
- <div class =" fixed right-0 top-0 z-40 w-screen h-screen" >
2
+ <Header />
3
+ <HeroSection />
4
+ <Roadmap />
5
+ <div v-if =" content" :class =" ['fixed top-0 h-screen', sidebarClass]" >
3
6
<div
4
- v-if =" content"
5
- class =" right-0 top-0 flex h-full w-full overflow-y-auto flex-col items-center bg-white p-4 focus:outline-0 sm:p-6"
7
+ class =" top-0 flex h-full w-full overflow-y-auto flex-col items-center bg-white p-4 focus:outline-0 sm:p-6"
6
8
>
7
9
<ContentRenderer :key =" content._id" :value =" content" >
8
- <ContentRendererMarkdown class =" flex flex-col gap-3 text-black m:max-w-[800px] sm:max-w-[600px]" :value =" content" />
10
+ <ContentRendererMarkdown class =" flex flex-col gap-3 text-black w-full m:max-w-[800px] sm:max-w-[600px]" :value =" content" />
9
11
<div class =" flex flex-col items-start w-full m:max-w-[800px] sm:max-w-[600px]" >
10
12
<h4 id =" related-content" class =" text-black mb-3" >
11
13
<a href =" #related-content" >Contenido Extra Relacionado</a >
12
14
</h4 >
13
- <a
14
- class =" text-black mb-1"
15
+ <Card
16
+ moreTransparency
17
+ class =" gap-x-2 mb-1"
15
18
v-for =" (link, i) in content.data.externalLinks"
16
19
:key =" i"
17
20
:href =" link.link"
18
21
>
19
- <span v-if =" link.english" >[Contenido en Ingles]</span >
22
+ <strong v-if =" link.english" >[Contenido en Ingles]</strong >
20
23
{{link.name}}
21
- </a >
24
+ </Card >
22
25
</div >
23
26
</ContentRenderer >
24
27
</div >
25
28
</div >
26
- <Header />
27
- <HeroSection />
28
- <Roadmap />
29
29
</template >
30
30
31
31
<script setup>
@@ -40,9 +40,11 @@ const showSidebar = ref(true)
40
40
const content = ref (null )
41
41
42
42
onMounted (async () => {
43
- content . value = await queryContent ( nodeId). findOne ()
44
- console . log (content )
45
-
46
- showSidebar .value = content && (route .query .fromClick || false )
43
+ if ( ! nodeId) return
44
+ const contentResult = await queryContent ( nodeId . join ( " / " )). findOne ( )
45
+ content . value = contentResult
46
+ showSidebar .value = contentResult && (route .query .fromClick || false )
47
47
})
48
+
49
+ const sidebarClass = computed (() => showSidebar ? ' right-0' : ' ' )
48
50
</script >
0 commit comments