-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
53 lines (47 loc) · 1.07 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<template>
<NuxtPage />
</template>
<script setup>
var title = "Project CROW";
var description = "A series of mini-campaigns aiming to provide an introductory experience for beginners, who have played System Gateway and System Update 2021 by Null Signal Games.";
useHead({
title: title,
});
useSeoMeta({
title: title,
ogTitle: title,
description: description,
ogDescription: description,
ogImage: 'crow.png',
});
const { data, pending, error, refresh } = await useAsyncData(
'nrdbCardData',
() => $fetch('https://netrunnerdb.com/api/2.0/public/cards')
);
if (error.value) {
console.log("Error while fetching NRDB: ", error.value)
}
const cards = useState('cards', function () {
if(data.value) {
return data.value.data;
} else {
return [];
}
});
const imageUrlTemplate = useState('imageUrlTemplate', function () {
if(data.value) {
return data.value.imageUrlTemplate;
} else {
return "";
}
});
</script>
<style lang="scss">
p {
margin-bottom: 1rem;
text-align: justify;
}
.v-expansion-panels {
margin-bottom: 1rem;
}
</style>