Skip to content

Commit

Permalink
Merge pull request #16 from Puskar-Roy/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Puskar-Roy authored May 19, 2024
2 parents 0ca489f + f4391bc commit 6593be8
Show file tree
Hide file tree
Showing 26 changed files with 1,929 additions and 146 deletions.
Binary file modified apps/client/app/favicon.ico
Binary file not shown.
29 changes: 0 additions & 29 deletions apps/client/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,3 @@
@tailwind components;
@tailwind utilities;

:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}
}

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}

@layer utilities {
.text-balance {
text-wrap: balance;
}
}
11 changes: 7 additions & 4 deletions apps/client/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";

import {Navbar} from "@/components/Navbar";
const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "Create My API",
description: "Docs For Create My API.",
};

export default function RootLayout({
Expand All @@ -16,7 +16,10 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={inter.className}>
{/* <Navbar /> */}
{children}
</body>
</html>
);
}
247 changes: 143 additions & 104 deletions apps/client/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,112 +1,151 @@
"use client";
import Image from "next/image";
import { HeroScrollDemo } from "@/components/HeroScroll";
import { FlipWordsDemo } from "@/components/Words";
import Hero from "@/components/ui/Hero";
import Particles from "react-tsparticles";
import { loadFull } from "tsparticles";
import { Engine } from "tsparticles-engine";
import { useCallback } from "react";

export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
<code className="font-mono font-bold">app/page.tsx</code>
</p>
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:size-auto lg:bg-none">
<a
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{" "}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>
</a>
</div>
</div>
const init = useCallback(async (engine: Engine) => {
await loadFull(engine);
}, []);

<div className="relative z-[-1] flex place-items-center before:absolute before:h-[300px] before:w-full before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 sm:before:w-[480px] sm:after:w-[240px] before:lg:h-[360px]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
return (
<main className="">
<div className="min-h-[120rem] w-full dark:bg-slate-900 bg-white dark:bg-grid-white/[0.2] bg-grid-black/[0.2] relative flex items-center justify-center">
{/* Radial gradient for the container to give a faded look */}
<div className="absolute pointer-events-none inset-0 flex items-center justify-center dark:bg-black bg-white [mask-image:radial-gradient(ellipse_at_center,transparent_20%,black)]"></div>
<Particles
className="-z-3"
init={init}
options={{
background: {
color: {
value: "#232741",
},
opacity: 0,
},
fpsLimit: 120,
fullScreen: {
enable: true,
zIndex: 1,
},
interactivity: {
detectsOn: "canvas",
events: {
onClick: {
enable: true,
mode: "bubble",
},
onHover: {
enable: false,
mode: "bubble",
parallax: {
enable: false,
force: 60,
smooth: 10,
},
},
resize: {
enable: true,
delay: 0.5,
},
},
modes: {
push: {
quantity: 4,
},
repulse: {
distance: 200,
duration: 0.4,
},
bubble: {
distance: 100,
duration: 10,
opacity: 0.8,
size: 15,
},
trail: {
delay: 1,
quantity: 1,
},
},
},
particles: {
color: {
value: "#ffffff",
},
links: {
color: "#ffffff",
distance: 150,
enable: false,
opacity: 0.5,
width: 0,
},
collisions: {
enable: false,
},
move: {
angle: {
offset: 0,
value: 25,
},
direction: "top",
enable: true,
outModes: {
default: "bounce",
},
random: false,
speed: 1.5,
straight: true,
},
number: {
density: {
enable: true,
area: 1000,
},
value: 100,
},
opacity: {
random: {
enable: true,
minimumValue: 0.1,
},
value: 0.5,
},
shape: {
type: "circle",
},
size: {
value: { min: 1, max: 5 },
},
twinkle: {
particles: {
enable: true,
frequency: 0.5,
opacity: 1,
},
},
wobble: {
distance: 3,
enable: true,
speed: {
angle: 50,
move: 10,
},
},
},
detectRetina: true,
}}
/>
</div>

<div className="mb-32 grid text-center lg:mb-0 lg:w-full lg:max-w-5xl lg:grid-cols-4 lg:text-left">
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className="mb-3 text-2xl font-semibold">
Docs{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className="m-0 max-w-[30ch] text-sm opacity-50">
Find in-depth information about Next.js features and API.
</p>
</a>

<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className="mb-3 text-2xl font-semibold">
Learn{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className="m-0 max-w-[30ch] text-sm opacity-50">
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>

<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className="mb-3 text-2xl font-semibold">
Templates{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className="m-0 max-w-[30ch] text-sm opacity-50">
Explore starter templates for Next.js.
</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className="mb-3 text-2xl font-semibold">
Deploy{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className="m-0 max-w-[30ch] text-balance text-sm opacity-50">
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>

<div className="flex flex-col justify-center items-center">
<FlipWordsDemo />
<HeroScrollDemo />
</div>
</div>
</main>
);
Expand Down
12 changes: 12 additions & 0 deletions apps/client/components/Backgroud.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";

export function GridBackgroundDemo() {
return (
<div className="h-auto w-full dark:bg-black bg-white dark:bg-grid-white/[0.2] bg-grid-black/[0.2] relative flex items-center justify-center">
<div className="absolute pointer-events-none inset-0 flex items-center justify-center dark:bg-black bg-white [mask-image:radial-gradient(ellipse_at_center,transparent_20%,black)]"></div>
<p className="text-4xl sm:text-7xl font-bold relative z-20 bg-clip-text text-transparent bg-gradient-to-b from-neutral-200 to-neutral-500 py-8">
Backgrounds
</p>
</div>
);
}
54 changes: 54 additions & 0 deletions apps/client/components/HeroScroll.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"use client";
import React from "react";
import { ContainerScroll } from "@/components/ui/container-scroll-animation";
import Image from "next/image";
import test from "@/public/create-my-api-npm.png";
import { Montserrat } from "next/font/google";

const alata = Montserrat({
weight: "800",
subsets: ["latin"],
display: "swap",
});

export function HeroScrollDemo() {
return (
<div className="flex flex-col overflow-hidden z-5">
<ContainerScroll
titleComponent={
<>
<h1 className="text-4xl font-semibold text-black dark:text-white">
Unleash the power of <br />
<span className="text-4xl md:text-[6rem] font-bold mt-1 leading-none">
<span
className={`text-orange-300 font-extrabold ${alata.className}`}
>
Create
</span>{" "}
<span
className={`text-orange-500 font-extrabold ${alata.className}`}
>
My
</span>{" "}
<span
className={`text-red-500 font-extrabold ${alata.className}`}
>
API
</span>
</span>
</h1>
</>
}
>
<Image
src={test}
alt="hero"
height={720}
width={1400}
className="mx-auto rounded-2xl object-cover h-full object-left-top"
draggable={false}
/>
</ContainerScroll>
</div>
);
}
Loading

0 comments on commit 6593be8

Please sign in to comment.