Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/santhsim #28

Merged
merged 8 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {

images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'tedx-sjec.github.io',
port: '',
pathname: '/**',
},
],
},

};

export default nextConfig;
46 changes: 46 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"migrate-latest-w": "wsl sh -c \"export $(grep -v '^#' .env.local | xargs) && LATEST_MIGRATION=$(find prisma/migrations/*/ -type d -name '[0-9]*_*' | sort -r | head -n 1) && turso db shell $TURSO_DB_NAME < '${LATEST_MIGRATION}migration.sql'\""
},
"dependencies": {
"@gsap/react": "^2.1.1",
"@hookform/resolvers": "^3.9.0",
"@libsql/client": "^0.8.1",
"@next-auth/prisma-adapter": "^1.0.7",
Expand Down Expand Up @@ -46,8 +47,10 @@
"clsx": "^2.1.1",
"crypto": "^1.0.1",
"framer-motion": "^11.9.0",
"gsap": "^3.12.5",
"ioredis": "^5.4.1",
"jest": "^29.7.0",
"lenis": "^1.1.13",
"lodash.debounce": "^4.0.8",
"lucide-react": "^0.441.0",
"next": "14.2.6",
Expand Down
24 changes: 24 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,27 @@
@apply bg-background text-foreground;
}
}

.about{
background-color:rgb(255,255,255,0.3)
}
html.lenis,
html.lenis body {
height: auto !important;
}

.lenis.lenis-smooth {
scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
overscroll-behavior: contain !important;
}

.lenis.lenis-stopped {
overflow: hidden !important;
}

.lenis.lenis-scrolling iframe {
pointer-events: none !important;
}
8 changes: 5 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { StarsCanvas } from "@/components/ui/stars";

import Nav from "@/components/widget/header";
// import ScrollProgress from "@/components/ui/progressBar";
const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
Expand All @@ -18,8 +19,9 @@ export default function RootLayout({
}>) {
return (
<html lang="en" className="dark">
<body className={inter.className}>
<StarsCanvas />
<body className={inter.className="overflow-x-hidden"}>
<Nav/>
<StarsCanvas />
<Providers>{children} </Providers>
</body>
</html>
Expand Down
13 changes: 13 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@ import HorizontalScroll from "@/components/HorizontalScrollCarousel";
import TextReveal from "@/components/ui/text-reveal";
import HeroVideoDialog from "@/components/ui/hero-video-dialog";
import ParallaxFooter from "@/components/Footer";
// import Lenis from 'lenis'

export default function Home() {
// const lenis = new Lenis()

// lenis.on('scroll', (e) => {
// console.log(e)
// })

// function raf(time: number) {
// lenis.raf(time)
// requestAnimationFrame(raf)
// }

// requestAnimationFrame(raf)
return (
<>
<div className="z-20 relative bg-black ">
Expand Down
52 changes: 52 additions & 0 deletions src/components/ui/progressBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// "use client"
// import { useEffect } from 'react';
// import React from 'react';
// const ScrollProgress: React.FC = () => {
// useEffect(() => {
// const scrollProgressBar = document.getElementById('scroll-progress-bar');

// const handleScroll = () => {
// // const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
// // const scrollHeight = document.documentElement.scrollHeight - window.innerHeight;
// // const scrollPercentage = scrollTop / scrollHeight;

// if (scrollProgressBar) {
// scrollProgressBar.style.transform = `scaleX(${Math.min(Math.max(scrollPercentage, 0), 1)})`;
// }
// };

// window.addEventListener('scroll', handleScroll);

// return () => {
// window.removeEventListener('scroll', handleScroll);
// };
// }, []);

// return (
// <>
// <style jsx>{`
// #scroll-progress-bar {
// position: fixed;
// top: 0;
// left: 0;
// height: 2px;
// background-color: #EB0028;
// transform-origin: left;
// transform: scaleX(0);
// transition: transform 0.1s ease-out, opacity 0.2s ease-out;
// z-index: 9999;
// width: 100%;
// opacity: 1;
// }
// #scroll-progress-bar.hidden {
// visibility: hidden;
// opacity: 0;
// }
// `}</style>

// <div id="scroll-progress-bar"></div>
// </>
// );
// };

// export default ScrollProgress;
2 changes: 1 addition & 1 deletion src/components/ui/stars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const StarBackground = (props: PointsProps) => {
};

export const StarsCanvas = () => (
<div className="w-full h-auto fixed inset-0 -z-50 ">
<div className="w-screen h-screen fixed inset-0 -z-50 ">
<Canvas camera={{ position: [0, 0, 1] }}>
<Suspense fallback={null}>
<StarBackground />
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/text-reveal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export const TextRevealByWord: FC<TextRevealByWordProps> = ({
<div ref={targetRef} className={cn("relative z-0 h-[200vh]", className)}>
<div
className={
"sticky top-0 mx-auto flex h-[50%] max-w-8xl justify-center items-start flex-col bg-transparent px-[7rem] py-[1rem]"
"sticky top-0 mx-auto flex h-[50%] max-w-8xl justify-center items-start flex-col bg-transparent py-[1rem]"
}
>
<motion.h1
className="text-8xl text-start px-12 font-extrabold uppercase text-[#ff0000]"
className="text-8xl text-start font-extrabold uppercase text-[#ff0000]"
// ref={ref}
initial={{ opacity: 1, y: -30 }}
// animate={isInView ? { opacity: 1, y: 0 } : {}}
Expand Down
Loading
Loading