Skip to content

Commit 06e7441

Browse files
authored
Merge branch 'max-programming:main' into alone-y154/local
2 parents 43b4f84 + 003df5a commit 06e7441

16 files changed

+92
-40
lines changed

.all-contributorsrc

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"login": "max-programming",
1010
"name": "Max Programming",
1111
"avatar_url": "https://avatars.githubusercontent.com/u/51731966?v=4",
12-
"profile": "https://usman-s.me",
12+
"profile": "https://usmans.me",
1313
"contributions": [
1414
"code"
1515
]
@@ -352,6 +352,46 @@
352352
"contributions": [
353353
"code"
354354
]
355+
},
356+
{
357+
"login": "nidble",
358+
"name": "Antonino Bertulla",
359+
"avatar_url": "https://avatars.githubusercontent.com/u/1447119?v=4",
360+
"profile": "https://dev.to/nidble/",
361+
"contributions": [
362+
"code",
363+
"design"
364+
]
365+
},
366+
{
367+
"login": "Mohit030802",
368+
"name": "Mohit",
369+
"avatar_url": "https://avatars.githubusercontent.com/u/80634689?v=4",
370+
"profile": "https://bright-ganache-eb99ae.netlify.app/",
371+
"contributions": [
372+
"code",
373+
"ideas"
374+
]
375+
},
376+
{
377+
"login": "tmsagarofficial",
378+
"name": "S A G A R",
379+
"avatar_url": "https://avatars.githubusercontent.com/u/110724849?v=4",
380+
"profile": "https://github.com/tmsagarofficial",
381+
"contributions": [
382+
"ideas",
383+
"code"
384+
]
385+
},
386+
{
387+
"login": "prithvi2k2",
388+
"name": "Prithvi Reddy",
389+
"avatar_url": "https://avatars.githubusercontent.com/u/72189314?v=4",
390+
"profile": "https://prithvi2k2.github.io/",
391+
"contributions": [
392+
"code",
393+
"design"
394+
]
355395
}
356396
],
357397
"contributorsPerLine": 7,

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Hacktoberfest Projects 🎉
22

3-
A Web app that lets you find eligible repositories for Hacktoberfest 2022!
3+
4+
A Web app that lets you find eligible repositories for Hacktoberfest!
45

56
Use it here - https://finder.usmans.me
67

