Skip to content

Commit

Permalink
Merge pull request #26 from codegasms/pricing
Browse files Browse the repository at this point in the history
Pricing section added and improved auth layout
  • Loading branch information
virinci authored Dec 4, 2024
2 parents 2bdd50f + a6a8f0b commit 2ed5656
Show file tree
Hide file tree
Showing 7 changed files with 194 additions and 24 deletions.
6 changes: 3 additions & 3 deletions app/auth/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export default function AuthPage({
<div className="flex h-screen">
<div className="w-1/2 relative">
<Image
src="/placeholder.svg"
src="/image/interactive-learning.jpg"
alt="Authentication"
layout="fill"
objectFit="cover"
fill
style={{ objectFit: "cover" }}
/>
</div>
<div className="w-1/2 flex items-center justify-center">
Expand Down
12 changes: 12 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { VortexDemo } from "../components/landing/vortex-demo";
import { Features } from "../components/landing/features";
import { GeminiSection } from "../components/landing/gemini-section";
import { AboutUs } from "../components/landing/about-us";
import { Pricing } from "../components/landing/pricing";

export default function Home() {
return (
Expand All @@ -31,6 +32,12 @@ export default function Home() {
>
How It Works
</a>
<a
href="#pricing"
className="text-gray-300 hover:text-white transition-colors"
>
Pricing
</a>
<a
href="#faq"
className="text-gray-300 hover:text-white transition-colors"
Expand Down Expand Up @@ -114,6 +121,11 @@ export default function Home() {
</div>
</section>

{/* Pricing Section */}
<section id="pricing" className="relative bg-black py-20">
<Pricing />
</section>

{/* FAQ Section */}
<section id="faq" className="relative bg-black py-20">
<FAQ />
Expand Down
16 changes: 9 additions & 7 deletions components/auth-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,21 @@ export function AuthComponent({
}

return (
<Card className="w-[350px] ">
<CardHeader>
<CardTitle>{isLogin ? "Login" : "Register"}</CardTitle>
<Card className="w-[400px]">
<CardHeader className="space-y-1 pb-2">
<CardTitle className="text-2xl font-bold">
{isLogin ? "Login" : "Register"}
</CardTitle>
<CardDescription>
{isLogin ? "Enter your credentials to login" : "Create a new account"}
</CardDescription>
</CardHeader>
<CardContent>
<CardContent className="pt-4">
{isLogin ? (
<Form {...loginForm}>
<form
onSubmit={loginForm.handleSubmit(onLoginSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={loginForm.control}
Expand Down Expand Up @@ -140,7 +142,7 @@ export function AuthComponent({
<Form {...registerForm}>
<form
onSubmit={registerForm.handleSubmit(onRegisterSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={registerForm.control}
Expand Down Expand Up @@ -209,7 +211,7 @@ export function AuthComponent({
</Form>
)}
</CardContent>
<CardFooter>
<CardFooter className="flex flex-col space-y-4 pt-4">
<Button
variant="link"
className="w-full"
Expand Down
168 changes: 168 additions & 0 deletions components/landing/pricing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
"use client";

import { Button } from "../ui/button";
import { Check } from "lucide-react";
import { motion } from "framer-motion";

const pricingPlans = [
{
name: "Free",
price: "₹0",
description: "Perfect for trying out Pariksa",
features: [
"Create up to 5 tests",
"Basic question types",
"Manual grading",
"Basic analytics",
"Email support",
"Up to 30 students",
],
buttonText: "Get Started",
popular: false,
},
{
name: "Pro",
price: "₹499",
period: "/month",
description: "For growing educational institutions",
features: [
"Unlimited tests",
"Advanced question types",
"Auto-grading",
"Detailed analytics & reports",
"Priority support",
"Up to 500 students",
"Custom branding",
"Export results",
],
buttonText: "Go Pro",
popular: true,
},
{
name: "Enterprise",
price: "Custom",
description: "For large institutions & universities",
features: [
"Everything in Pro",
"Unlimited students",
"Custom question types",
"API access",
"24/7 dedicated support",
"Custom integrations",
"SLA guarantee",
"Onboarding assistance",
],
buttonText: "Contact Sales",
popular: false,
},
];

const containerVariants = {
hidden: { opacity: 0 },
visible: {
opacity: 1,
transition: {
staggerChildren: 0.1,
},
},
};

const cardVariants = {
hidden: { opacity: 0, y: 20 },
visible: {
opacity: 1,
y: 0,
transition: {
duration: 0.5,
},
},
};

export function Pricing() {
return (
<section
id="pricing"
className="py-24 bg-gradient-to-b from-black to-gray-900"
>
<div className="container px-4 mx-auto">
<motion.div
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.6 }}
className="text-center mb-16"
>
<h2 className="text-4xl font-bold text-white mb-4">
Choose Your Plan
</h2>
<p className="text-gray-400 text-lg">
Start free and scale as you grow
</p>
</motion.div>
<motion.div
variants={containerVariants}
initial="hidden"
animate="visible"
className="grid md:grid-cols-3 gap-8 max-w-7xl mx-auto"
>
{pricingPlans.map((plan) => (
<motion.div
key={plan.name}
variants={cardVariants}
whileHover={{ scale: 1.02 }}
className={`relative rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 ${
plan.popular
? "bg-blue-600/90 border-2 border-blue-400 shadow-lg shadow-blue-500/20"
: "bg-gray-900/90 border border-gray-800 hover:border-gray-700"
}`}
>
{plan.popular && (
<div className="absolute -top-4 left-1/2 -translate-x-1/2">
<span className="bg-white text-blue-600 px-4 py-1 rounded-full text-sm font-medium shadow-lg">
Most Popular
</span>
</div>
)}
<div className="mb-6">
<h3 className="text-2xl font-bold text-white mb-2">
{plan.name}
</h3>
<div className="flex items-baseline mb-2">
<span className="text-4xl font-bold text-white">
{plan.price}
</span>
{plan.period && (
<span className="text-gray-400 ml-1">{plan.period}</span>
)}
</div>
<p className="text-gray-400">{plan.description}</p>
</div>
<ul className="space-y-4 mb-8">
{plan.features.map((feature) => (
<motion.li
key={feature}
className="flex items-center text-gray-300"
initial={{ opacity: 0, x: -10 }}
animate={{ opacity: 1, x: 0 }}
transition={{ duration: 0.3 }}
>
<Check className="h-5 w-5 text-green-500 mr-2 flex-shrink-0" />
<span>{feature}</span>
</motion.li>
))}
</ul>
<Button
className={`w-full transition-all duration-300 ${
plan.popular
? "bg-white text-blue-600 hover:bg-gray-100 hover:scale-105"
: "bg-blue-600 hover:bg-blue-700 hover:scale-105"
}`}
>
{plan.buttonText}
</Button>
</motion.div>
))}
</motion.div>
</div>
</section>
);
}
14 changes: 1 addition & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"cobe": "^0.6.3",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.37.0",
"framer-motion": "^11.12.0",
"framer-motion": "^11.13.1",
"js-cookie": "^3.0.5",
"lucide-react": "^0.446.0",
"next": "14.2.13",
Expand Down
Binary file added public/image/interactive-learning.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2ed5656

Please sign in to comment.