Skip to content

Commit 7c361a7

Browse files
New design + New logos
1 parent 8a3b825 commit 7c361a7

30 files changed

+153
-486
lines changed

public/hacktoberfest.png

-78.6 KB
Loading

public/hacktoberfest.svg

Lines changed: 0 additions & 322 deletions
This file was deleted.

public/horizontal_beige.png

15.9 KB
Loading

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ export function Button({
1212
}: PropsWithChildren<ButtonProps>) {
1313
return (
1414
<div className="relative inline-block m-3 group w-fit">
15-
<div className="absolute transition duration-1000 rounded-lg opacity-25 -inset-0 group-hover:bg-gradient-to-r from-2023-bavarian-red-2 via-2023-bavarian-gold-2 to-2023-bavarian-blue-2 blur group-hover:opacity-100 group-hover:duration-200"></div>
1615
<button
1716
className={cn(
18-
'relative p-6 bg-2023-void-2 hover:bg-2023-void-2 btn btn-lg text-white ring-1 ring-2023-manga-3 rounded-2xl leading-none hover:text-shadow hover:shadow-2023-bavarian-gold-3',
17+
'bg-hacktoberfest-black hover:bg-hacktoberfest-dark-green btn btn-lg text-hacktoberfest-light rounded-2xl leading-none border-none',
1918
className
2019
)}
2120
{...props}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ export async function Header() {
1111
const session = await auth();
1212

1313
return (
14-
<header className="border-b-[0.5px] border-dashed border-b-2023-manga-3 mb-5">
14+
<header className="border-b-[0.5px] border-dashed border-b-hacktoberfest-light-green mb-5">
1515
<div className="container px-4 py-2 mx-auto">
1616
<div className="justify-between shadow-lg navbar">
1717
<Link href="/">
1818
<img
19-
src="/hacktoberfest.svg"
19+
src="/horizontal_beige.png"
2020
alt="Hacktoberfest"
21-
className="w-auto h-12 sm:h-auto"
21+
className="w-56"
2222
/>
2323
</Link>
2424

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,35 @@ export function Hero() {
2323
}
2424

2525
return (
26-
<div className="min-h-screen pt-10 hero bg-gradient-radial from-2023-bavarian-gold-4 to-2023-void-2 bg-blend-overlay">
26+
<div className="min-h-screen pt-10 hero bg-gradient-radial from-hacktoberfest-green to-hacktoberfest-dark-green bg-blend-overlay">
2727
<div className="w-0 hero-overlay bg-opacity-60"></div>
2828
<div className="text-center hero-content">
2929
<div className="max-w-md">
30-
<h1 className="mb-5 text-5xl font-medium uppercase text-2023-manga-3">
30+
<h1 className="mb-5 text-5xl font-medium uppercase text-hacktoberfest-light-pink">
3131
Search your language
3232
</h1>
3333
<form
34-
className="items-center w-full max-w-xs mx-auto mt-10 mb-12 form-control"
34+
className="items-center w-full max-w-xs mx-auto my-5 form-control"
3535
onSubmit={handleSearch}
3636
>
3737
<div className="flex w-full">
38-
<div className="relative flex w-full ">
38+
<div className="relative flex w-full">
3939
<input
4040
type="text"
4141
placeholder="Search for your language"
42-
className="w-full max-w-xs bg-transparent rounded-tr-none rounded-br-none input input-bordered text-neutral-100 border-2023-bavarian-gold-2 focus:outline-2023-bavarian-gold-2"
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"
4343
name="search"
4444
/>
4545
</div>
4646
<button
4747
type="submit"
48-
className="bg-transparent rounded-tl-none rounded-bl-none group btn btn-square border-2023-bavarian-gold-2 hover:bg-2023-manga-2 hover:text-2023-void-2 hover:border-2023-manga-2"
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"
4949
>
5050
<Search />
5151
</button>
5252
</div>
5353
</form>
54-
<p className="mb-5 font-medium uppercase text-2023-manga-3">
54+
<p className="mb-5 font-medium uppercase text-hacktoberfest-light">
5555
Or select the programming language you would like to find
5656
repositories for.
5757
</p>

src/app/(public)/_components/search-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function SearchForm() {
4141
<div className="relative">
4242
<input
4343
placeholder="Search"
44-
className="w-full pr-16 bg-transparent text-neutral-100 input input-bordered border-2023-bavarian-gold-2 focus:outline-2023-bavarian-gold-2"
44+
className="w-full pr-16 bg-transparent text-hacktoberfest-light input input-bordered border-hacktoberfest-light focus:outline-hacktoberfest-light-pink placeholder:text-hacktoberfest-light-green"
4545
type="text"
4646
{...register('searchQuery', { required: true })}
4747
/>

src/app/(public)/contributors/_components/contributor-card.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function ContributorCard({ contributor }: ContributorCardProps) {
4040

4141
return (
4242
<button
43-
className="justify-center min-w-full text-center shadow-2xl card focus-within:outline-sky-300"
43+
className="justify-center min-w-full text-center shadow-2xl card focus-within:outline-hacktoberfest-green bg-hacktoberfest-black"
4444
id={contributor.login}
4545
onClick={() => router.replace(`/contributors#${contributor.login}`)}
4646
ref={cardRef}
@@ -50,19 +50,19 @@ export function ContributorCard({ contributor }: ContributorCardProps) {
5050
<img src={url} alt={contributor.name} className="rounded-xl" />
5151
</figure>
5252
</div>
53-
<div className="w-full gap-3 text-center card-body">
54-
<h2 className="text-2xl font-medium text-center text-2023-bavarian-blue-1">
53+
<div className="w-full gap-3 items-center card-body">
54+
<h2 className="text-2xl font-medium text-hacktoberfest-green">
5555
{contributor.name}
5656
</h2>
5757
<a
5858
href={contributor.profile}
59-
className="link text-2023-bavarian-blue-1 hover:text-2023-bavarian-blue-2"
59+
className="link text-hacktoberfest-green hover:text-hacktoberfest-pink w-fit underline-expand"
6060
>
6161
{contributor.profile}
6262
</a>
6363
<div className="justify-center mt-auto card-actions">
6464
<a
65-
className="border-2 text-2023-bavarian-blue-1 btn border-2023-bavarian-blue-2 hover:border-2023-bavarian-blue-2 btn-outline hover:bg-2023-bavarian-blue-2 hover:text-2023-bavarian-blue-4"
65+
className="border-2 text-hacktoberfest-light btn border-hacktoberfest-pink hover:border-hacktoberfest-pink btn-outline hover:bg-hacktoberfest-pink hover:text-hacktoberfest-black"
6666
href={`https://github.com/${contributor.login}`}
6767
target="_blank"
6868
rel="noreferrer"

src/app/(public)/repos/[language]/_components/pagination.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function Pagination({
1818
<div className="flex flex-col items-center gap-4 my-6 justify-evenly sm:gap-0 sm:flex-row">
1919
{page > 1 && (
2020
<Link href={{ query: { ...searchParams, p: page - 1 } }}>
21-
<Button className="btn-wide">
21+
<Button className="btn-wide hover:bg-hacktoberfest-green hover:text-hacktoberfest-dark-green">
2222
<ArrowLeft />
2323
<span className="ml-2">Previous Page</span>
2424
</Button>
@@ -27,7 +27,7 @@ export function Pagination({
2727
{totalCount >= MAX_PER_PAGE &&
2828
page < Math.ceil(totalCount / MAX_PER_PAGE) && (
2929
<Link href={{ query: { ...searchParams, p: page + 1 } }}>
30-
<Button className="btn-wide">
30+
<Button className="btn-wide hover:bg-hacktoberfest-green hover:text-hacktoberfest-dark-green">
3131
<span className="mr-2">Next Page</span>
3232
<ArrowRight />
3333
</Button>

src/app/(public)/repos/[language]/_components/repo-card.tsx

Lines changed: 61 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,43 @@
11
import type { RepoItem } from '@/types';
22
import { emojify } from '@twuni/emojify';
3-
import {
4-
GoAlertFill,
5-
GoIssueOpened,
6-
GoRepoForked,
7-
GoStar
8-
} from 'react-icons/go';
3+
import { GoIssueOpened, GoRepoForked, GoStar } from 'react-icons/go';
94
import { ReportButton } from './report-button';
105

6+
const MAX_DESCRIPTION_LENGTH = 100;
7+
const MAX_TOPICS_DISPLAY = 3;
8+
119
interface RepoCardProps {
1210
repo: RepoItem;
1311
}
1412

1513
export function RepoCard({ repo }: RepoCardProps) {
14+
const truncatedDescription =
15+
repo.description.length > MAX_DESCRIPTION_LENGTH
16+
? repo.description.substring(0, MAX_DESCRIPTION_LENGTH) + '...'
17+
: repo.description;
18+
19+
// Ensure 'hacktoberfest' topic appears first
20+
const sortedTopics = [...repo.topics].sort((a, b) => {
21+
if (a === 'hacktoberfest') return -1;
22+
if (b === 'hacktoberfest') return 1;
23+
return 0;
24+
});
25+
26+
const displayedTopics = sortedTopics.slice(0, MAX_TOPICS_DISPLAY);
27+
const hasMoreTopics = sortedTopics.length > MAX_TOPICS_DISPLAY;
28+
29+
const numberFormatter = new Intl.NumberFormat('en-US', {
30+
notation: 'compact',
31+
compactDisplay: 'short'
32+
});
33+
1634
return (
17-
<section className="transition duration-300 shadow-sm card bg-2023-void-2 ring-1 ring-2023-manga-3 hover:scale-105 hover:shadow-2xl hover:shadow-2023-bavarian-gold-2/30">
35+
<section className="transition duration-300 shadow-sm card bg-hacktoberfest-black ring-1 ring-hacktoberfest-light-pink hover:scale-105 hover:shadow-2xl hover:shadow-hacktoberfest-deep-pink h-96">
1836
<div className="relative p-6 card-body">
1937
<div className="flex-1">
2038
<div className="flex items-center gap-2">
2139
<a
22-
className="border-2 rounded-full h-14 aspect-square p-1.5 border-neutral-100"
40+
className="border-2 rounded-full h-14 aspect-square p-1.5 border-hacktoberfest-beige"
2341
href={repo.owner.html_url}
2442
title={repo.owner.login}
2543
target="_blank"
@@ -31,7 +49,7 @@ export function RepoCard({ repo }: RepoCardProps) {
3149
className="rounded-full"
3250
/>
3351
</a>
34-
<h2 className="overflow-hidden text-3xl cursor-pointer hover:underline text-2023-bavarian-gold-2 whitespace-nowrap text-ellipsis">
52+
<h2 className="overflow-hidden text-3xl cursor-pointer text-hacktoberfest-pink whitespace-nowrap text-ellipsis underline-expand">
3553
<a
3654
href={repo.html_url}
3755
title={repo.name}
@@ -44,87 +62,85 @@ export function RepoCard({ repo }: RepoCardProps) {
4462
<ReportButton repo={repo} />
4563
</div>
4664

47-
<h6 className="my-5 text-lg text-2023-manga-2">
48-
{emojify(repo.description)}
65+
<h6 className="my-5 text-lg text-hacktoberfest-beige">
66+
{emojify(truncatedDescription)}
67+
{repo.description.length > MAX_DESCRIPTION_LENGTH && (
68+
<a
69+
href={repo.html_url}
70+
target="_blank"
71+
rel="noreferrer"
72+
className="text-hacktoberfest-pink ml-2 underline-expand"
73+
>
74+
Read more
75+
</a>
76+
)}
4977
</h6>
5078

5179
<div className="card-actions gap-y-3">
52-
{repo.topics.map((topic: string) => (
80+
{displayedTopics.map((topic: string) => (
5381
<a
5482
key={topic}
5583
href={`https://github.com/topics/${topic}`}
5684
target="_blank"
5785
rel="noreferrer"
5886
className={`badge inline px-3 py-0.5 h-auto ${
5987
topic === 'hacktoberfest'
60-
? 'bg-2023-bavarian-gold-1 text-2023-void-2'
61-
: 'bg-2023-bavarian-blue-2 text-2023-void-2'
88+
? 'bg-hacktoberfest-light-green text-hacktoberfest-dark-green'
89+
: 'bg-hacktoberfest-deep-pink text-hacktoberfest-light-pink'
6290
}`}
6391
>
6492
{topic}
6593
</a>
6694
))}
95+
{hasMoreTopics && (
96+
<span className="text-hacktoberfest-pink ml-2">...</span>
97+
)}
6798
</div>
6899
</div>
69100

70101
{/* stars and forks cards */}
71-
<div className="flex flex-wrap justify-between gap-3 mt-8 cursor-pointer container-query xl:gap-5 text-neutral-100">
102+
<div className="flex flex-wrap justify-between gap-4 mt-8 cursor-pointer container-query text-neutral-100">
72103
<a
73104
href={`${repo.html_url}/stargazers`}
74105
target="_blank"
75-
className="group w-full flex-shrink-0 flex-grow-1 basis-[120px] border rounded-xl p-3 xl:px-4 flex items-center gap-2 xl:gap-3 relative"
106+
className="w-full flex-shrink-0 flex-grow basis-[120px] border rounded-xl flex items-center justify-center py-4 gap-3 relative border-hacktoberfest-pink tooltip tooltip-bottom"
107+
data-tip="Click to see stargazers"
76108
>
77-
<GoStar className="text-2xl text-yellow-200" />
109+
<GoStar className="text-2xl text-hacktoberfest-pink" />
78110
<div className="flex flex-col">
79-
<div className="text-lg xl:text-2xl font-medium mb-0.5">
80-
{repo.stargazers_count}
111+
<div className="text-lg xl:text-2xl font-medium mb-0.5 text-hacktoberfest-light">
112+
{numberFormatter.format(repo.stargazers_count)}
81113
</div>
82114
<div className="text-xs text-neutral-300 lg:text-sm">Stars</div>
83115
</div>
84-
<div
85-
id="tooltip"
86-
className="absolute hidden px-2 py-1 text-sm rounded-md group-hover:block bg-2023-void-2 text-2023-bavarian-gold-2"
87-
>
88-
Checkout all the stars here!
89-
</div>
90116
</a>
91117
<a
92118
href={`${repo.html_url}/forks`}
93119
target="_blank"
94-
className="group flex-shrink-0 flex-grow-1 basis-[120px] border rounded-xl p-3 flex items-center gap-3 relative"
120+
className="flex-shrink-0 flex-grow basis-[120px] border rounded-xl p-4 flex items-center justify-center gap-3 relative border-hacktoberfest-pink tooltip tooltip-bottom"
121+
data-tip="Click to see forks"
95122
>
96-
<GoRepoForked className="text-2xl text-yellow-200" />
123+
<GoRepoForked className="text-2xl text-hacktoberfest-pink" />
97124
<div className="flex flex-col">
98-
<div className="text-lg xl:text-2xl font-medium mb-0.5">
99-
{repo.forks}
125+
<div className="text-lg xl:text-2xl font-medium mb-0.5 text-hacktoberfest-light">
126+
{numberFormatter.format(repo.forks)}
100127
</div>
101128
<div className="text-xs text-neutral-300 lg:text-sm">Forks</div>
102129
</div>
103-
<div
104-
id="tooltip"
105-
className="absolute hidden px-2 py-1 text-sm rounded-md group-hover:block bg-2023-void-2 text-2023-bavarian-gold-2"
106-
>
107-
Checkout all the forks here!
108-
</div>
109130
</a>
110131
<a
111132
href={`${repo.html_url}/issues`}
112133
target="_blank"
113-
className="group issues-btn flex-shrink-0 flex-grow-1 basis-[120px] border rounded-xl p-3 flex items-center gap-3 relative"
134+
className="flex-shrink-0 flex-grow basis-[120px] border rounded-xl p-4 flex items-center justify-center gap-3 relative border-hacktoberfest-pink tooltip tooltip-bottom"
135+
data-tip="Click to see issues"
114136
>
115-
<GoIssueOpened className="text-2xl text-yellow-200" />
137+
<GoIssueOpened className="text-2xl text-hacktoberfest-pink" />
116138
<div className="flex flex-col">
117-
<div className="text-lg xl:text-2xl font-medium mb-0.5">
118-
{repo.open_issues_count}
139+
<div className="text-lg xl:text-2xl font-medium mb-0.5 text-hacktoberfest-light">
140+
{numberFormatter.format(repo.open_issues_count)}
119141
</div>
120142
<div className="text-xs text-neutral-300 lg:text-sm">Issues</div>
121143
</div>
122-
<div
123-
id="tooltip"
124-
className="absolute hidden px-2 py-1 text-sm rounded-md group-hover:block bg-2023-void-2 text-2023-bavarian-gold-2"
125-
>
126-
Checkout all open issues here!
127-
</div>
128144
</a>
129145
</div>
130146
</div>

0 commit comments

Comments
 (0)