Skip to content

Commit 1925fe6

Browse files
authored
feat(landing-page): add /alternatives/pencil-dev/ comparison page (#5254)
Co-authored-by: Joey <276262049+xne998808-ai@users.noreply.github.com>
1 parent f221a0f commit 1925fe6

10 files changed

Lines changed: 277 additions & 10 deletions

File tree

apps/landing-page/app/_components/site-footer.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ const l = getFooterLegalCopy(locale);
108108
<li><a href={href('/alternatives/figma-make/')}>Figma Make</a></li>
109109
<li><a href={href('/alternatives/qoder/')}>Qoder</a></li>
110110
<li><a href={href('/alternatives/trae/')}>Trae</a></li>
111+
<li><a href={href('/alternatives/pencil-dev/')}>Pencil</a></li>
111112
</ul>
112113
</div>
113114

apps/landing-page/app/alternatives-i18n.part-h.ts

Lines changed: 18 additions & 0 deletions
Large diffs are not rendered by default.

apps/landing-page/app/alternatives-i18n.ts

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,29 @@ import { ALT_PART_D } from './alternatives-i18n.part-d';
77
import { ALT_PART_E } from './alternatives-i18n.part-e';
88
import { ALT_PART_F } from './alternatives-i18n.part-f';
99
import { ALT_PART_G } from './alternatives-i18n.part-g';
10+
import { ALT_PART_H } from './alternatives-i18n.part-h';
1011

1112
type AltMap = Partial<Record<string, AlternativeDetailCopy>>;
1213

13-
export const LOCALIZED_ALTERNATIVES: Partial<Record<string, AltMap>> = {
14-
...ALT_PART_A,
15-
...ALT_PART_B,
16-
...ALT_PART_C,
17-
...ALT_PART_D,
18-
...ALT_PART_E,
19-
...ALT_PART_F,
20-
...ALT_PART_G,
21-
};
14+
const PARTS: Partial<Record<string, AltMap>>[] = [
15+
ALT_PART_A,
16+
ALT_PART_B,
17+
ALT_PART_C,
18+
ALT_PART_D,
19+
ALT_PART_E,
20+
ALT_PART_F,
21+
ALT_PART_G,
22+
ALT_PART_H,
23+
];
24+
25+
// Deep-merge per locale so a later shard can contribute a single slug to a
26+
// locale without clobbering the slugs an earlier shard already supplied.
27+
export const LOCALIZED_ALTERNATIVES: Partial<Record<string, AltMap>> = {};
28+
for (const part of PARTS) {
29+
for (const [locale, map] of Object.entries(part)) {
30+
LOCALIZED_ALTERNATIVES[locale] = {
31+
...(LOCALIZED_ALTERNATIVES[locale] ?? {}),
32+
...(map ?? {}),
33+
};
34+
}
35+
}

apps/landing-page/app/info-page-i18n.ts

Lines changed: 216 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
import PencilDevAlternativePage from '../../../alternatives/pencil-dev/index.astro';
3+
import { DEFAULT_LOCALE, LANDING_LOCALES } from '../../../../i18n';
4+
5+
export function getStaticPaths() {
6+
return LANDING_LOCALES.filter((locale) => locale.code !== DEFAULT_LOCALE).map(
7+
(locale) => ({ params: { locale: locale.code } }),
8+
);
9+
}
10+
---
11+
12+
<PencilDevAlternativePage />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
import AlternativeDetail from '../../../_components/alternative-detail.astro';
3+
---
4+
5+
<AlternativeDetail slug="pencil-dev" competitorName="Pencil" />

apps/landing-page/app/pages/compare/index.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const limitsFaq = page.limitsFaq.map(({ name, text }) => ({ q: name, a: text }))
4040
// comparison pages and is localized for free. Add a slug here when a new
4141
// alternatives page lands. `cta` reuses the localized "read the full
4242
// comparison" label from the compare copy block.
43-
const COMPARE_SLUGS = ['claude-design', 'figma', 'lovable', 'bolt', 'v0', 'framer', 'stitch', 'genspark', 'figma-make', 'qoder', 'trae'];
43+
const COMPARE_SLUGS = ['claude-design', 'figma', 'lovable', 'bolt', 'v0', 'framer', 'stitch', 'genspark', 'figma-make', 'qoder', 'trae', 'pencil-dev'];
4444
const NAMES: Record<string, string> = {
4545
'claude-design': 'Claude Design',
4646
figma: 'Figma',
@@ -53,6 +53,7 @@ const NAMES: Record<string, string> = {
5353
'figma-make': 'Figma Make',
5454
qoder: 'Qoder',
5555
trae: 'Trae',
56+
'pencil-dev': 'Pencil',
5657
};
5758
const ctaLabel = page.comparisons[0]?.cta ?? 'Read the full comparison ->';
5859
const comparisons = COMPARE_SLUGS.map((slug) => {
171 KB
Loading
120 KB
Loading
29.5 KB
Loading

0 commit comments

Comments
 (0)