From c25da02c6c2fff5e2cb7fdb31d885622e2436e43 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Oct 2026 10:58:00 +0000 Subject: [PATCH] docs: add X (Twitter) QR code generator page Adds /x-qr-code, a landing page that reuses the demo with an X preset (rounded modules, X logo, "Follow @handle" frame) and a handle input that updates the QR value and frame text. Every demo setting stays adjustable. Demo now accepts initialProps, downloadName and a header slot so presets don't duplicate it. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Kn4UFgQdRskiPPqCy4sQjo --- apps/docs/public/images/x-logo.svg | 1 + apps/docs/src/app/sitemap.ts | 1 + apps/docs/src/app/x-qr-code/page.tsx | 127 ++++++++++++++++++ apps/docs/src/components/demo/demo.tsx | 72 ++++++---- .../src/components/demo/x-qr-code-demo.tsx | 104 ++++++++++++++ apps/docs/src/config/navigation.ts | 4 + 6 files changed, 283 insertions(+), 26 deletions(-) create mode 100644 apps/docs/public/images/x-logo.svg create mode 100644 apps/docs/src/app/x-qr-code/page.tsx create mode 100644 apps/docs/src/components/demo/x-qr-code-demo.tsx diff --git a/apps/docs/public/images/x-logo.svg b/apps/docs/public/images/x-logo.svg new file mode 100644 index 0000000..c1151cf --- /dev/null +++ b/apps/docs/public/images/x-logo.svg @@ -0,0 +1 @@ + diff --git a/apps/docs/src/app/sitemap.ts b/apps/docs/src/app/sitemap.ts index b7f68b0..7006978 100644 --- a/apps/docs/src/app/sitemap.ts +++ b/apps/docs/src/app/sitemap.ts @@ -10,6 +10,7 @@ const PAGES = [ { path: '/installation', priority: 0.8 }, { path: '/quick-start', priority: 0.8 }, { path: '/demo', priority: 0.9 }, + { path: '/x-qr-code', priority: 0.8 }, { path: '/llms-txt', priority: 0.5 }, { path: '/react-qr-code-props', priority: 0.7 }, { path: '/data-modules-settings', priority: 0.7 }, diff --git a/apps/docs/src/app/x-qr-code/page.tsx b/apps/docs/src/app/x-qr-code/page.tsx new file mode 100644 index 0000000..c68bdb5 --- /dev/null +++ b/apps/docs/src/app/x-qr-code/page.tsx @@ -0,0 +1,127 @@ +import type { Metadata } from 'next' + +import { CodeEditor } from '@/components/code-editor' +import { XQrCodeDemo } from '@/components/demo/x-qr-code-demo' +import { PageHeading } from '@/components/page-heading' +import { + TypographyH2, + TypographyH3, + TypographyInlineCode, + TypographyList, + TypographyP, +} from '@/components/ui/typography' + +export const metadata: Metadata = { + title: 'X (Twitter) QR Code Generator', + description: + 'Create a free, custom QR code for your X (Twitter) profile with a "Follow" frame, the X logo and your own colors. Download it as PNG or SVG.', +} + +const faqs = [ + { + question: 'Does X still have a built-in profile QR code?', + answer: + 'Twitter used to show a QR code for your profile in its mobile apps, but the X apps no longer offer it. A generator like this one is now the easiest way to get a scannable code for your profile.', + }, + { + question: 'What happens if I change my X handle?', + answer: + 'The QR code points to x.com/yourhandle, so changing your handle breaks it. Generate and print a new code after renaming your account.', + }, + { + question: 'Is it free?', + answer: + 'Yes. The QR code is generated in your browser, has no watermark and never expires, because it links straight to your profile with no redirect in between.', + }, + { + question: 'Which format should I download?', + answer: + 'Use SVG for print (badges, stickers, posters) since it scales without losing quality, and PNG for slides, websites and social posts.', + }, +] + +const faqJsonLd = { + '@context': 'https://schema.org', + '@type': 'FAQPage', + mainEntity: faqs.map(({ question, answer }) => ({ + '@type': 'Question', + name: question, + acceptedAnswer: { '@type': 'Answer', text: answer }, + })), +} + +const codeBlock = ` +import { ReactQRCode } from '@lglab/react-qr-code' + +export const XQrCode = ({ handle }: { handle: string }) => ( + +) +` + +export default function Page() { + return ( + <> +