Skip to content

Commit 407acbb

Browse files
committed
feat: signup page and card setup
1 parent 9d2fb43 commit 407acbb

File tree

3 files changed

+156
-0
lines changed

3 files changed

+156
-0
lines changed

components/signup-card.vue

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<template>
2+
<div
3+
class="signup-card"
4+
:style="cardStyles">
5+
<div class="content">
6+
7+
<img v-if="type !== 'vertical' && image" :src="image" class="image" />
8+
9+
<div v-if="type !== 'logo'" class="text">
10+
11+
<PieChartIcon />
12+
13+
<div v-if="title" class="title">
14+
{{ title }}
15+
</div>
16+
17+
<div v-if="description" class="description">
18+
{{ description }}
19+
</div>
20+
21+
</div>
22+
23+
</div>
24+
</div>
25+
</template>
26+
27+
<script setup>
28+
// ===================================================================== Imports
29+
const PieChartIcon = resolveComponent('icon/pie-chart-icon')
30+
31+
// ======================================================================= Props
32+
const props = defineProps({
33+
signupCard: {
34+
type: Object,
35+
required: true,
36+
default: () => ({})
37+
}
38+
})
39+
40+
// ==================================================================== Computed
41+
const title = computed(() => { return props.signupCard.title })
42+
43+
const description = computed(() => { return props.signupCard.description })
44+
45+
const cardStyles = computed(() => {
46+
if (props.signupCard.borderGradientAngle) {
47+
return { '--border-gradient-angle': props.signupCard.borderGradientAngle }
48+
}
49+
return null
50+
})
51+
52+
53+
</script>
54+
55+
<style lang="scss" scoped>
56+
// ///////////////////////////////////////////////////////////////////// General
57+
.signup-card {
58+
--border-gradient-angle: 0deg;
59+
@include cardPanel(var(--border-gradient-angle));
60+
}
61+
62+
.signup-card {
63+
padding: toRem(30) toRem(24);
64+
.content {
65+
position: relative;
66+
z-index: 2;
67+
}
68+
.icon {
69+
margin-bottom: toRem(45);
70+
}
71+
.title {
72+
@include h3;
73+
color: $sageGreen;
74+
margin-bottom: toRem(25);
75+
}
76+
.description {
77+
@include p2;
78+
margin-bottom: toRem(22);
79+
}
80+
}
81+
</style>

content/core/signup.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"seo": {
3+
"title": "Singularity",
4+
"description": ""
5+
},
6+
"og": {
7+
"site_name": "Singularity",
8+
"url": "",
9+
"type": "website",
10+
"image": "/images/open-graph.png"
11+
},
12+
"page_content": [
13+
{
14+
"signup_card": {
15+
"title": "Register for Singularity app preview",
16+
"description": "With Singularity, we aim to revolutionize your data management experience with our comprehensive tool, adept at handling PiB scale data effortlessly. We're crafting an intuitive drag-and-drop interface. Stay updated and be among the first to know when the Singularity app launches in the upcoming months. Meanwhile, explore more on our website.",
17+
"borderGradientAngle": "315deg"
18+
}
19+
}
20+
]
21+
}

pages/signup.vue

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<template>
2+
<main :class="[`page page-${tag}`]">
3+
<div class="grid-center">
4+
<div class="col-8">
5+
6+
<SignupCard :signup-card="content.signup_card" />
7+
8+
</div>
9+
</div>
10+
</main>
11+
</template>
12+
13+
<script setup>
14+
import SignupCard from '@/components/signup-card'
15+
16+
// ======================================================================== Data
17+
const tag = 'signup'
18+
const { data } = await useAsyncData( async () => {
19+
return queryContent('core').find()
20+
})
21+
22+
// ==================================================================== Computed
23+
const content = computed(() => {
24+
const signup = data._rawValue.find((item) => item._file === 'core/signup.json')
25+
return signup.page_content[0]
26+
})
27+
28+
// eslint-disable-next-line no-console
29+
console.log('content ', content)
30+
31+
</script>
32+
33+
<style lang="scss" scoped>
34+
// ///////////////////////////////////////////////////////////////////// General
35+
.page {
36+
flex: 1;
37+
display: flex;
38+
flex-direction: column;
39+
justify-content: center;
40+
align-items: center;
41+
}
42+
43+
.top {
44+
display: flex;
45+
flex-direction: row;
46+
align-items: center;
47+
margin-bottom: 2rem;
48+
}
49+
50+
.logo {
51+
width: 3rem;
52+
margin-right: 1rem;
53+
}
54+
</style>

0 commit comments

Comments
 (0)