Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bc18503
feat: dev2 meetup events page revamp
Kinfe123 Mar 31, 2024
d887ba3
featix: adding some client side forms
Kinfe123 Mar 31, 2024
ad0fe5e
fix: add zod resolver and client side validation
Kinfe123 Apr 1, 2024
1e4449f
feat: drizzle and supabase as baas and form field added
Kinfe123 Apr 1, 2024
a89dac0
fix: added cols
Kinfe123 Apr 1, 2024
99001ea
fix: validation
Kinfe123 Apr 1, 2024
5b7c12f
fix: drizzle insert feilds
Kinfe123 Apr 1, 2024
9c64ce9
fix: feilds validate
Kinfe123 Apr 1, 2024
f246eb2
fix: padding leak
Kinfe123 Apr 1, 2024
c045a09
fix: margin leaks
Kinfe123 Apr 1, 2024
b1d51e4
fix: clean up and zod
Kinfe123 Apr 1, 2024
b47154e
fix: footer fix
Kinfe123 Apr 1, 2024
8f9df07
feat: subs actions
Kinfe123 Apr 1, 2024
908d9da
fix: added validation
Kinfe123 Apr 1, 2024
4e7eb5b
fix: add unique inforcement
Kinfe123 Apr 1, 2024
d65b6d8
fix; prod issue
Kinfe123 Apr 1, 2024
04e2c5a
fix: prod fix
Kinfe123 Apr 1, 2024
fc3775a
fix: metadata fix
Kinfe123 Apr 1, 2024
f885406
fix: responsiveness fix
Kinfe123 Apr 1, 2024
ff0c554
fix: responsiveness
Kinfe123 Apr 1, 2024
d0a5b6c
fix: consistent loader
Kinfe123 Apr 1, 2024
e3178a9
fix: status
Kinfe123 Apr 1, 2024
5b2ce3d
fix: db pull init
Kinfe123 Apr 1, 2024
0aaf573
fix: temporal redirect to google form
Kinfe123 Apr 2, 2024
48b7ea5
fix: padding leak
Kinfe123 Apr 2, 2024
2f18660
fix: env file leak
Kinfe123 Apr 2, 2024
e20fc24
removed pre commit
baydisng13 Apr 2, 2024
90bbc31
removed rome
baydisng13 Apr 2, 2024
f6589a1
removed rome
baydisng13 Apr 2, 2024
e56a8ee
update layout.tsx, page.tsx, countdown-wrapper.tsx and schdule.tsx
baydisng13 Apr 2, 2024
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL=postgres://...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ yarn-error.log*
.pnpm-debug.log*

# local env files
.env
.env*.local

# vercel
Expand Down
33 changes: 0 additions & 33 deletions .pre-commit-config.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"recommendations": [
"rome.rome",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"vivaxy.vscode-conventional-commits"
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// "editor.formatOnSave": true,
"editor.defaultFormatter": "rome.rome"
}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribution Guidelines

Thank you for considering contributing to our Rome-based project! We welcome any and all contributions, including bug reports, feature requests, code changes, and documentation improvements. To ensure a smooth and efficient collaboration, please read and follow these guidelines before submitting your contribution.
Thank you for considering contributing to our project! We welcome any and all contributions, including bug reports, feature requests, code changes, and documentation improvements. To ensure a smooth and efficient collaboration, please read and follow these guidelines before submitting your contribution.

## Getting Started

Expand All @@ -20,7 +20,7 @@ When making changes to the code, please keep the following in mind:
1. Write clear and concise commit messages
2. Follow the existing code style and conventions
3. You code will be formatted using pre-commits before you commit any changes if you want to run it manually please run `pnpm run format:write`
4. A linter will also run before every commit to ensure that your changes follow our code style if you want to perform manual check please run `pnpm run lint:next` and `pnpm run lint:rome`
4. A linter will also run before every commit to ensure that your changes follow our code style if you want to perform manual check please run `pnpm run lint:next`
5. Check that your changes type-check by running `pnpm run type:check`
6. Update the documentation if necessary

Expand Down
26 changes: 26 additions & 0 deletions actions/meetup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"use server";


import { db } from "@/db"
import { guests } from "@/db/schema"




