Skip to content

Commit

Permalink
getting-started
Browse files Browse the repository at this point in the history
  • Loading branch information
ZaneFerns360 committed Jan 7, 2024
1 parent a507659 commit cbd2ceb
Show file tree
Hide file tree
Showing 76 changed files with 2,700 additions and 112 deletions.
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cache
.cache
package.json
package-lock.json
public
CHANGELOG.md
.yarn
dist
node_modules
.next
build
.contentlayer
pocketbase_0.18.10_linux_amd64
115 changes: 9 additions & 106 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,113 +1,16 @@
import About from '@components/About'
import MultiLayerParallax from '@components/MultiLayerParallax'
import NavBar from '@components/Nav'
import Image from 'next/image'

export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 max-w-5xl w-full 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:h-auto lg:w-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 className="w-full">
<NavBar />
<MultiLayerParallax />
<div className="w-full">
<About />
</div>

<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] 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-[240px] 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 before:lg:h-[360px] z-[-1]">
<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
/>
</div>

<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 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-sm opacity-50`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
</main>
</div>
)
}
51 changes: 51 additions & 0 deletions components/About.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
'use client'
import React from 'react'
import { motion } from 'framer-motion'
import { useInView } from 'react-intersection-observer'

const About = () => {
const [ref1, inView1] = useInView({
threshold: 0,
triggerOnce: false,
})

const variants = {
visible: { opacity: 1, scale: 1 },
hidden: { opacity: 0, scale: 0.65 },
}

return (
<motion.div
animate={inView1 ? 'visible' : 'hidden'}
variants={variants}
exit="hidden"
transition={{ duration: 0.7 }}
ref={ref1}
>
<div className="mx-auto flex w-4/6 flex-col items-center justify-center text-center max-sm:h-fit md:px-5 md:pb-24 md:pt-48">
<h2 className="mb-5 text-4xl font-bold max-sm:pt-20 sm:pb-8 sm:text-7xl">
About Technothon 2024⚡
</h2>
<div className="leading-relaxed">
<p className="text-1xl mb-5 sm:text-3xl">
{
'Mumbai polytechnic students, get ready for Technothon 2024! A 24-hour hackathon full of excitement and creativity.'
}
</p>
<p className="text-1xl mb-5 sm:text-3xl">
{
'Technothon is your chance to shine as a developer. Build from scratch, compete, and unlock your potential. Are you up for the challenge?'
}
</p>
<p className="text-1xl sm:text-3xl">
{
'This year, we introduce Blind Bet Registration! Register, discover your challenges on the spot, and embark on an exciting journey at Technothon 2024.'
}
</p>
</div>
</div>
</motion.div>
)
}

export default About
54 changes: 54 additions & 0 deletions components/MultiLayerParallax.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use client'
import Image from 'next/image'
import { motion, useScroll, useTransform } from 'framer-motion'
import React, { useRef } from 'react'

export default function MultiLayerParallax() {
const ref = useRef(null)
const { scrollYProgress } = useScroll({
target: ref,
offset: ['start start', 'end start'],
})
const backgroundY = useTransform(scrollYProgress, [0, 1], ['0%', '100%'])
const textY = useTransform(scrollYProgress, [0, 1], ['0%', '200%'])

return (
<div
ref={ref}
className="relative grid min-h-screen w-full place-items-center overflow-hidden"
>
<motion.div
style={{ y: textY }}
className="absolute inset-0 z-30"
transition={{ type: 'spring', stiffness: 100, damping: 3000 }}
>
<div className="z-21 inset-0 flex items-center justify-center">
<Image
alt="GG"
width={500}
height={500}
src="/assets/bitnbuild.png"
></Image>
</div>
</motion.div>

<motion.div
className="absolute inset-0 z-0"
transition={{ type: 'spring', stiffness: 0, damping: 1000 }}
style={{
backgroundImage: `url(/assets/bg.png)`,
backgroundPosition: 'top',
backgroundSize: 'cover',
y: backgroundY,
}}
/>
<div
className="absolute inset-0 z-20 w-full bg-contain bg-no-repeat"
style={{
backgroundImage: `url(/assets/mob.png)`,
backgroundPosition: 'bottom',
}}
/>
</div>
)
}
48 changes: 48 additions & 0 deletions components/Nav.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from 'react'

const NavBar = () => {
return (
<header className="z-100 sticky top-0 bg-transparent shadow-md hover:bg-white lg:shadow-none">
<div className="container mx-auto px-4 py-4">
<nav className="flex flex-col items-center justify-between lg:flex-row">
<ul className="mt-4 flex flex-col space-y-4 lg:mt-0 lg:flex lg:flex-row lg:space-x-6 lg:space-y-0">
<li>
<a
href="#home"
className="hover:text-brown-600 brand-font text-yellow-600"
>
Home
</a>
</li>
<li>
<a
href="#shop"
className="hover:text-brown-600 brand-font text-yellow-600"
>
Shop
</a>
</li>
<li>
<a
href="#designers"
className="hover:text-brown-600 brand-font text-yellow-600"
>
Designers
</a>
</li>
<li>
<a
href="#contact"
className="hover:text-brown-600 brand-font text-yellow-600"
>
Contact
</a>
</li>
</ul>
</nav>
</div>
</header>
)
}

export default NavBar
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,29 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"framer-motion": "^10.17.9",
"next": "14.0.4",
"react": "^18",
"react-dom": "^18",
"next": "14.0.4"
"react-intersection-observer": "^9.5.3"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.4",
"postcss": "^8",
"prettier": "^3.1.1",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.3.0",
"eslint": "^8",
"eslint-config-next": "14.0.4"
"typescript": "^5"
}
}
Loading

0 comments on commit cbd2ceb

Please sign in to comment.