Skip to content

Commit 27679ca

Browse files
Merge pull request #232 from Adnanarodiya/main
Update with latest Design
2 parents 9dd1b75 + df9f454 commit 27679ca

32 files changed

+1776
-223
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/.pnp
66
.pnp.js
77
package-lock.json
8+
.env*
89

910
# testing
1011
/coverage

CONTRIBUTING.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ Thank you for your interest in contributing to the Hacktoberfest Projects Finder
66

77
1. Fork the repository on GitHub.
88
2. Clone your forked repository:
9+
910
```sh
1011
git clone https://github.com/your-username/hacktoberfest-projects.git
1112
```
13+
1214
3. Navigate to the project directory:
15+
1316
```sh
1417
cd hacktoberfest-projects
1518
```
19+
1620
4. Install dependencies (we recommend using `pnpm`):
21+
1722
```sh
1823
pnpm install
1924
```
25+
2026
5. Copy the `.env.example` file to `.env.local` and fill in the required environment variables.
2127

2228
## Creating a GitHub OAuth Application
@@ -27,9 +33,11 @@ To use GitHub authentication in the project, you need to create a GitHub OAuth a
2733
2. Navigate to "Developer settings" > "OAuth Apps".
2834
3. Click on "New OAuth App".
2935
4. Fill in the application details:
36+
3037
- Application name: "Hacktoberfest Projects Finder" (or your preferred name)
3138
- Homepage URL: `http://localhost:3000` (for local development)
3239
- Authorization callback URL: `http://localhost:3000/api/auth/callback/github`
40+
3341
5. Click "Register application".
3442
6. On the next page, you'll see your Client ID. Click "Generate a new client secret" to create your Client Secret.
3543
7. Copy the Client ID and Client Secret to your `.env.local` file.
@@ -41,25 +49,39 @@ Xata is used as the database for this project. Follow these steps to set it up:
4149
1. Sign up for a Xata account at https://lite.xata.io/
4250
2. Create a new workspace and database from Xata dashboard
4351
3. Install the Xata CLI globally:
52+
4453
```sh
4554
npm install -g "@xata.io/cli@latest"
4655
```
56+
4757
4. Authenticate with Xata:
58+
4859
```sh
4960
xata auth login
5061
```
62+
5163
5. Initialize the database:
64+
5265
```sh
5366
xata init
5467
```
68+
5569
5. Upload the database schema:
70+
5671
```sh
5772
xata schema upload db-schema.json
5873
```
5974

75+
6. Generate the Xata client:
76+
77+
```sh
78+
xata codegen
79+
```
80+
6081
## Environment Variables
6182

6283
Create a `.env.local` file in the root of the project and add the following variables:
84+
6385
```sh
6486
AUTH_SECRET="" # A random string
6587
AUTH_URL="" # Should be http://localhost:3000 for local development
@@ -72,13 +94,14 @@ NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="" # Optional
7294
NEXT_PUBLIC_ANALYTICS_WEBSITE_ID="" # Optional
7395
```
7496

75-
Make sure to fill in the required values for each variable. The `AUTH_SECRET` should be a random string, and `AUTH_URL` should be set to `http://localhost:3000` for local development. The `XATA_BRANCH` should typically be set to "main" unless you're using a different branch.
97+
Make sure to fill in the required values for each variable. The `AUTH_SECRET` should be a random string, and `AUTH_URL` should be set to `http://localhost:3000` for local development. The `XATA_BRANCH` should typically be set to "main" unless you're using a different branch.
7698

77-
Remember to remove env variables that are optional and you are empty, they will cause validation errors
99+
Remember to remove env variables that are optional and you are empty, they will cause validation errors
78100

79101
## Running the Project
80102

81103
After setting up the environment variables, you can start the development server:
104+
82105
```sh
83106
pnpm dev
84107
```
@@ -88,14 +111,18 @@ The application should now be running at `http://localhost:3000`.
88111
## Making Contributions
89112

90113
1. Create a new branch for your feature or bug fix:
114+
91115
```sh
92116
git checkout -b feature/your-feature-name
93117
```
118+
94119
2. Make your changes and commit them with a descriptive commit message.
95120
3. Push your changes to your fork:
121+
96122
```sh
97123
git push origin feature/your-feature-name
98124
```
125+
99126
4. Create a pull request from your fork to the main repository.
100127