type Gender = "male" | "female"
type Fasting = "yes" | "no"
export const registerDevs = async (firstName: string , lastName: string, email:string , phone: string , gender:string, fasting:string , comment: string , status: string , profession: string ) => {
const registered = await db.insert(guests).values({
email: email,
firstName:firstName,
lastName:lastName,
phone:phone,
gender: gender,
fasting: fasting,
comment: comment,
status: status,
profession: profession,
})
return registered

}
12 changes: 12 additions & 0 deletions actions/subsctibe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use server'

import { db } from "@/db"
import { subscribers } from "@/db/schema"


export const addSubscription = async (email: string) => {
const subs = await db.insert(subscribers).values({
email:email,
})
return subs
}
35 changes: 35 additions & 0 deletions app/dev-meet/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

import { CountDown } from "@/components/events/countdown-wrapper";
import { DevPic } from "@/components/events/dev-pic";
import { Evented } from "@/components/events/evented";
import { GetStarted } from "@/components/events/get-started";
import HeroEvent from "@/components/events/here-event";
import Organizers from "@/components/events/organizers";
import { Schedule } from "@/components/events/schdule";
import { Speakers } from "@/components/events/speakers";
import { Sponsors } from "@/components/events/sponsors";
import { Stats } from "@/components/events/stats";
import { UpcomingEvent } from "@/components/events/upcoming-events";
export const metadata = {
title: "CodeNight Events",
description: "Where we all gather and build the future"
}
const DevMeetupV2 = () => {
return (
<>
<HeroEvent />
<Evented />
<DevPic />
<CountDown />
<UpcomingEvent />
<Speakers />
<Schedule />
<Sponsors />
<Organizers />
<Stats />
<GetStarted />
</>
);
};
export default DevMeetupV2;

16 changes: 16 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
import StickyBottomBanner from "@/components/StickyBottomBanner";
import Nav from "@/components/nav/Nav";
import { Toaster } from "@/components/ui/toaster";

import "@/styles/globals.css";

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<link
rel="preconnect"
href="https://cdn.fontshare.com"
crossOrigin="anonymous"
/>
<link
rel="stylesheet"
href="https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@800,500,700&display=swap"
/>

<link rel="icon" href="/favicon.ico" />

<body>
<main>
<Nav />
{children}
<StickyBottomBanner />
</main>
<Toaster />
</body>
</html>
);
Expand Down
9 changes: 6 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,16 @@ const StickyBottomBanner = () => (
</div>
</div>
);

