Skip to content

Commit c33131f

Browse files
committed
Refactor header and hero components; add SVG icons for logo and hero section. Update styles for improved responsiveness and visual consistency.
1 parent fff40fd commit c33131f

File tree

3 files changed

+1256
-17
lines changed

3 files changed

+1256
-17
lines changed

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,30 @@ 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';
910

1011
export async function Header() {
1112
const session = await auth();
1213

1314
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-
/>
15+
<header className="fixed top-0 left-0 w-full z-50 py-3 px-6">
16+
<div className="border border-hacktoberfest-light-blue rounded-lg py-4 px-6 container mx-auto bg-[radial-gradient(85.48%_85.48%_at_50%_0%,rgb(64,63,125)_0%,rgb(from_rgb(28,28,63)_r_g_b/_0)_100%)] backdrop-blur-md shadow-lg">
17+
<div className="flex justify-between items-center">
18+
<Link href="/" className="z-5">
19+
<LogoIconsSvg />
2320
</Link>
2421

2522
<SearchForm />
2623

2724
<div className="flex gap-2 lg:ml-40">
2825
<form action={session ? signOutAction : signInAction}>
29-
<button className="text-white border-white btn btn-ghost border-1 ms-4">
26+
<button className="text-white border-white btn btn-ghost border-1 ms-4 hover:bg-blue-700 transition-colors">
3027
{session && session.user ? 'Sign Out' : 'Sign In'}
3128
</button>
3229
</form>
3330
<Link
3431
href="/contributors"
35-
className="btn btn-square btn-ghost umami--click--contributors-button"
32+
className="btn btn-square btn-ghost umami--click--contributors-button hover:bg-blue-700 transition-colors"
3633
>
3734
<BsPeopleFill size="1.5rem" color="white" title="Contributors" />
3835
</Link>
@@ -41,7 +38,7 @@ export async function Header() {
4138
href="https://github.com/max-programming/hacktoberfest-projects"
4239
target="_blank"
4340
rel="noreferrer"
44-
className="btn btn-square btn-ghost umami--click--github-button"
41+
className="btn btn-square btn-ghost umami--click--github-button hover:bg-blue-700 transition-colors"
4542
>
4643
<IoLogoGithub size="1.5rem" color="white" title="GitHub" />
4744
</a>

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ 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';
1213

1314
const { main: mainLanguages, others: otherLanguages } = languages;
1415

@@ -23,9 +24,8 @@ export function Hero() {
2324
}
2425

2526
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">
27+
<div className="relative min-h-screen bg-(radial-gradient(85.48% 85.48% at 50% 0%, rgb(64, 63, 125) 0%, rgb(from rgb(28, 28, 63) r g b / 0) 100%)) ">
28+
{/* <div className="text-center hero-content">
2929
<div className="max-w-md">
3030
<h1 className="mb-5 text-5xl font-medium uppercase text-hacktoberfest-light-pink">
3131
Search your language
@@ -39,13 +39,13 @@ export function Hero() {
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-hacktoberfest-light border-hacktoberfest-light focus:outline-hacktoberfest-light-pink placeholder:text-hacktoberfest-light-green"
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-blue"
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 text-hacktoberfest-light-green border-hacktoberfest-light hover:bg-hacktoberfest-light-pink hover:text-hacktoberfest-deep-pink hover:border-hacktoberfest-light-pink"
48+
className="bg-transparent rounded-tl-none rounded-bl-none group btn btn-square text-hacktoberfest-light-blue border-hacktoberfest-light hover:bg-hacktoberfest-light-pink hover:text-hacktoberfest-deep-pink hover:border-hacktoberfest-light-pink"
4949
>
5050
<Search />
5151
</button>
@@ -79,6 +79,9 @@ export function Hero() {
7979
</ul>
8080
</div>
8181
</div>
82+
</div> */}
83+
<div className="absolute top-0 left-0 w-full h-full">
84+
<HeroSectionSvg className="w-full h-full" />
8285
</div>
8386
</div>
8487
);

0 commit comments

Comments
 (0)