Skip to content

Commit 67c78d3

Browse files
authored
Merge pull request #11 from iswilljr/website-improvements
fix: improve design, accessibility and SEO
2 parents c5944b1 + 6e2e845 commit 67c78d3

File tree

9 files changed

+18
-8
lines changed

9 files changed

+18
-8
lines changed

src/app/(auth)/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function Login({ searchParams }: DefaultPageProps) {
2121
<IconLogo className='h-10 w-10' />
2222
</Link>
2323
<h3 className='text-xl font-bold'>Sign in to Xlug</h3>
24-
<p className='text-sm text-neutral-500'>Start shorting and managing long URLs.</p>
24+
<p className='text-sm text-neutral-500 dark:text-neutral-400'>Start shorting and managing long URLs.</p>
2525
</div>
2626
<LoginButtons redirectTo={redirectTo ?? '/dashboard'} />
2727
</section>

src/app/layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ export const metadata = generateBaseMetadata()
1010

1111
export default function Layout({ children }: React.PropsWithChildren) {
1212
return (
13-
<html lang='en'>
13+
<html
14+
lang='en'
15+
suppressHydrationWarning // next-themes package adds extra attributes to the html element in dark mode
16+
>
1417
<body className={cn(inter.className, 'bg-white dark:bg-neutral-950')}>
1518
<SessionProvider>
1619
<ThemeProvider>

src/app/not-found.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Link from 'next/link'
22
import { buttonVariants } from '@/ui/button'
33
import { Error } from '@/components/error'
44
import { siteConfig } from '@/config/site'
5+
import { cn } from '@/utils/cn'
56

67
export default function NotFound() {
78
return (
@@ -18,7 +19,13 @@ export default function NotFound() {
1819
</span>
1920
}
2021
>
21-
<Link className={buttonVariants({ variant: 'outline', size: 'sm', className: 'text-black' })} href='/'>
22+
<Link
23+
className={cn(
24+
buttonVariants({ variant: 'outline', size: 'sm' }),
25+
'text-black dark:bg-neutral-700 dark:text-white'
26+
)}
27+
href='/'
28+
>
2229
Go Home
2330
</Link>
2431
</Error>

src/components/forms/create-public-link.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export function CreatePublicLinkForm() {
7070
disabled={hasReachedMaxPublicLinks}
7171
size='icon'
7272
variant='outline'
73+
aria-label='Create public link'
7374
className='h-7 w-7 dark:bg-neutral-800 dark:hover:bg-neutral-700/90'
7475
icon={<Send className='h-4 w-4' />}
7576
/>

src/components/links/link-filters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function LinkFilters() {
3737
/>
3838
<CreateLinkDialog
3939
trigger={
40-
<Button className='h-9 w-9 px-2 sm:min-w-[7rem]'>
40+
<Button aria-label='Create Link' className='h-9 w-9 px-2 sm:min-w-[7rem]'>
4141
<Plus className='sm:hidden' />
4242
<span className='hidden sm:inline-block'>Create Link</span>
4343
</Button>

src/components/theme-switcher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function ThemeSwitcher() {
1212
<DropdownMenu
1313
align='end'
1414
trigger={
15-
<Button size='icon' variant='ghost' className='h-8 w-8'>
15+
<Button aria-label='Switch between dark and light theme' size='icon' variant='ghost' className='h-8 w-8'>
1616
<Sparks className='h-5 w-5 stroke-2' />
1717
</Button>
1818
}

src/layout/dashboard/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function DashboardHeader() {
66
return (
77
<header className='flex h-14 w-full items-center justify-between px-6'>
88
<DashboardHomeLink />
9-
<div className='flex gap-2'>
9+
<div className='flex items-center gap-2'>
1010
<ThemeSwitcher />
1111
<AvatarMenu />
1212
</div>

src/layout/home/footer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export function HomeFooter() {
1212
href={siteConfig.links.profile}
1313
target='_blank'
1414
rel='noreferrer'
15-
aria-label='My github profile'
1615
>
1716
Will
1817
</a>

src/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ export function middleware(req: NextRequest) {
1515
}
1616

1717
export const config = {
18-
matcher: ['/((?!api|_next/static|_next/image|assets|icons|favicon).*)'],
18+
matcher: ['/((?!api|_next/static|_next/image|assets|icons|favicon|robots.txt).*)'],
1919
}

0 commit comments

Comments
 (0)