78
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
8-
[![All Contributors](https://img.shields.io/badge/all_contributors-36-orange.svg?style=flat-square)](#contributors-)
9+
[![All Contributors](https://img.shields.io/badge/all_contributors-40-orange.svg?style=flat-square)](#contributors-)
910
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1011
<a href="https://gitmoji.dev">
1112
<img src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square" alt="Gitmoji">
@@ -75,7 +76,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
7576
<table>
7677
<tbody>
7778
<tr>
78-
<td align="center" valign="top" width="14.28%"><a href="https://usman-s.me"><img src="https://avatars.githubusercontent.com/u/51731966?v=4?s=100" width="100px;" alt="Max Programming"/><br /><sub><b>Max Programming</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=max-programming" title="Code">💻</a></td>
79+
<td align="center" valign="top" width="14.28%"><a href="https://usmans.me"><img src="https://avatars.githubusercontent.com/u/51731966?v=4?s=100" width="100px;" alt="Max Programming"/><br /><sub><b>Max Programming</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=max-programming" title="Code">💻</a></td>
7980
<td align="center" valign="top" width="14.28%"><a href="https://sunritjana.now.sh"><img src="https://avatars.githubusercontent.com/u/56873669?v=4?s=100" width="100px;" alt="Sunrit Jana"/><br /><sub><b>Sunrit Jana</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=janaSunrise" title="Code">💻</a></td>
8081
<td align="center" valign="top" width="14.28%"><a href="https://medium.com/@geeknees"><img src="https://avatars.githubusercontent.com/u/701242?v=4?s=100" width="100px;" alt="Masumi Kawasaki"/><br /><sub><b>Masumi Kawasaki</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=geeknees" title="Code">💻</a> <a href="#content-geeknees" title="Content">🖋</a></td>
8182
<td align="center" valign="top" width="14.28%"><a href="http://rishit-khandelwal.github.io"><img src="https://avatars.githubusercontent.com/u/65018379?v=4?s=100" width="100px;" alt="Rishit Khandelwal"/><br /><sub><b>Rishit Khandelwal</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=rishit-khandelwal" title="Code">💻</a> <a href="#content-rishit-khandelwal" title="Content">🖋</a></td>
@@ -121,6 +122,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
121122
</tr>
122123
<tr>
123124
<td align="center" valign="top" width="14.28%"><a href="https://maitri-vv.github.io/Maitri-sPortfolio/"><img src="https://avatars.githubusercontent.com/u/87691594?v=4?s=100" width="100px;" alt="maitri-vv"/><br /><sub><b>maitri-vv</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=maitri-vv" title="Code">💻</a></td>
125+
<td align="center" valign="top" width="14.28%"><a href="https://dev.to/nidble/"><img src="https://avatars.githubusercontent.com/u/1447119?v=4?s=100" width="100px;" alt="Antonino Bertulla"/><br /><sub><b>Antonino Bertulla</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=nidble" title="Code">💻</a> <a href="#design-nidble" title="Design">🎨</a></td>
126+
<td align="center" valign="top" width="14.28%"><a href="https://bright-ganache-eb99ae.netlify.app/"><img src="https://avatars.githubusercontent.com/u/80634689?v=4?s=100" width="100px;" alt="Mohit"/><br /><sub><b>Mohit</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=Mohit030802" title="Code">💻</a> <a href="#ideas-Mohit030802" title="Ideas, Planning, & Feedback">🤔</a></td>
127+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tmsagarofficial"><img src="https://avatars.githubusercontent.com/u/110724849?v=4?s=100" width="100px;" alt="S A G A R"/><br /><sub><b>S A G A R</b></sub></a><br /><a href="#ideas-tmsagarofficial" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=tmsagarofficial" title="Code">💻</a></td>
128+
<td align="center" valign="top" width="14.28%"><a href="https://prithvi2k2.github.io/"><img src="https://avatars.githubusercontent.com/u/72189314?v=4?s=100" width="100px;" alt="Prithvi Reddy"/><br /><sub><b>Prithvi Reddy</b></sub></a><br /><a href="https://github.com/max-programming/hacktoberfest-projects/commits?author=prithvi2k2" title="Code">💻</a> <a href="#design-prithvi2k2" title="Design">🎨</a></td>
124129
</tr>
125130
</tbody>
126131
</table>

components/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function Card({ repo }: Props) {
3737
</h2>
3838
</div>
3939

40-
<h6 className="my-5 text-lg">{emojify(repo.description)}</h6>
40+
<h6 className="my-5 text-2023-manga-2 text-lg">{emojify(repo.description)}</h6>
4141

4242
<div className="card-actions gap-y-3">
4343
{repo.topics.map((topic: string) => (

components/Hero.tsx

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FormEventHandler } from 'react';
1+
import { FormEventHandler, useState } from 'react';
22
import Link from 'next/link';
33

44
import languages from 'assets/languages.json';
@@ -10,11 +10,19 @@ import Button from './Button';
1010
const { main: mainLanguages, others: otherLanguages } = languages;
1111

1212
function Hero() {
13+
const [errorMessage, setErrorMessage] = useState<string | null>(null);
1314
const router = useRouter();
1415
const handleSubmit: FormEventHandler = e => {
1516
e.preventDefault();
1617
const formData = new FormData(e.target as HTMLFormElement);
17-
const search = formData.get('search');
18+
const search = (formData.get('search') as string).trim();
19+
// Check if the input is empty or contains only spaces
20+
if (search === '') {
21+
setErrorMessage('Empty search terms invalid!');
22+
return;
23+
}
24+
// Clear any previous error message & proceed to search
25+
setErrorMessage(null);
1826
router.push(`/repos/${search}`);
1927
};
2028
return (
@@ -23,11 +31,30 @@ function Hero() {
2331
<div className="text-center hero-content">
2432
<div className="max-w-md">
2533
<h1 className="mb-5 text-2023-manga-3 text-5xl font-bold uppercase">
26-
Select your language
34+
Search your language
2735
</h1>
36+
<form
37+
className="form-control w-full max-w-xs mx-auto items-center mt-10 mb-12"
38+
onSubmit={handleSubmit}
39+
>
40+
<div className="flex w-full">
41+
<input
42+
type="text"
43+
placeholder="Search for your language"
44+
className="input input-bordered w-full text-neutral-100 border-2023-bavarian-gold-2 focus:outline-2023-bavarian-gold-2 max-w-xs rounded-tr-none rounded-br-none bg-transparent"
45+
name="search"
46+
/>
47+
<button
48+
type="submit"
49+
className="btn btn-square rounded-tl-none rounded-bl-none bg-transparent border-2023-manga-3 hover:bg-2023-manga-2 hover:text-2023-void-2 hover:border-2023-manga-2"
50+
>
51+
<SearchIcon />
52+
</button>
53+
</div>
54+
</form>
2855
<p className="mb-5 text-2023-manga-3 font-semibold uppercase">
29-
Select the programming language you would like to find repositories
30-
for.
56+
Or select the programming language you would like to find
57+
repositories for.
3158
</p>
3259

3360
{mainLanguages.map(language => (
@@ -52,29 +79,6 @@ function Hero() {
5279
))}
5380
</ul>
5481
</div>
55-
<form
56-
className="form-control w-full max-w-xs mx-auto items-center"
57-
onSubmit={handleSubmit}
58-
>
59-
<label className="label">
60-
<span className="label-text text-2023-manga-3">Can&apos;t find your language?</span>
61-
</label>
62-
<div className="flex">
63-
<input
64-
type="text"
65-
placeholder="Search for your language"
66-
className="input input-bordered w-full text-neutral-100 border-2023-bavarian-gold-2 focus:outline-2023-bavarian-gold-2 max-w-xs rounded-tr-none rounded-br-none bg-transparent"
67-
name="search"
68-
autoComplete="off"
69-
/>
70-
<button
71-
type="submit"
72-
className="btn btn-square rounded-tl-none rounded-bl-none bg-transparent border-2023-manga-3 hover:bg-2023-manga-2 hover:text-2023-void-2 hover:border-2023-manga-2"
73-
>
74-
<SearchIcon />
75-
</button>
76-
</div>
77-
</form>
7882
{/* <a href="https://github.com/max-programming/hacktoberfest-projects/">
7983
<button className="m-2 border-0 hover:bg-primary-2 hover:text-black btn btn-lg">
8084
Add another language

components/Search.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface FormValues {
66
searchQuery: string;
77
}
88
export interface SearchProps {
9-
searchBarWrapperStyles?: string
9+
searchBarWrapperStyles?: string;
1010
}
1111

1212
export default function Search({ searchBarWrapperStyles }: SearchProps) {
@@ -19,7 +19,11 @@ export default function Search({ searchBarWrapperStyles }: SearchProps) {
1919
});
2020

2121
const onSubmit: SubmitHandler<FormValues> = ({ searchQuery }) => {
22-
router.push({ query: { ...router.query, q: searchQuery } });
22+
let trimmedQuery = searchQuery.trim();
23+
//Performs search only with non-empty strings
24+
if (trimmedQuery !== '') {
25+
router.push({ query: { ...router.query, q: trimmedQuery } });
26+
}
2327
};
2428

2529
return (
@@ -40,7 +44,7 @@ export default function Search({ searchBarWrapperStyles }: SearchProps) {
4044
type="button"
4145
onClick={() => reset()}
4246
>
43-
<GoX />
47+
<GoX color="white" />
4448
</button>
4549
</div>
4650
</form>

components/StarsFilter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default function StarsFilter() {
7575
control={control}
7676
/>
7777

78-
<button className="btn btn-ghost ml-2 ring-1 ring-2023-manga-2" type="submit">
78+
<button className="btn btn-ghost ml-2 text-2023-manga-2 ring-1 ring-2023-manga-2" type="submit">
7979
Search
8080
</button>
8181
</div>

pages/_app.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import '@fontsource/poppins';
99
import '../styles/globals.css';
1010

1111
import type { AppProps } from 'next/app';
12+
import Footer from 'components/Footer';
1213

1314
function MyApp({ Component, pageProps, router }: AppProps) {
1415
return (
@@ -37,6 +38,7 @@ function MyApp({ Component, pageProps, router }: AppProps) {
3738
<DefaultSeo {...SEO} />
3839
<NextNProgress color="#ffd74d" options={{ showSpinner: false }} />
3940
<Component {...pageProps} />
41+
<Footer />
4042
</motion.div>
4143
);
4244
}

pages/contributors.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export default function Contrubutors({ contributors }: Props) {
4444
))}
4545
</div>
4646
</div>
47-
<Footer />
4847
</div>
4948
);
5049
}

pages/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ const Home: NextPage = () => {
2727

2828
<Header />
2929
<Hero />
30-
<Footer />
3130
</div>
3231
);
3332
};
34-
3533
export default Home;

public/android-chrome-192x192.png

-25.3 KB
Loading

0 commit comments

Comments
 (0)