Skip to content

Commit 4e98a66

Browse files
committed
🎉 feat: askable
1 parent 978a808 commit 4e98a66

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

docs/components/arona/arona.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ onUnmounted(() => {
753753
}
754754
755755
& > h2 {
756-
@apply text-xl sm:text-2xl font-bold pt-4 my-4 border-t dark:border-gray-700;
756+
@apply text-xl sm:text-2xl font-bold pt-4 my-4;
757757
}
758758
759759
& > h3 {
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<script setup lang="ts">
2+
import { ref } from 'vue'
3+
import { Sparkles } from 'lucide-vue-next'
4+
5+
import { useInView, motion } from 'motion-v'
6+
import { useFlyIn } from './animate'
7+
8+
const scope = ref(null)
9+
const isInView = useInView(scope, {
10+
once: true,
11+
margin: '0px 0px -35% 0px'
12+
})
13+
const flyIn = useFlyIn(isInView)
14+
15+
function askAI() {
16+
// @ts-ignore
17+
window.toggleAI()
18+
}
19+
</script>
20+
21+
<template>
22+
<div
23+
class="flex flex-col justify-center items-center w-full h-108 md:h-auto mx-auto mt-12 px-3"
24+
ref="scope"
25+
>
26+
<motion.section
27+
class="group relative isolate flex flex-col md:flex-row justify-center items-center gap-10 w-full max-w-5xl h-full p-8 md:py-16 border border-gray-200 dark:border-gray-700 lg:rounded-[2.5rem] overflow-hidden rounded-2xl"
28+
v-bind="flyIn()"
29+
>
30+
<div
31+
class="flex flex-col justify-center items-center md:items-start md:max-w-xs w-full"
32+
>
33+
<motion.h4 class="ml-3 mb-1" v-bind="flyIn(0.1)">
34+
Got more question?
35+
</motion.h4>
36+
<motion.a
37+
class="text-4xl lg:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-tl from-emerald-400/80 to-sky-400/80"
38+
v-bind="flyIn(0.2)"
39+
>
40+
Just Ask!
41+
</motion.a>
42+
43+
<motion.button
44+
class="flex items-center gap-2 mt-6 md:mr-auto text-white font-semibold md:-translate-x-2 bg-gradient-to-br from-emerald-400 to-sky-400 rounded-full px-6 py-3 box-shadow shadow-cyan-400/40 shadow-lg transition-transform ease-out-expo duration-500 transform hover:scale-110 focus:scale-110"
45+
@click="askAI"
46+
v-bind="flyIn(0.3)"
47+
>
48+
<Sparkles stroke-width="1.75" />
49+
Ask Elysia <sup>(AI)</sup>
50+
</motion.button>
51+
</div>
52+
<div
53+
class="relative flex flex-col justify-start gap-2 text-base max-w-md w-full mb-auto"
54+
>
55+
<motion.p
56+
class="absolute top-0 md:-top-6 right-0 flex justify-center items-center px-4 py-2 dark:text-gray-400 bg-gray-200/70 dark:bg-gray-800 rounded-3xl"
57+
v-bind="flyIn(0.4)"
58+
>
59+
Can I use Zod with Elysia?
60+
</motion.p>
61+
<motion.p
62+
class="absolute top-12 md:top-6 left-0 flex justify-center items-center px-4 py-2 dark:text-gray-400"
63+
v-bind="flyIn(0.5)"
64+
>
65+
Elysia validates incoming request data (params, query, body,
66+
headers, cookies, response) before your handler runs.
67+
<br />
68+
<br />
69+
It ships with a built‑in schema builder (Elysia.t) based on
70+
TypeBox, but it also natively supports any “Standard Schema”
71+
library – that includes Zod, Valibot, Yup, Joi, ArkType,
72+
Effect‑Schema, and many more.
73+
</motion.p>
74+
<div
75+
class="absolute top-12 md:top-12 left-0 w-full h-46 bg-gradient-to-b from-transparent to-white dark:to-gray-900 pointer-events-none"
76+
/>
77+
</div>
78+
</motion.section>
79+
</div>
80+
</template>

docs/components/fern/fern.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Tweets from './tweets.vue'
1313
import Sponsors from './sponsor.vue'
1414
import Banner from './banner.vue'
1515
import BuiltWithLove from './built-with-love.vue'
16+
import AskElysia from './ask-elysia.vue'
1617
</script>
1718

1819
<template>
@@ -64,6 +65,8 @@ import BuiltWithLove from './built-with-love.vue'
6465
<Sponsors />
6566
<!-- <Features /> -->
6667
<!-- <Future /> -->
68+
69+
<AskElysia />
6770
<Banner class="mt-10" />
6871
<BuiltWithLove />
6972
</article>

0 commit comments

Comments
 (0)