Skip to content

Commit 82a596b

Browse files
committed
removed release notes ping and fixed css calc
1 parent 6cf00f7 commit 82a596b

3 files changed

Lines changed: 36 additions & 36 deletions

File tree

components/front_page/ExampleCode.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<template>
22
<div class="example_code">
3-
<prism-editor v-model="example_code" class="my-editor" :highlight="highlighter" line-numbers readonly></prism-editor>
3+
<client-only>
4+
<prism-editor
5+
v-model="example_code"
6+
class="my-editor"
7+
:highlight="highlighter"
8+
line-numbers
9+
readonly
10+
/>
11+
</client-only>
412
</div>
513
</template>
614

pages/index.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ export default {
8282
CyclicToWork,
8383
GlobalLocations
8484
},
85-
async created(){
86-
// warmup cms
87-
await fetch('https://release-notes.cyclic.app/_healthcheck')
88-
}
8985
}
9086
</script>
9187

pages/updates.vue

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,42 @@
3030
<!--************ UPDATES ************-->
3131
<div class="col-span-1 xl:col-span-3 space-y-10">
3232
<div class="text-sm" v-if="loading">Loading updates...</div>
33-
<div
34-
v-for="update of updates"
35-
:key="update.key"
36-
class="space-y-6 border-b border-white/10 pb-6"
37-
>
38-
<div class="space-y-2">
39-
<div class="pb-2">
40-
<NuxtImg
41-
format="webp"
42-
loading="lazy"
43-
v-if="update.props.image"
44-
:src="update.props.image"
45-
:alt="update.props.title"
46-
class="w-96 h-auto rounded-xl"
47-
/>
33+
<div class="text-sm text-neutral-400" v-else-if="!updates.length">
34+
No updates are available right now.
35+
</div>
36+
<template v-else>
37+
<div
38+
v-for="update of updates"
39+
:key="update.key"
40+
class="space-y-6 border-b border-white/10 pb-6"
41+
>
42+
<div class="space-y-2">
43+
<div class="pb-2">
44+
<NuxtImg
45+
format="webp"
46+
loading="lazy"
47+
v-if="update.props.image"
48+
:src="update.props.image"
49+
:alt="update.props.title"
50+
class="w-96 h-auto rounded-xl"
51+
/>
52+
</div>
53+
<h3 class="text-3xl font-semibold">{{ update.props.title }}</h3>
54+
<p class="text-sky-500 text-sm">
55+
{{ new Date(update.props.published).toDateString() }}
56+
</p>
4857
</div>
49-
<h3 class="text-3xl font-semibold">{{ update.props.title }}</h3>
50-
<p class="text-sky-500 text-sm">
51-
{{ new Date(update.props.published).toDateString() }}
52-
</p>
53-
</div>
5458

55-
<div class="prose prose-lg prose-invert" v-html="$md.render(update.props.content || '')"></div>
56-
</div>
59+
<div class="prose prose-lg prose-invert" v-html="$md.render(update.props.content || '')"></div>
60+
</div>
61+
</template>
5762
</div>
5863
</div>
5964
</section>
6065
</template>
6166

6267
<script>
6368
export default {
64-
async created() {
65-
this.loading = true
66-
const data = await fetch('https://release-notes.cyclic.app/api/posts')
67-
.then(res => res.json())
68-
69-
this.updates = data
70-
this.loading = false
71-
},
72-
7369
data() {
7470
return {
7571
updates: [],

0 commit comments

Comments
 (0)