Skip to content

Commit bf9464f

Browse files
committed
feat: update docs to patterns path
1 parent c75802b commit bf9464f

File tree

16 files changed

+37
-34
lines changed

16 files changed

+37
-34
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ This is an non-exhaustive list of available and incoming patterns.
1313

1414
### Navigation
1515

16-
- [Breadcrumbs](https://uxpatterns.dev/en/docs/navigation/breadcrumb)
16+
- [Breadcrumbs](https://uxpatterns.dev/en/patterns/navigation/breadcrumb)
1717
- Navigation Menu (coming soon)
1818
- Pagination (coming soon)
1919

2020
### Input & Forms
2121

22-
- [Button](https://uxpatterns.dev/en/docs/forms/button)
22+
- [Button](https://uxpatterns.dev/en/patterns/forms/button)
2323
- Checkbox (coming soon)
2424
- Code Confirmation (coming soon)
2525
- Color Picker (coming soon)

app/_components/subscribe.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export const SubscribeForm = () => {
6161
};
6262

6363
return (
64-
<div className="flex flex-col mt-10 items-center justify-center py-10 px-4 text-center border border-neutral-400 dark:border-neutral-600 rounded-xl">
65-
<h2 className="text-2xl font-bold mb-5 text-foreground">
64+
<section className="flex flex-col mt-10 items-center justify-center py-10 px-4 text-center border border-neutral-400 dark:border-neutral-600 rounded-xl" aria-labelledby="subscribe-title">
65+
<h2 id="subscribe-title" className="text-2xl font-bold mb-5 text-foreground">
6666
Get notified when new patterns are added!
6767
</h2>
6868
<form onSubmit={handleSubmit} className="space-y-4">
@@ -112,6 +112,6 @@ export const SubscribeForm = () => {
112112
)}
113113
</div>
114114
</form>
115-
</div>
115+
</section>
116116
);
117117
}

app/_components/suggest-pattern.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { PROJECT_URL } from '@/app/_constants/project'
2+
import { LinkCustom } from './link-custom'
23
import { Button } from './ui/button'
34

4-
export function SuggestPattern() {
5+
export const SuggestPattern = () => {
56
return (
6-
<div className="flex flex-col mt-10 items-center justify-center py-10 px-4 text-center border border-neutral-400 dark:border-neutral-600 rounded-xl">
7-
<h2 className="text-2xl font-bold mb-5 text-foreground">Got a pattern request?</h2>
7+
<section className="flex flex-col mt-10 items-center justify-center py-10 px-4 text-center border border-neutral-400 dark:border-neutral-600 rounded-xl" aria-labelledby="suggest-pattern-title">
8+
<h2 id="suggest-pattern-title" className="text-2xl font-bold mb-5 text-foreground">Got a pattern request?</h2>
89
<p className="text-lg text-muted-foreground mb-6">
910
Let us know, and we&apos;ll add it!
1011
</p>
@@ -13,15 +14,13 @@ export function SuggestPattern() {
1314
className="font-medium"
1415
asChild
1516
>
16-
<a
17+
<LinkCustom
1718
href={`${PROJECT_URL}/discussions/new?category=suggestions`}
18-
target="_blank"
19-
rel="noopener noreferrer"
2019
className="plausible-event-name=Suggest+Pattern"
2120
>
2221
Send Suggestion
23-
</a>
22+
</LinkCustom>
2423
</Button>
25-
</div>
24+
</section>
2625
)
2726
}

app/_constants/footer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export const FOOTER_MENU_LINKS = (lang: string) => [
44
label: 'Home'
55
},
66
{
7-
path: '/docs',
8-
label: 'Documentation'
7+
path: '/patterns',
8+
label: 'Patterns'
99
},
1010
{
1111
path: '/blog',

app/_constants/patterns/forms.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ export const formPatterns = [
2929
{
3030
title: 'Autocomplete',
3131
description: 'Suggest options as users type',
32-
href: '/docs/forms/autocomplete',
32+
href: '/patterns/forms/autocomplete',
3333
icon: Search
3434
},
3535
{
3636
title: 'Button',
3737
description: 'Trigger actions and submit forms',
38-
href: '/docs/forms/button',
38+
href: '/patterns/forms/button',
3939
icon: MousePointerClick
4040
},
4141
{

app/_constants/patterns/navigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const navigationPatterns = [
44
{
55
title: 'Breadcrumb',
66
description: 'Help users understand their current location',
7-
href: '/docs/navigation/breadcrumb',
7+
href: '/patterns/navigation/breadcrumb',
88
icon: Navigation2,
99
},
1010
{

app/_constants/routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const ROUTES = {
22
home: '/',
3-
docs: '/docs',
3+
patterns: '/patterns',
44
email: '/api/email',
55
} as const;

app/sitemap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default function sitemap(): MetadataRoute.Sitemap {
4747
routes.push({
4848
url: `${BASE_URL}/${locale}${page ? `/${page}` : ''}`,
4949
lastModified: new Date(),
50-
changeFrequency: page.includes('docs') ?
50+
changeFrequency: page.includes('patterns') ?
5151
"weekly" :
5252
"monthly",
5353
priority: getPriority(page),
@@ -68,7 +68,7 @@ export default function sitemap(): MetadataRoute.Sitemap {
6868

6969
function getPriority(path: string): number {
7070
if (!path) return 1; // Homepage
71-
if (path === 'docs/getting-started') return 0.9;
72-
if (path.startsWith('docs/')) return 0.8;
71+
if (path === 'patterns/getting-started') return 0.9;
72+
if (path.startsWith('patterns/')) return 0.8;
7373
return 0.5; // Other pages
7474
}

content/en/_meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export default {
66
typesetting: 'article'
77
}
88
},
9-
docs: {
9+
patterns: {
1010
type: 'page',
11-
title: 'Documentation'
11+
title: 'Patterns'
1212
},
1313
blog: {
1414
type: 'page',
File renamed without changes.

0 commit comments

Comments
 (0)