export const metadata = {
title: "CodeNight",
description: "Community of 🇪🇹 developers to showcase their projects"
}
export default function Home() {
return (
<>
<PageHead />
{/* <PageHead /> */}
<main>
<Nav />
{/* <Nav /> */}
<HeroSection />
<Programs />
<AboutUs />
Expand Down
2 changes: 2 additions & 0 deletions components/Contributors.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use client'
import Image from "next/image";
import Link from "next/link";
import { useEffect, useState } from "react";

const Contributors = () => {
const [contributors, setContributors] = useState([]);
Expand Down
39 changes: 39 additions & 0 deletions components/events/bg-image.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import Image from 'next/image'
import clsx from 'clsx'

import backgroundImage from '../../public/background.jpg'

export function BackgroundImage({
className,
position = 'left',
}: {
className?: string
position?: 'left' | 'right'
}) {
return (
<div
className={clsx(
'absolute inset-0 overflow-hidden bg-indigo-50 z-1',
className,
)}
>
<Image
className={clsx(
'absolute top-0',
position === 'left' &&
'left-0 translate-x-[-55%] translate-y-[-10%] -scale-x-100 sm:left-1/2 sm:translate-x-[-98%] sm:translate-y-[-6%] lg:translate-x-[-106%] xl:translate-x-[-122%]',
position === 'right' &&
'left-full -translate-x-1/2 sm:left-1/2 sm:translate-x-[-20%] sm:translate-y-[-15%] md:translate-x-0 lg:translate-x-[5%] lg:translate-y-[4%] xl:translate-x-[27%] xl:translate-y-[-8%]',
)}
src={backgroundImage}
alt=""
width={918}
height={1495}
priority
unoptimized
/>
<div className="absolute inset-x-0 top-0 h-40 bg-gradient-to-b from-white" />
<div className="absolute inset-x-0 bottom-0 h-40 bg-gradient-to-t from-white" />
</div>
)
}
18 changes: 18 additions & 0 deletions components/events/countdown-header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use client"

import { useRef } from "react"
import { motion, useScroll, useTransform } from "framer-motion"

const CountDownTimerHeader = () => {
const divRef = useRef(null)
const { scrollYProgress } = useScroll({
target: divRef,
})
const opacity = useTransform(scrollYProgress, [0, 0.5, 1], [1, 0.4, 0])
return (
<motion.div ref={divRef} style={{ opacity }} className="flex justify-start items-start my-10 mr-auto">
<h1 className="text-5xl font-bold tracking-tighter text-blue-600 sm:text-7xl">We are almost there...</h1>
</motion.div>
)
}
export default CountDownTimerHeader
14 changes: 14 additions & 0 deletions components/events/countdown-wrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import ShiftingCountdown from "./countdown";
import CountDownTimerHeader from "./countdown-header";
import { Wrapper } from "./wrapper";

export const CountDown = () => {
return (
<Wrapper size="lg" className="flex flex-col justify-center items-center my-20 font-display">
<div className="ml-auto">
<CountDownTimerHeader />
</div>
<ShiftingCountdown />
</Wrapper>
);
};
86 changes: 86 additions & 0 deletions components/events/countdown.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
'use client'

import { AnimatePresence, motion } from "framer-motion";
import { useEffect, useRef, useState } from "react";

const COUNTDOWN_FROM = "4/14/2024";

const SECOND = 1000;
const MINUTE = SECOND * 60;
const HOUR = MINUTE * 60;
const DAY = HOUR * 24;

const ShiftingCountdown = () => {
const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);

const [remaining, setRemaining] = useState({
days: 0,
hours: 0,
minutes: 0,
seconds: 0,
});

useEffect(() => {
intervalRef.current = setInterval(handleCountdown, 1000);

return () => clearInterval(intervalRef.current || undefined);
}, []);

const handleCountdown = () => {
const end = new Date(COUNTDOWN_FROM);

const now = new Date();

const distance = +end - +now;

const days = Math.floor(distance / DAY);
const hours = Math.floor((distance % DAY) / HOUR);
const minutes = Math.floor((distance % HOUR) / MINUTE);
const seconds = Math.floor((distance % MINUTE) / SECOND);

setRemaining({
days,
hours,
minutes,
seconds,
});
};

return (
<div className="p-4 bg-gradient-to-br from-transparent to-transparent rounded-3xl overflow-hidden ">
<div className="w-full max-w-full mx-auto flex items-center bg- overflow-hidden">
<CountdownItem num={remaining.days} text="days" />
<CountdownItem num={remaining.hours} text="hours" />
<CountdownItem num={remaining.minutes} text="minutes" />
<CountdownItem num={remaining.seconds} text="seconds" />
</div>
</div>
);
};

const CountdownItem = ({ num, text }: { num: number; text: string }) => {
return (
<div className="font-display sm:w-[120px] md:w-[200px] lg:w-[345px] h-20 md:h-full flex sm:mx-0 md:mx-5 lg:mx-10 flex-col gap-1 md:gap-2 items-center justify-center border-r-[1px] mb-0 z-20 border-slate-200">
<div className="w-full text-center relative overflow-hidden">
<AnimatePresence mode="popLayout">
<motion.span
key={num}
initial={{ y: "100%" }}
animate={{ y: "0%" }}
exit={{ y: "-100%" }}
transition={{ ease: "backIn", duration: 0.75 }}
className="block text-4xl font-heading2 md:text-5xl mr-10 lg:text-6xl xl:text-[14.5rem] font-medium bg-gradient-to-tr from-blue-400 to-purple-400 bg-clip-text text-transparent"
>

{num < 10 ? "0" + num : num}
</motion.span>
</AnimatePresence>
</div>
<span className="text-sm md:text-xl lg:text-3xl tracking-wide font-light font-heading text-black">
{text}
</span>
</div>
);
};

export default ShiftingCountdown;
Loading