[title].vue
3.81 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<script setup>
import Footer from '@/views/front-pages/front-page-footer.vue'
import Navbar from '@/views/front-pages/front-page-navbar.vue'
import { useConfigStore } from '@core/stores/config'
const breadCrumbItems = [
{
title: 'Help Center',
to: { name: 'front-pages-help-center' },
},
{ title: 'Buying and item support' },
{ title: 'Template kits' },
]
const store = useConfigStore()
store.skin = 'default'
definePage({
meta: {
layout: 'blank',
public: true,
},
})
const articleData = ref()
setTimeout(async () => {
const { data, error } = await useApi('/pages/help-center/article')
if (error.value)
console.log(error.value)
else
articleData.value = data.value
}, 1000)
</script>
<!-- eslint-disable vue/no-v-html -->
<template>
<!-- eslint-disable vue/no-v-html -->
<div class="bg-surface help-center-article">
<!-- 👉 Navbar -->
<Navbar />
<!-- 👉 Content -->
<VContainer>
<div
class="d-flex gap-6 flex-lg-row flex-column"
style=" margin-block: 9.25rem 5.25rem;"
>
<div>
<div>
<VBreadcrumbs
class="px-0 py-2 flex-wrap"
:items="breadCrumbItems"
>
<template #item="{ item, index }">
<div class="d-flex align-center">
<VIcon
size="20"
icon="ri-star-fill"
class="me-1"
:class="index === breadCrumbItems.length - 1 ? 'text-high-emphasis' : 'text-medium-emphasis'"
/>
<div
class="text-body-1"
:class="index === breadCrumbItems.length - 1 ? 'text-high-emphasis' : 'text-medium-emphasis'"
>
{{ item.title }}
</div>
</div>
</template>
</VBreadcrumbs>
<h4 class="text-h4 mb-2">
{{ articleData?.title }}
</h4>
<div class="text-body-1">
{{ articleData?.lastUpdated }}
</div>
</div>
<VDivider class="my-6" />
<div
class="mb-6"
v-html="articleData?.productContent"
/>
<VImg :src="articleData?.productImg" />
<p class="my-6 text-body-1">
{{ articleData?.checkoutContent }}
</p>
<VImg :src="articleData?.checkoutImg" />
</div>
<div style="min-inline-size: 300px;">
<VTextField
prepend-inner-icon="ri-search-line"
placeholder="Search..."
class="pt-2 mb-6"
/>
<div>
<!-- 👉 Article List -->
<h5
class="text-h5 px-4 py-2 mb-4 rounded"
style="background: rgba(var(--v-theme-on-surface), var(--v-hover-opacity));"
>
Articles in this section
</h5>
<VList class="card-list">
<VListItem
v-for="(item, index) in articleData?.articleList"
:key="index"
link
>
<template #append>
<VIcon
size="20"
icon="ri-arrow-right-s-line"
color="disabled"
/>
</template>
<VListItemTitle>
{{ item }}
</VListItemTitle>
</VListItem>
</VList>
</div>
</div>
</div>
</VContainer>
<!-- 👉 Footer -->
<Footer />
</div>
</template>
<style lang="scss" scoped>
.card-list {
--v-card-list-gap: 1rem;
}
.help-center-article {
@media (min-width: 600px) and (max-width: 960px) {
.v-container {
padding-inline: 2rem !important;
}
}
}
</style>