diff --git a/packages/docs/src/components/footer/footer.tsx b/packages/docs/src/components/footer/footer.tsx index 056af96a596..e74e9c2b86d 100644 --- a/packages/docs/src/components/footer/footer.tsx +++ b/packages/docs/src/components/footer/footer.tsx @@ -22,6 +22,7 @@ const linkColumns = [ { title: 'Tutorial', href: `${baseUrl}/ecosystem/#courses` }, { title: 'Presentations', href: `${baseUrl}/ecosystem/#presentations` }, { title: 'Community', href: `${baseUrl}/ecosystem/#community` }, + { title: 'Press', href: `${baseUrl}/press` }, ], ]; diff --git a/packages/docs/src/routes/press/index.tsx b/packages/docs/src/routes/press/index.tsx new file mode 100644 index 00000000000..8f8b3ff3a09 --- /dev/null +++ b/packages/docs/src/routes/press/index.tsx @@ -0,0 +1,196 @@ +import { component$, $, useSignal } from '@builder.io/qwik'; +import QwikLogo from '/public/logos/qwik.png?jsx'; +import QwikLogouwu from '/public/logos/qwik-uwu.webp?jsx'; +import QwikSocial from '/public/logos/social-card.png?jsx'; +import QwikSocial2 from '/public/logos/social-card.jpg?jsx'; +import { Header } from '~/components/header/header'; +import { Footer } from '~/components/footer/footer'; +import { Slot } from '@builder.io/qwik'; +const DownloadButton = component$((props: { href: string | undefined }) => { + return ( + + Download{' '} + + ); +}); + +export default component$(() => { + const activeColor = useSignal(''); + + const color = { + qwikBlue: '#009dfd', + qwikDarkBlue: '#006ce9', + qwikLightBlue: '#daf0ff', + qwikPurple: '#ac7ef4', + qwikDarkPurple: '#6000ff', + qwikDarkPurpleBg: '#151934', + } as const; + + const copyToClipboard = $(async (text: string) => { + try { + if (!navigator.clipboard) { + activeColor.value = text; + return; + } + await navigator.clipboard.writeText(text); + activeColor.value = text; + const rs = setTimeout(() => { + const old = activeColor.value; + if (old === text) { + activeColor.value = ''; + } + }, 1500); + return () => clearTimeout(rs); + } catch (err) { + console.error('Failed to copy: ', err); + } + }); + + const logos = [ + { + title: 'Qwik Logo (png)', + alt: 'Qwik Logo in PNG format', + downloadHref: '/logos/qwik.png', + Logo: QwikLogo, + }, + { + title: 'Qwik Logo (svg)', + alt: 'Qwik Logo in SVG format', + downloadHref: '/logos/qwik.svg', + Logo: 'img', + src: '/logos/qwik.svg', + }, + { + title: 'Qwik Logo (uwu)', + alt: 'Qwik Logo in UWU format', + downloadHref: '/logos/qwik-uwu.webp', + Logo: QwikLogouwu, + className: 'h-auto w-auto object-contain', + }, + { + title: 'Qwik social card Light', + alt: 'Qwik Social Card in Light theme', + downloadHref: '/logos/social-card.png', + Logo: QwikSocial, + }, + { + title: 'Qwik social card Dark', + alt: 'Qwik Social Card in Dark theme', + downloadHref: '/logos/social-card.jpg', + Logo: QwikSocial2, + }, + ]; + const downloadAllAssets = $(() => { + const links = [ + '/logos/qwik.png', + '/logos/qwik.svg', + '/logos/qwik-uwu.webp', + '/logos/social-card.png', + '/logos/social-card.jpg', + ]; + + links.forEach((link) => { + const anchor = document.createElement('a'); + anchor.href = link; + anchor.download = link.split('/').pop() as string; + document.body.appendChild(anchor); + anchor.click(); + document.body.removeChild(anchor); + }); + }); + + const Logo = component$((props: { title: string; alt: string; downloadHref: string }) => { + return ( + + {props.title} + + + + + + + + ); + }); + + const ColorButton = component$( + (props: { color: string; name: string; hexCode: string; text: string | undefined }) => { + return ( + copyToClipboard(props.hexCode)} + style={`background-color:${props.color};`} + class="flex justify-center text-white items-center cursor-pointer h-12 " + > + {activeColor.value === props.hexCode ? ( + + Copied ✓ + + ) : ( + + {props.name} {props.hexCode} + + )} + + ); + } + ); + + const qwikColors = [ + { color: 'var(--qwik-blue)', name: 'Qwik Blue', hexCode: color.qwikBlue }, + { color: 'var(--qwik-dark-blue)', name: 'Qwik Dark Blue', hexCode: color.qwikDarkBlue }, + { color: 'var(--qwik-light-blue)', name: 'Qwik Light Blue', hexCode: color.qwikLightBlue }, + { color: 'var(--qwik-purple)', name: 'Qwik Purple', hexCode: color.qwikPurple }, + { color: 'var(--qwik-dark-purple)', name: 'Qwik Dark Purple', hexCode: color.qwikDarkPurple }, + { + color: 'var(--qwik-dark-purple-bg)', + name: 'Qwik Dark Purple Bg', + text: 'var(--qwik-light-blue)', + hexCode: color.qwikDarkPurpleBg, + }, + ]; + + return ( + + + + {logos.map((item) => ( + + {item.Logo === 'img' ? ( + + ) : ( + + )} + + ))} + + + {qwikColors.map((colorItem) => ( + + ))} + + + + + + Download All Logos + + + + + ); +});
Download
{props.title}
+ Copied ✓ +
+ {props.name} {props.hexCode} +