add landing

This commit is contained in:
Emily
2024-06-02 02:46:47 +02:00
parent f8ab046b8a
commit d7bff30808
104 changed files with 73142 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<script lang="ts" setup>
type Props = {
options: { label: string }[],
currentIndex: number
}
const props = defineProps<Props>();
const emits = defineEmits<{
(evt: 'changeIndex', newIndex: number): void;
}>();
</script>
<template>
<div class="flex gap-2 border-[1px] border-gray-400 px-2 py-2 rounded-xl">
<div @click="$emit('changeIndex', index)" v-for="(opt, index) of options"
class="hover:bg-white/10 select-btn-animated cursor-pointer px-3 py-1 rounded-lg poppins font-semibold"
:class="{
'bg-accent hover:!bg-accent': currentIndex == index,
}">
{{ opt.label }}
</div>
</div>
</template>
<style scoped lang="scss">
.select-btn-animated {
transition: all .4s linear;
}
</style>

View File

@@ -0,0 +1,108 @@
<script lang="ts" setup>
type Props = {
size: number,
spacing: number,
opacity: string
}
const props = defineProps<Props>();
const sizeArr = new Array(props.size).fill('a');
function calculateOpacity(x: number, y: number) {
const distanceFromCenter = Math.sqrt(Math.pow(x - props.size / 2, 2) + Math.pow(y - props.size / 2, 2));
const normalizedDistance = distanceFromCenter / (props.size / 2);
return (1 - normalizedDistance).toFixed(1);
}
const widthHeight = computed(() => {
return 9 + props.size * props.spacing;
});
</script>
<template>
<div class="w-fit h-fit">
<svg xmlns="http://www.w3.org/2000/svg" :width="widthHeight" :height="widthHeight" :style="`opacity: ${props.opacity};`"
fill="none">
<template v-for="(p, x) of sizeArr">
<template v-for="(p, y) of sizeArr">
<circle :cx="9 + (spacing * x)" :cy="9 + (spacing * y)" r="1" fill="#fff"
:fill-opacity="calculateOpacity(x, y)" />
</template>
</template>
<!-- <circle cx="27" cy="9" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="45" cy="9" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="63" cy="9" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="81" cy="9" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="99" cy="9" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="117" cy="9" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="135" cy="9" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="9" cy="27" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="27" cy="27" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="45" cy="27" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="63" cy="27" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="81" cy="27" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="99" cy="27" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="117" cy="27" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="135" cy="27" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="9" cy="45" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="27" cy="45" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="45" cy="45" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="63" cy="45" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="81" cy="45" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="99" cy="45" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="117" cy="45" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="135" cy="45" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="9" cy="63" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="27" cy="63" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="45" cy="63" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="63" cy="63" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="81" cy="63" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="99" cy="63" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="117" cy="63" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="135" cy="63" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="9" cy="81" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="27" cy="81" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="45" cy="81" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="63" cy="81" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="81" cy="81" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="99" cy="81" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="117" cy="81" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="135" cy="81" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="9" cy="99" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="27" cy="99" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="45" cy="99" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="63" cy="99" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="81" cy="99" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="99" cy="99" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="117" cy="99" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="135" cy="99" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="9" cy="117" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="27" cy="117" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="45" cy="117" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="63" cy="117" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="81" cy="117" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="99" cy="117" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="117" cy="117" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="135" cy="117" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="9" cy="135" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="27" cy="135" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="45" cy="135" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="63" cy="135" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="81" cy="135" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="99" cy="135" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="117" cy="135" r="1" fill="#fff" fill-opacity=".9" />
<circle cx="135" cy="135" r="1" fill="#fff" fill-opacity=".9" />
-->
</svg>
</div>
</template>

View File

@@ -0,0 +1,23 @@
<script lang="ts" setup>
const props = defineProps<{ title: string, text: string, icon: string }>();
</script>
<template>
<div class="bg-menu flex flex-col justify-center items-center px-8 py-10 w-[20rem] gap-4 rounded-xl">
<div>
<div class="bg-[#36363f] p-6 flex items-center justify-center h-[5rem] w-[5rem] rounded-2xl">
<i :class="props.icon" class="text-text text-[1.6rem]"></i>
</div>
</div>
<div class="text-text text-[1.3rem] poppins font-semibold text-center mt-6">
{{ props.title }}
</div>
<div class="text-text-sub/80 text-[1rem] poppins text-center">
{{ props.text }}
</div>
</div>
</template>

View File

@@ -0,0 +1,20 @@
<script lang="ts" setup>
const props = defineProps<{
icon: string,
name: string
}>();
</script>
<template>
<div class="p-6 flex flex-col items-center gap-3">
<div class="w-[4.2rem] h-[4.2rem] lg:w-[6rem] lg:h-[6rem] bg-menu rounded-2xl flex items-center justify-center">
<img :src="icon">
</div>
<div class="poppins font-semibold text-text-sub">
{{ name }}
</div>
</div>
</template>

View File

@@ -0,0 +1,58 @@
<script lang="ts" setup>
type Prop = {
title: string,
icon: string,
list: { text: string, icon: string }[],
price: string,
}
const props = defineProps<Prop>();
</script>
<template>
<div class="bg-menu py-6 rounded-lg w-full h-full flex flex-col items-center justify-normal px-6 relative">
<div
class="absolute rounded-full top-[-2.1rem] bg-accent w-[4.2rem] h-[4.2rem] flex items-center justify-center">
<i :class="icon" class="text-[2.5rem]"></i>
</div>
<div class="poppins mt-6 font-semibold text-[1.4rem]">
{{ title }}
</div>
<div class="bg-gray-400/50 h-[1px] w-full mt-6 mb-10"></div>
<div class="flex flex-col gap-4">
<div class="flex gap-3 items-center" v-for="element of list">
<div class="shrink-0 flex items-center bg-accent w-[2rem] h-[2rem] justify-center rounded-full">
<i :class="element.icon" class="text-[.9rem]"></i>
</div>
<div class="poppins">
{{ element.text }}
</div>
</div>
</div>
<div class="bg-gray-400/50 h-[1px] w-full mt-10 mb-6"></div>
<div class="flex gap-2 justify-between w-full">
<div class="flex gap-2 items-end">
<div class="manrope text-[2.5rem] font-bold text-text"> {{ price }} </div>
<div class="poppins text-text-sub/90 mb-1">/month</div>
</div>
<div>
Tasto bello
</div>
</div>
</div>
</template>