Skip to content

Commit 4230749

Browse files
finished landing page
1 parent a655af1 commit 4230749

3 files changed

Lines changed: 70 additions & 35 deletions

File tree

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,17 @@
11
<template>
2-
<div ref="container" :style="{ transition: 'transform 0.1s ease-in-out' }" @mousemove="onMouseMove($event)" @mouseleave="onMouseLeave()">
3-
<v-card class="text-center">
4-
<v-icon color="primary" icon="mdi-cloud-outline" size="50" />
2+
<div
3+
v-tilt-effect
4+
class="h-100"
5+
>
6+
<v-card class="text-center h-100">
7+
<v-icon color="primary" :icon="icon" size="50" />
58

6-
<p class="text-h5 font-weight-bold mt-4 mb-1 text-no-wrap">
7-
Cloud-Native Architecture
8-
</p>
9-
<p class="text-body-1 text-accent">
10-
Built for the cloud with support for all major cloud providers and on-premise deployments.
11-
</p>
9+
<p class="text-h5 font-weight-bold mt-4 mb-1 text-no-wrap" v-text="title" />
10+
<p class="text-body-1 text-accent" v-text="description" />
1211
</v-card>
1312
</div>
1413
</template>
1514

1615
<script setup lang="ts">
17-
const container = ref<HTMLElement | null>(null)
18-
19-
function onMouseMove(e: MouseEvent) {
20-
const rect = container.value!.getBoundingClientRect()
21-
const x = e.clientX - rect.left
22-
const y = e.clientY - rect.top
23-
24-
const centerX = rect.width / 2
25-
const centerY = rect.height / 2
26-
27-
const rotateX = (y - centerY) / 10
28-
const rotateY = (centerX - x) / 10
29-
30-
container.value!.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateY(-10px)`
31-
}
32-
33-
function onMouseLeave() {
34-
container.value!.style.transform = `perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(0px)`
35-
}
16+
defineProps<{ icon: string, title: string, description: string }>()
3617
</script>

frontend/kubecloud-v2/components/home/HomeFeatureSection.vue

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,44 @@
1010
</div>
1111

1212
<VRow>
13-
<VCol v-for="i in 6" :key="i" cols="4">
14-
<FeatureCard />
13+
<VCol v-for="feature in features" :key="feature.title" cols="4">
14+
<FeatureCard v-bind="feature" />
1515
</VCol>
1616
</VRow>
1717
</v-container>
1818
</template>
1919

2020
<script setup lang="ts">
21-
// defineProps<{
22-
// title: string
23-
// description: string
24-
// icon: string
25-
// }>()
21+
const features = [
22+
{
23+
icon: "mdi-cloud-outline",
24+
title: "Cloud-Native Architecture",
25+
description: "Built for the cloud with support for all major cloud providers and on-premise deployments.",
26+
},
27+
{
28+
icon: "mdi-shield-check-outline",
29+
title: "Enterprise Security",
30+
description: "Advanced security features including RBAC, network policies, and compliance monitoring.",
31+
},
32+
{
33+
icon: "mdi-chart-line",
34+
title: "Real-time Monitoring",
35+
description: "Comprehensive monitoring and alerting with detailed metrics and performance insights.",
36+
},
37+
{
38+
icon: "mdi-rocket-launch-outline",
39+
title: "One-Click Deployments",
40+
description: "Streamlined deployment process with automated CI/CD pipelines and rollback capabilities.",
41+
},
42+
{
43+
icon: "mdi-account-group-outline",
44+
title: "Team Collaboration",
45+
description: "Built-in collaboration tools for teams with role-based access and shared workspaces.",
46+
},
47+
{
48+
icon: "mdi-cog-outline",
49+
title: "Advanced Configuration",
50+
description: "Flexible configuration management with support for Helm charts and custom resources.",
51+
},
52+
]
2653
</script>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
export default defineNuxtPlugin((nuxtApp) => {
2+
nuxtApp.vueApp.directive("tilt-effect", {
3+
mounted(el: HTMLElement) {
4+
el.onmousemove = (e: MouseEvent) => {
5+
const rect = el.getBoundingClientRect()
6+
const x = e.clientX - rect.left
7+
const y = e.clientY - rect.top
8+
9+
const centerX = rect.width / 2
10+
const centerY = rect.height / 2
11+
12+
const rotateX = (y - centerY) / 10
13+
const rotateY = (centerX - x) / 10
14+
15+
el.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateY(-10px)`
16+
}
17+
18+
el.onmouseleave = () => {
19+
el.style.transform = `perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(0px)`
20+
}
21+
},
22+
unmounted(el: HTMLElement) {
23+
el.onmousemove = null
24+
el.onmouseleave = null
25+
},
26+
})
27+
})

0 commit comments

Comments
 (0)