101128
Please ensure your code follows the project's coding standards and includes appropriate tests if applicable.

eslint.config.mjs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
import { defineConfig } from "eslint/config";
2-
import path from "node:path";
3-
import { fileURLToPath } from "node:url";
4-
import js from "@eslint/js";
5-
import { FlatCompat } from "@eslint/eslintrc";
1+
import { defineConfig } from 'eslint/config';
2+
import path from 'node:path';
3+
import { fileURLToPath } from 'node:url';
4+
import js from '@eslint/js';
5+
import { FlatCompat } from '@eslint/eslintrc';
66

77
const __filename = fileURLToPath(import.meta.url);
88
const __dirname = path.dirname(__filename);
99
const compat = new FlatCompat({
10-
baseDirectory: __dirname,
11-
recommendedConfig: js.configs.recommended,
12-
allConfig: js.configs.all
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
allConfig: js.configs.all
1313
});
1414

15-
export default defineConfig([{
16-
extends: compat.extends("next/core-web-vitals"),
15+
export default defineConfig([
16+
{
17+
extends: compat.extends('next/core-web-vitals'),
1718

1819
rules: {
19-
"@next/next/no-img-element": 0,
20-
},
21-
}]);
20+
'@next/next/no-img-element': 0,
21+
'react/no-unescaped-entities': 0
22+
}
23+
}
24+
]);

public/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading

