forked from bootstrap-vue/bootstrap-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththemes.vue
200 lines (190 loc) · 6.91 KB
/
themes.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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<template>
<b-container id="content" fluid="lg" tag="main" class="pb-5">
<section>
<header class="bd-content pb-4">
<h1>Custom themes and dashboards</h1>
<p class="lead">
With the themes and dashboards built by our partners, you can build eye-catching
apps and pages — all using BootstrapVue! The following items have been curated by
the BootstrapVue team.
</p>
</header>
<article v-if="!themes || themes.length === 0" class="bvd-theme text-center mb-5">
<b-card bg-varinatt="light">
<BvLogo class="mx-auto"></BvLogo>
<h2 class="display-4 font-weight-bold text-dark mt-3">Coming soon!</h2>
<p class="card-text">Themes will be coming in the near future.</p>
</b-card>
</article>
<article
v-for="(theme, idx) in themes"
:key="idx"
:aria-labelledby="`theme-label-${idx}`"
class="bvd-theme mb-5"
>
<b-card no-body bg-variant="light">
<b-row no-gutters>
<b-col
md="6"
lg="4"
xl="4"
class="bg-dark"
aria-hidden="true"
>
<b-aspect aspect="4:3" class="h-100 align-items-center">
<b-card-img-lazy
:src="theme.img"
alt="Image"
blank-width="800"
blank-height="600"
class="rounded-0"
></b-card-img-lazy>
</b-aspect>
</b-col>
<b-col class="d-flex flex-column p-4">
<!-- We use `<h2>` for correct semantics, but `.h5` style -->
<h2 :id="`theme-label-${idx}`" class="h5 mb-3">{{ theme.title }}</h2>
<b-card-text class="flex-grow-1">{{ theme.description }}</b-card-text>
<b-card-text class="text-muted small">
<span class="d-block d-lg-inline-block mb-2 mb-lg-0"><strong>Category:</strong> {{ theme.category }}</span>
<span class="d-block d-lg-inline-block ml-lg-3"><i><strong>Provided by:</strong> {{ theme.provider }}</i></span>
</b-card-text>
<b-card-text class="d-flex align-items-center">
<b-button :href="theme.href" target="_blank" variant="bd-primary">
Get {{ theme.type || 'theme' }}
</b-button>
<span v-if="theme.price" class="text-muted position-relative ml-3">
<strong>Price:</strong> {{ theme.price }}<b-link href="#theme-notes" title="See notes">*</b-link>
</span>
</b-card-text>
</b-col>
</b-row>
</b-card>
</article>
<aside id="theme-notes" class="text-muted mb-3" aria-labelledby="theme-notes-heading">
<h2 id="theme-notes-heading" class="h6">Notes:</h2>
<ul class="small">
<li>
Prices shown are in US dollars. Prices are subject to change. Refer to the
vendor/provider website for current pricing.
</li>
<li>
Theme licenses are typically per-site (unless onterwised noted). Refer to the theme
site documentation for licensing information.
</li>
<li>
BootstrapVue does not guarantee that all custom components provided by a theme are
WIA-ARIA compliant. Refer to the provider documentation for details.
</li>
<li>
BootstrapVue receives a commission on themes purchased via the above affiliate links.
</li>
<li>
Refer to the <b-link to="/docs/reference/theming">Theming section</b-link> for
details on incorporating custom theme SCSS files.
</li>
</ul>
</aside>
<aside id="theme-providers" class="text-muted" aria-labelledby="theme-provider-heading">
<h2 id="theme-provider-heading" class="h6">Are you a theme provider?</h2>
<p class="small mb-2">
If you are interested in being an affiliate and listing your theme or dashboard on this
page, your product must meet the following guidelines:
</p>
<ul class="small">
<li>It must be based on (or extends) BootstrapVue components.</li>
<li>
Must be be compatible with BootstrapVue so that users can incorporate native
BootstrapVue components if they wish.
</li>
<li>
Should avoid the need for jQuery or Bootstrap v4 JavaScript files (except for included
3<sup>rd</sup> party components if required).
</li>
<li>Should provide the source SCSS/SASS files/variables.</li>
<li>Should promote that it is based on (or compatible with) <i>BootstrapVue</i>.</li>
<li>
Custom components provided by the theme should be WAI-ARIA accessible. Any WAI-ARIA
limitations should be noted in the theme documeantation.
</li>
</ul>
</aside>
</section>
</b-container>
</template>
<script>
import BvLogo from '~/components/bv-logo'
export default {
components: { BvLogo },
async asyncData({ $content }) {
// Themes are stored as YAML files in `docs/content/themes`
// The theme preview image should be 800x400px (and 4:3 aspect ratio)
// Data structure:
// title: 'Superduper Dashboard - PRO'
// type: 'dashboard'
// category: 'Admin & Dashboard'
// img: 'https://picsum.photos/800/600/?image=84'
// href: '#'
// description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
// provider: 'Innovative Ivan'
// price: '$100.00'
const themes = await $content('themes').fetch()
return {
themes
}
},
head() {
const title = `${this.title} | BootstrapVue`
const description = 'BootstrapVue based premium themes and dashboards.'
return {
title,
meta: [
{
hid: 'og:title',
name: 'og:title',
property: 'og:title',
content: title
},
{
hid: 'og:description',
name: 'og:description',
property: 'og:description',
content: description
},
{
hid: 'description',
name: 'description',
content: description
}
]
}
},
computed: {
title() {
return 'Themes and dashboards'
}
}
}
</script>
<style lang="scss" scoped>
.bv-logo {
// BV Logo (SVG)
width: 280px;
height: 280px;
}
@media (max-width: 991px) {
// Shrink the display text a bit on smaller screens
// Only used if no themes are available
.display-4 {
font-size: 2.5rem;
}
}
.bvd-theme {
.card {
// Simple way to get rounded corners on the images
overflow: hidden;
// Add some shadow
box-shadow: 0 25px 20px -20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 0, 0, 0.06);
}
}
</style>