Skip to content

Commit cfead0b

Browse files
committed
Draft of new Cloud call-out/block
1 parent 860bb8c commit cfead0b

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

docs/.vuepress/components/Cloud.vue

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<template>
2+
<a class="cloud-cta" :href="url" target="_blank" rel="noopener">
3+
<div class="title">
4+
{{ title }}
5+
</div>
6+
<slot>
7+
<p>Meet our our new scalable hosting platform, designed just for Craft.</p>
8+
</slot>
9+
<div class="actions">
10+
<span class="action-text">{{ actionLabel }}</span><span class="action-arrow">&rarr;</span>
11+
</div>
12+
</a>
13+
</template>
14+
15+
<script>
16+
const CLOUD_URL = 'https://craftcms.com/cloud';
17+
18+
export default {
19+
props: {
20+
title: {
21+
type: String,
22+
default: 'Craft Cloud',
23+
},
24+
actionLabel: {
25+
type: String,
26+
default: 'Learn more',
27+
}
28+
},
29+
computed: {
30+
url() {
31+
return CLOUD_URL;
32+
},
33+
},
34+
};
35+
</script>
36+
37+
<style lang="postcss" scoped>
38+
.cloud-cta {
39+
/* As similar to `custom-block` as possible! */
40+
@apply p-5 rounded overflow-hidden relative;
41+
background-image: linear-gradient(120deg, rgba(226, 190, 254, 0.3) 20%, rgba(147, 197, 253, 0.3) 90%);
42+
border: 1px solid rgba(175, 175, 175, 0.25);
43+
box-shadow: 0 6px 10px rgba(175, 175, 175, 0.15);
44+
color: inherit;
45+
display: block;
46+
margin: 1rem 0;
47+
position: relative;
48+
text-decoration: none;
49+
50+
&:hover {
51+
text-decoration: none;
52+
}
53+
}
54+
55+
.title {
56+
@apply font-bold
57+
}
58+
59+
.actions {
60+
@apply text-xs font-bold tracking-wider uppercase flex text-blue;
61+
62+
.theme-dark & {
63+
@apply text-white;
64+
}
65+
}
66+
67+
.action-arrow {
68+
@apply ml-2;
69+
transform: translateX(0);
70+
transition: 0.15s ease-out transform;
71+
72+
.cloud-cta:hover & {
73+
transform: translateX(3px);
74+
}
75+
}
76+
</style>

0 commit comments

Comments
 (0)