Skip to content

Commit c2eddc9

Browse files
author
Numan
committed
Refactor footer implementation and update links to use constants
1 parent 8874531 commit c2eddc9

8 files changed

Lines changed: 41 additions & 53 deletions

File tree

README.md

2 Bytes

👤 Author


app/(docs-page)/layout.tsx

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import Header from '@/components/website/header';
33
import DocsSidebar from '@/components/website/sidebar';
4+
import { Footer } from '@/components/website/footer';
45

56
export default async function ComponentLayout({
67
children,
@@ -14,31 +15,7 @@ export default async function ComponentLayout({
1415
<DocsSidebar />
1516
<div className=' min-w-0 max-w-full'>{children}</div>
1617
</main>
17-
<footer className='border-t pb-24 pt-4 xl:pb-4'>
18-
<div className='container mx-auto'>
19-
<p className='text-balance text-center text-sm leading-loose text-muted-foreground md:text-left'>
20-
Built by{' '}
21-
<a
22-
href='https://x.com/numann_dev'
23-
target='_blank'
24-
rel='noreferrer'
25-
className='font-medium underline underline-offset-4'
26-
>
27-
numann
28-
</a>{' '}
29-
. The source code is available on{' '}
30-
<a
31-
href='https://github.com/numanndev/structui'
32-
target='_blank'
33-
rel='noreferrer'
34-
className='font-medium underline underline-offset-4'
35-
>
36-
GitHub
37-
</a>
38-
.
39-
</p>
40-
</div>
41-
</footer>
18+
<Footer />
4219
</>
4320
);
4421
}

app/page.tsx

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import { Footer } from '@/components/website/footer';
12
import Header from '@/components/website/header';
23
import HeroSec from '@/components/website/hero-sec';
4+
import { OWNER_URL } from '@/components/website/utils/websiteConstants';
35

46
export default function Home() {
57
return (
@@ -8,31 +10,7 @@ export default function Home() {
810
<main className='relative'>
911
<HeroSec />
1012
</main>
11-
<footer className='border-t pb-24 pt-4 xl:pb-4 absolute bottom-0 w-full z-[2]'>
12-
<div className='container mx-auto'>
13-
<p className='text-balance text-center text-sm leading-loose text-muted-foreground md:text-left'>
14-
Built by{' '}
15-
<a
16-
href='https://x.com/numann_dev'
17-
target='_blank'
18-
rel='noreferrer'
19-
className='font-medium underline underline-offset-4'
20-
>
21-
numann
22-
</a>{' '}
23-
. The source code is available on{' '}
24-
<a
25-
href='https://github.com/numanndev/structui'
26-
target='_blank'
27-
rel='noreferrer'
28-
className='font-medium underline underline-offset-4'
29-
>
30-
GitHub
31-
</a>
32-
.
33-
</p>
34-
</div>
35-
</footer>
13+
<Footer />
3614
</>
3715
);
3816
}

components/website/footer.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { OWNER_URL } from "./utils/websiteConstants"
2+
3+
export const Footer = () => {
4+
return (
5+
<footer className='border-t pb-24 pt-4 xl:pb-4'>
6+
<div className='container mx-auto'>
7+
8+
<div className='flex gap-2 items-center justify-center'>
9+
<p className='text-balance text-center text-sm leading-loose text-muted-foreground md:text-center'>
10+
© 2025 Struct-UI. All rights reserved.
11+
</p>
12+
13+
Built with
14+
<img src="https://numan-dev.web.app/images/num_heart.gif" width="26px" />
15+
by{' '}
16+
<a
17+
href={OWNER_URL}
18+
target='_blank'
19+
rel='noreferrer'
20+
className='font-medium underline underline-offset-4'
21+
>
22+
&lt;N_Ah/&gt;
23+
</a>
24+
</div>
25+
</div>
26+
</footer>
27+
)
28+
}

components/website/header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
X,
1919
} from 'lucide-react';
2020
import { SearchDialog } from './searchbar';
21+
import { OWNER_URL } from './utils/websiteConstants';
2122
// import MobileHeader from './moibile-header'
2223

2324
function Header() {
@@ -81,7 +82,7 @@ function Header() {
8182

8283
<a
8384
target='_blank'
84-
href='https://x.com/numann_dev'
85+
href={OWNER_URL}
8586
className='border flex-shrink-0 bg-primary text-primary-foreground text-2xl w-12 grid place-content-center rounded-md'
8687
>
8788
<svg

components/website/searchbar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { generateSidebarData } from './constant';
1919
import { cn } from '@/lib/utils';
2020
import { basePath } from './sidebar';
2121
import { creativeComponents, basicComponents } from '@/configs/leftSideComponentMetaData';
22+
import { OWNER_URL } from './utils/websiteConstants';
2223

2324
// import { componentsArr } from './sidebar';
2425

@@ -88,7 +89,7 @@ export function SearchDialog({ classname }: { classname?: string }) {
8889
Follow for more updates
8990
</span>
9091
<a
91-
href='https://x.com/numann_dev'
92+
href={OWNER_URL}
9293
target='_blank'
9394
className='flex w-full items-center gap-2 rounded-md bg-blue-500/20 p-3'
9495
>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const SITE_NAME = 'Struct-UI';
2+
export const SITE_URL = 'https://www.struct-ui.com';
3+
export const OWNER_URL = 'https://numan-dev.web.app';

registry/components/footers/hover-footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function index() {
4545
</svg>
4646
</a>
4747
<a
48-
href='https://x.com/numann_dev'
48+
href='https://numan-dev.web.app'
4949
target='_blank'
5050
className='bg-gray-50 sm:w-auto w-full grid place-content-center 2xl:h-40 h-32 2xl:p-10 p-5 rounded-lg'
5151
>

0 commit comments

Comments
 (0)