src/app/(public)/_components/button.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ export function Button({
1111
...props
1212
}: PropsWithChildren<ButtonProps>) {
1313
return (
14-
<div className="relative inline-block group w-fit">
14+
<div className="relative inline-block group w-fit transition-all duration-500">
1515
<button
1616
className={cn(
17-
'bg-hacktoberfest-black m-1 hover:bg-hacktoberfest-dark-green btn btn-md md:btn-lg text-hacktoberfest-light rounded-2xl leading-none border-none',
17+
'text-sm font-bold inline-flex justify-center items-center uppercase py-3 px-4 text-center text-white bg-primary-btn-gradient shadow-primary-btn-shadow hover:bg-primary-btn-hover-gradient min-w-20 active:scale-95 active:shadow-lg transition-all duration-150 ease-in-out',
1818
className
1919
)}
2020
{...props}
2121
>
22-
{children}
22+
<p className="btn-clip group-hover:opacity-0 duration-300 group-hover:scale-95"></p>
23+
<span className="relative z-20 flex justify-center items-center text-hacktoberfest-light gap-2 font-bold">
24+
{children}
25+
</span>
2326
</button>
2427
</div>
2528
);

src/app/(public)/_components/header.tsx

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,36 @@ import { BsPeopleFill } from 'react-icons/bs';
66
import { SearchForm } from './search-form';
77
import { auth } from '@/auth';
88
import { signInAction, signOutAction } from '../../actions';
9+
import { LogoIconsSvg } from '@/components/Icons';
10+
import { Button } from './button';
11+
import { MobileMenu } from './mobile-menu';
912

1013
export async function Header() {
1114
const session = await auth();
1215

1316
return (
14-
<header className="border-b-[0.5px] border-dashed border-b-hacktoberfest-light-green mb-5">
15-
<div className="container px-4 py-2 mx-auto">
16-
<div className="justify-between shadow-lg navbar">
17-
<Link href="/">
18-
<img
19-
src="/horizontal_beige.png"
20-
alt="Hacktoberfest"
21-
className="w-56"
22-
/>
17+
<header className="fixed top-0 left-0 w-full z-50 py-3 px-4 sm:px-6">
18+
<div className="border border-hacktoberfest-light-blue rounded-lg py-4 px-4 sm:px-6 container mx-auto backdrop-blur-md shadow-lg">
19+
<div className="flex justify-between items-center">
20+
<Link href="/" className="z-5">
21+
<LogoIconsSvg />
2322
</Link>
2423

25-
<SearchForm />
24+
{/* Desktop Search - Hidden on mobile */}
25+
<div className="hidden md:block">
26+
<SearchForm />
27+
</div>
2628

27-
<div className="flex gap-2 lg:ml-40">
29+
{/* Desktop Navigation - Hidden on mobile */}
30+
<div className="hidden md:flex gap-2 lg:ml-40">
2831
<form action={session ? signOutAction : signInAction}>
29-
<button className="text-white border-white btn btn-ghost border-1 ms-4">
32+
<Button className="text-xs sm:text-sm">
3033
{session && session.user ? 'Sign Out' : 'Sign In'}
31-
</button>
34+
</Button>
3235
</form>
3336
<Link
3437
href="/contributors"
35-
className="btn btn-square btn-ghost umami--click--contributors-button"
38+
className="btn btn-square btn-ghost umami--click--contributors-button hover:text-hacktoberfest-light transition-colors"
3639
>
3740
<BsPeopleFill size="1.5rem" color="white" title="Contributors" />
3841
</Link>
@@ -41,11 +44,19 @@ export async function Header() {
4144
href="https://github.com/max-programming/hacktoberfest-projects"
4245
target="_blank"
4346
rel="noreferrer"
44-
className="btn btn-square btn-ghost umami--click--github-button"
47+
className="btn btn-square btn-ghost umami--click--github-button hover:text-hacktoberfest-light transition-colors"
4548
>
4649
<IoLogoGithub size="1.5rem" color="white" title="GitHub" />
4750
</a>
4851
</div>
52+
53+
{/* Mobile Hamburger Menu */}
54+
<MobileMenu session={session} />
55+
</div>
56+
57+
{/* Mobile Search - Visible only on mobile */}
58+
<div className="md:hidden md:mt-4">
59+
<SearchForm />
4960
</div>
5061
</div>
5162
</header>

src/app/(public)/_components/hero.tsx

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import Link from 'next/link';
99

1010
import { sortByName } from '@/lib/utils';
1111
import languages from '@/assets/languages.json';
12+
import { HeroSectionSvg } from '@/components/Icons';
13+
import { MarqueTextAnimation } from './marque-text-animation';
1214

1315
const { main: mainLanguages, others: otherLanguages } = languages;
1416

@@ -23,62 +25,69 @@ export function Hero() {
2325
}
2426

2527
return (
26-
<div className="min-h-screen pt-10 hero bg-gradient-radial from-hacktoberfest-green to-hacktoberfest-dark-green bg-blend-overlay">
27-
<div className="w-0 hero-overlay bg-opacity-60"></div>
28-
<div className="text-center hero-content">
29-
<div className="max-w-md">
30-
<h1 className="mb-5 text-5xl font-medium uppercase text-hacktoberfest-light-pink">
28+
<div className="relative bg-hero-gradient ">
29+
<div className="z-50 flex flex-col space-y-8 justify-center items-center text-center min-h-screen pt-28 sm:pt-24">
30+
<div className="max-w-md space-y-5">
31+
<h1 className="text-5xl font-medium uppercase heading-text">
3132
Search your language
3233
</h1>
3334
<form
34-
className="items-center w-full max-w-xs mx-auto my-5 form-control"
35+
className="items-center w-full max-w-xs mx-auto form-control outline-none "
3536
onSubmit={handleSearch}
3637
>
3738
<div className="flex w-full">
3839
<div className="relative flex w-full">
3940
<input
4041
type="text"
4142
placeholder="Search for your language"
42-
className="w-full max-w-xs bg-transparent rounded-tr-none rounded-br-none input input-bordered text-hacktoberfest-light border-hacktoberfest-light focus:outline-hacktoberfest-light-pink placeholder:text-hacktoberfest-light-green"
43+
className="w-full max-w-xs bg-transparent rounded-tr-none rounded-br-none input input-bordered text-hacktoberfest-light border-hacktoberfest-light
44+
focus:border-hacktoberfest-light focus:!outline-none focus-visible:!outline-none placeholder:text-hacktoberfest-light"
4345
name="search"
4446
/>
4547
</div>
4648
<button
4749
type="submit"
48-
className="bg-transparent rounded-tl-none rounded-bl-none group btn btn-square text-hacktoberfest-light-green border-hacktoberfest-light hover:bg-hacktoberfest-light-pink hover:text-hacktoberfest-deep-pink hover:border-hacktoberfest-light-pink"
50+
className="bg-transparent rounded-tl-none rounded-bl-none group btn btn-square text-hacktoberfest-light border-hacktoberfest-light hover:!border-hacktoberfest-light hover:bg-primary-btn-hover-gradient"
4951
>
5052
<Search />
5153
</button>
5254
</div>
5355
</form>
54-
<p className="mb-5 font-medium uppercase text-hacktoberfest-light">
56+
<p className="font-medium uppercase text-hacktoberfest-light">
5557
Or select the programming language you would like to find
5658
repositories for.
5759
</p>
58-
59-
{mainLanguages.map(language => (
60-
<LanguageButton key={language} language={language} />
61-
))}
62-
60+
<div className="flex flex-wrap gap-6 items-center justify-center ">
61+
{mainLanguages.map(language => (
62+
<LanguageButton key={language} language={language} />
63+
))}
64+
</div>
6365
<div className="dropdown dropdown-top">
6466
<Button tabIndex={0} className="umami--click--otherlangs-button">
6567
Other languages
6668
</Button>
6769

6870
<ul
6971
tabIndex={0}
70-
className="h-64 p-2 overflow-y-scroll shadow menu dropdown-content bg-base-100 rounded-box w-60"
72+
className="h-64 p-2 overflow-y-auto shadow-lg menu dropdown-content bg-white/95 backdrop-blur-sm rounded-xl w-60 border border-gray-200/50 z-[9999]"
7173
>
7274
{otherLanguages.sort(sortByName).map(language => (
7375
<li key={language}>
74-
<Link href={`/repos/${language.toLowerCase()}`}>
76+
<Link
77+
href={`/repos/${language.toLowerCase()}`}
78+
className="text-gray-700 hover:text-white hover:bg-hacktoberfest-blue rounded-lg transition-colors duration-200 px-3 py-2"
79+
>
7580
{language}
7681
</Link>
7782
</li>
7883
))}
7984
</ul>
8085
</div>
8186
</div>
87+
<MarqueTextAnimation />
88+
</div>
89+
<div className="absolute top-0 left-0 w-full h-full -z-10">
90+
<HeroSectionSvg className="w-full h-full" />
8291
</div>
8392
</div>
8493
);

src/app/(public)/_components/language-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function LanguageButton({ language }: LanguageButtonProps) {
1111

1212
return (
1313
<Link href={`/repos/${lan}`}>
14-
<Button className="flex items-center gap-3">
14+
<Button>
1515
<svg className="w-5 h-4">{Icons[lan === 'c++' ? 'cpp' : lan]}</svg>
1616
{language}
1717
</Button>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react';
2+
3+
const MarqueeItem = () => (
4+
<>
5+
{Array.from({ length: 4 }).map((_, i) => (
6+
<React.Fragment key={i}>
7+
<span className="text-center italic font-bold text-4xl md:text-6xl uppercase text-transparent text-webkit">
8+
Hacktoberfest 2025
9+
</span>
10+
<span className="w-[68px] h-[12px] bg-square-box-gradient"></span>
11+
</React.Fragment>
12+
))}
13+
</>
14+
);
15+
16+
export function MarqueTextAnimation() {
17+
return (
18+
<div className="w-full overflow-hidden pb-8">
19+
<div className="flex animate-marquee mb-4 sm:mb-8">
20+
<div className="flex gap-10 items-center whitespace-nowrap">
21+
<MarqueeItem />
22+
</div>
23+
<div className="flex gap-10 items-center whitespace-nowrap">
24+
<MarqueeItem />
25+
</div>
26+
</div>
27+
<div className="flex animate-marquee-reverse">
28+
<div className="flex gap-10 items-center whitespace-nowrap">
29+
<MarqueeItem />
30+
</div>
31+
<div className="flex gap-10 items-center whitespace-nowrap">
32+
<MarqueeItem />
33+
</div>
34+
</div>
35+
</div>
36+
);
37+
}

0 commit comments

Comments
 (0)