Skip to content

Commit a2e6970

Browse files
committed
Header styling change
1 parent 23b612d commit a2e6970

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

website/app/[slug]/page.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
StandardExample,
88
ZeroDependencyExample,
99
} from '@/components/Examples';
10+
import { Hero } from '@/components/Hero';
1011
import { Renderer } from '@/components/Renderer';
1112
import { Button } from '@/components/ui/Button';
1213
import LOADERS from '@/lib/config/loaders';
@@ -30,17 +31,9 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
3031

3132
return (
3233
<>
33-
<section className='px-6 py-12'>
34-
<h1 className='relative text-center text-4xl font-semibold text-balance text-neutral-100 md:text-5xl'>
35-
{slug}
36-
</h1>
37-
<p className='relative py-6 text-center text-neutral-50'>
38-
The {category.toLocaleLowerCase()} collection
39-
</p>
40-
</section>
41-
<section className='w-full border border-x-0 border-b-0 border-t-neutral-800 p-6'>
42-
<div className='relative flex min-h-96 flex-col items-center justify-center overflow-hidden border border-neutral-800 bg-black p-6'>
43-
<div className='absolute top-4 z-40 flex w-full flex-row items-center justify-between px-4'>
34+
<section>
35+
<Hero title={slug} description={`The ${category.toLocaleLowerCase()} collection`}>
36+
<div className='z-50 flex flex-row items-center justify-between'>
4437
<BackButton />
4538
<Link href={`/${nextLoader}`}>
4639
<Button
@@ -50,6 +43,10 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
5043
/>
5144
</Link>
5245
</div>
46+
</Hero>
47+
</section>
48+
<section className='w-full border border-x-0 border-b-0 border-t-neutral-800 p-6'>
49+
<div className='relative flex min-h-96 flex-col items-center justify-center overflow-hidden border border-neutral-800 bg-black p-6'>
5350
<div className='absolute size-full bg-[linear-gradient(to_right,#1a1a1a_1px,transparent_1px),linear-gradient(to_bottom,#1a1a1a_1px,transparent_1px)] bg-[size:8px_10px] [mask-image:radial-gradient(ellipse_50%_50%_at_50%_50%,#000_10%,transparent_100%)]' />
5451
<Renderer speed={speed} keyframes={keyframes} />
5552
</div>

website/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const HomePage = () => {
1212
description='A collection of animated CLI loaders for your projects'
1313
>
1414
<div className='flex flex-col items-center justify-center'>
15-
<div className='flex items-center border border-neutral-800'>
15+
<div className='mt-8 flex items-center border border-neutral-800'>
1616
<code className='relative inline-flex h-6 px-2 pt-0.5'>
1717
npm install cli-loaders
1818
</code>

website/components/Hero.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import type { HeroProps } from '@/types';
22

33
export const Hero = ({ title, description, children }: HeroProps) => (
44
<section>
5-
<div className='px-6 py-12'>
5+
<div className='py-12 px-6'>
66
<h1 className='text-center text-4xl font-semibold text-balance text-neutral-50 md:text-5xl'>
77
{title}
88
</h1>
9-
<p className='pt-6 pb-12 text-center text-neutral-100'>{description}</p>
9+
<p className='pt-3 text-center text-neutral-100'>{description}</p>
1010
{children}
1111
</div>
1212
</section>

0 commit comments

Comments
 (0)