Skip to content

Commit 828fea4

Browse files
authored
Merge branch 'Ansub:main' into main
2 parents fa10469 + 86041fe commit 828fea4

File tree

19 files changed

+105
-240
lines changed

19 files changed

+105
-240
lines changed

credits.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
- Labeled Toggle - [Aiko](https://twitter.com/username_aiko)
1515
- Border Glow Button - [Ethan Pollack](https://epoll31.github.io)
1616
- Shine Button - [Shriprasanna](https://twitter.com/shriprasanna007)
17+
- Text Reveal Button - [Shriprasanna](https://twitter.com/shriprasanna007)

next.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ const nextConfig = {
2424
destination: 'https://git.new/syntax',
2525
permanent: true,
2626
},
27+
{
28+
source: '/discord',
29+
destination: 'https://discord.com/invite/P8GXYyH3ZU',
30+
permanent: true,
31+
},
2732
]
2833
},
2934
images: {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export const metadata = {
2+
title: 'Text Reveal Button',
3+
description:
4+
'A button with an icon that displays text on hover, implemented using Tailwind CSS for React and libraries like Next.js.',
5+
}
6+
7+
<BackButton href="/components/button" />
8+
<ComponentPreview path="components/button/TextRevealButton" />

src/app/(docs)/components/toggle/neubrutalism-toggle/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ export const metadata = {
44
}
55

66
<BackButton href="/components/toggle" />
7-
<ComponentPreview path="components/toggle/NeubrutalismToggle" usingFramer/>
7+
<ComponentPreview path="components/toggle/NeubrutalismToggle"/>

src/app/robots.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const baseUrl = 'https://syntaxui.com'
2+
3+
export default function robots() {
4+
return {
5+
rules: [
6+
{
7+
userAgent: '*',
8+
},
9+
],
10+
sitemap: `${baseUrl}/sitemap.xml`,
11+
host: `${baseUrl}`,
12+
}
13+
}

src/app/sitemap.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { MetadataRoute } from 'next'
2+
import fs from 'fs'
3+
import path from 'path'
4+
5+
const rootDir = path.join(process.cwd(), 'src/app')
6+
7+
export default function sitemap(): MetadataRoute.Sitemap {
8+
const urls: MetadataRoute.Sitemap = []
9+
10+
function readDirectory(dir: string, baseUrl: string) {
11+
const files = fs.readdirSync(dir)
12+
13+
files.forEach((file) => {
14+
const filePath = path.join(dir, file)
15+
const stats = fs.statSync(filePath)
16+
17+
if (stats.isDirectory()) {
18+
// Recursively search subdirectories
19+
readDirectory(filePath, `${baseUrl}/${file}`)
20+
} else if (file.endsWith('page.tsx') || file.endsWith('page.mdx')) {
21+
// Adjust path by removing "/(docs)"
22+
const adjustedUrl = baseUrl.replace('/(docs)', '')
23+
24+
// Add this page to the sitemap
25+
urls.push({
26+
url: `https://syntaxui.com${adjustedUrl || '/'}`,
27+
lastModified: new Date().toISOString(),
28+
priority: 1,
29+
changeFrequency: 'daily',
30+
})
31+
}
32+
})
33+
}
34+
35+
// Initialize the recursive search
36+
readDirectory(rootDir, '')
37+
38+
return urls
39+
}

src/app/sitemap.xml

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

src/components/Header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function TopLevelNavItem({
2525
<li>
2626
<Link
2727
href={href}
28-
className="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white"
28+
className="whitespace-nowrap text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white"
2929
>
3030
{children}
3131
</Link>
@@ -95,7 +95,7 @@ export const Header = forwardRef<
9595
</ul>
9696
</div>
9797
{/* <Search /> */}
98-
<div className="flex items-center gap-5 lg:hidden">
98+
<div className="flex items-center gap-3 lg:hidden">
9999
{pathname === '/' ? null : <MobileNavigation />}
100100
<Link
101101
href="/"
@@ -109,7 +109,7 @@ export const Header = forwardRef<
109109
width={100}
110110
height={100}
111111
/>
112-
<div className="text-md font-medium text-gray-800">
112+
<div className="text-md hidden font-medium text-gray-800 md:inline">
113113
Syntax<span className="text-[10px] font-bold text-red-500">UI</span>
114114
</div>{' '}
115115
</Link>

src/components/MobileNavigation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ export function MobileNavigation() {
158158
<IsInsideMobileNavigationContext.Provider value={true}>
159159
<button
160160
type="button"
161-
className="flex h-6 w-6 items-center justify-center rounded-md transition hover:bg-zinc-900/5 dark:hover:bg-white/5"
161+
className="flex h-6 w-10 items-center justify-center rounded-md transition hover:bg-zinc-900/5 dark:hover:bg-white/5"
162162
aria-label="Toggle navigation"
163163
onClick={toggle}
164164
>
165-
<ToggleIcon className="w-2.5 stroke-zinc-900 dark:stroke-white" />
165+
<ToggleIcon className="w-3 stroke-zinc-900 dark:stroke-white" />
166166
</button>
167167
{!isInsideMobileNavigation && (
168168
<Suspense fallback={null}>

src/showcase/components/button/3DButton.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
'use client'
2-
3-
import React from 'react'
4-
51
const ThreeDButton = () => {
62
return (
7-
<button
8-
className="group relative m-1 inline-flex cursor-pointer items-center justify-center overflow-hidden rounded-lg border-b-2 border-l-2 border-r-2 border-red-700 bg-gradient-to-tr from-red-600 to-red-500 px-4 py-1 text-white shadow-lg transition duration-100 ease-in-out active:translate-y-0.5 active:border-red-600 active:shadow-none"
9-
onClick={() => console.log('Hello')}
10-
>
3+
<button className="group relative m-1 inline-flex cursor-pointer items-center justify-center overflow-hidden rounded-lg border-b-2 border-l-2 border-r-2 border-red-700 bg-gradient-to-tr from-red-600 to-red-500 px-4 py-1 text-white shadow-lg transition duration-100 ease-in-out active:translate-y-0.5 active:border-red-600 active:shadow-none">
114
<span className="absolute h-0 w-0 rounded-full bg-white opacity-10 transition-all duration-300 ease-out group-hover:h-32 group-hover:w-32"></span>
125
<span className="relative font-medium">SyntaxUI</span>
136
</button>

0 commit comments

Comments
 (0)