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 ( + <> +