mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
## Problem - a person or an agent cannot link one logo file or pick the file for a light or a dark background as the brand assets page has one preview image and two zip downloads only - `apps/www/lib/json-ld.ts` sets `Organization.logo` to the open graph banner instead of a logo file ## Solution - [proposal] Brand Assets -> Brand Guidelines - [proposal] `/brand-assets` -> `/brand` - adds the official logos as separate svg and png files in `/brand-assets/`, with a catalog that tells the background that each file is for - show each file on its background, with copy and download actions - adds `/brand.md` and a "Copy agent prompt" button, so an agent can read which file to use for each background - adds a "Copy wordmark" item to the nav logo menu, which copies the wordmark file for the site theme - changes `Organization.logo` from the open graph banner to the wordmark png `brand assets page` | before | after | | -------|------| | <img width="1637" height="901" alt="image" src="https://github.com/user-attachments/assets/6b5361c8-0995-4e61-bc29-b5a7ccab7d69" /> | <img width="1637" height="901" alt="image" src="https://github.com/user-attachments/assets/0f65ab36-d6f2-427e-8973-eb559139cf8e" /> | `logo right click` | before | after | | -------|------| | <img width="676" height="362" alt="image" src="https://github.com/user-attachments/assets/5abde373-8a37-4ab8-8193-fb7112b97104" /> | <img width="676" height="362" alt="image" src="https://github.com/user-attachments/assets/ef5d0724-6a91-4af7-8e9d-59025a9eba87" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. run `pnpm dev:www` and open `http://localhost:3000/brand-assets` 2. in the gallery, copy and download one file of each group, and make sure that each file opens 3. click "Copy agent prompt", and make sure that the copied text names `https://supabase.com/brand-assets.md` 4. open `http://localhost:3000/brand-assets.md`, and make sure that it links each svg and png file 5. right-click the nav logo, hover "Copy logo" and "Copy wordmark", and make sure that the frame moves to the part that each item copies 6. click "Copy wordmark" in the light theme and in the dark theme, and make sure that the pasted svg has black and then white lettering 7. run `pnpm --filter www exec vitest run data/brand-assets.test.ts`, and make sure that the tests pass ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
159 lines
6.4 KiB
TypeScript
159 lines
6.4 KiB
TypeScript
import { VectorLogo } from '~/components/BrandAssets/VectorLogo'
|
|
import { LogoGallery } from '~/components/BrandAssets/LogoGallery'
|
|
import Layout from '~/components/Layouts/Default'
|
|
import SectionContainer from '~/components/Layouts/SectionContainer'
|
|
import { CircleCheckFilled, CrossfadeIcon } from '~/components/CrossfadeIcon'
|
|
import Container from 'components/Container'
|
|
import CTABanner from 'components/CTABanner/index'
|
|
import { NextSeo } from 'next-seo'
|
|
import type { InferGetStaticPropsType } from 'next'
|
|
import { readFile } from 'node:fs/promises'
|
|
import path from 'node:path'
|
|
import { useState } from 'react'
|
|
import { Copy } from 'lucide-react'
|
|
import { Button, copyToClipboard } from 'ui'
|
|
|
|
const Index = ({ guideText }: InferGetStaticPropsType<typeof getStaticProps>) => {
|
|
const [isPromptCopied, setIsPromptCopied] = useState(false)
|
|
const meta_title = 'Brand Guidelines: Logos and Icons | Supabase'
|
|
const meta_description =
|
|
'Official Supabase logos and colors, as SVG and PNG files for light and dark backgrounds'
|
|
|
|
const handlePromptCopy = () => {
|
|
copyToClipboard(
|
|
'Read https://supabase.com/brand.md and use the official Supabase logo file that fits the background where the logo will appear. Do not change the logo.',
|
|
() => {
|
|
setIsPromptCopied(true)
|
|
setTimeout(() => setIsPromptCopied(false), 2000)
|
|
}
|
|
)
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<NextSeo
|
|
title={meta_title}
|
|
description={meta_description}
|
|
openGraph={{
|
|
title: meta_title,
|
|
description: meta_description,
|
|
url: 'https://supabase.com/brand',
|
|
images: [
|
|
{
|
|
url: `https://supabase.com/images/og/supabase-og.png`,
|
|
},
|
|
],
|
|
}}
|
|
/>
|
|
<Layout>
|
|
<Container>
|
|
<section className="relative isolate overflow-clip">
|
|
<SectionContainer className="flex flex-col items-center gap-4 pt-0 text-center sm:pt-0 md:pt-0">
|
|
<VectorLogo guideText={guideText} className="pb-12" />
|
|
<h1 className="m-0 text-5xl tracking-tight text-foreground sm:text-6xl">
|
|
Brand Guidelines
|
|
</h1>
|
|
<p className="m-0 max-w-xl text-balance text-sm text-foreground-lighter">
|
|
Official Supabase logos and colors, as SVG and PNG files for light and dark
|
|
backgrounds{' '}
|
|
<a
|
|
href="#icon"
|
|
className="hit-area-2 text-xs text-foreground-light underline underline-offset-4 transition-colors hover:text-foreground"
|
|
>
|
|
<span aria-hidden>⤵</span>
|
|
<span className="sr-only">Go to the logo files</span>
|
|
</a>
|
|
</p>
|
|
<div className="mt-2 flex flex-wrap justify-center gap-2">
|
|
<Button asChild size="small">
|
|
<a href="/brand-assets.zip" download>
|
|
Download logo kit
|
|
</a>
|
|
</Button>
|
|
<Button
|
|
size="small"
|
|
onClick={handlePromptCopy}
|
|
icon={
|
|
<CrossfadeIcon
|
|
isActive={isPromptCopied}
|
|
activeIcon={<CircleCheckFilled className="size-3.5" />}
|
|
inactiveIcon={<Copy className="size-3.5" />}
|
|
/>
|
|
}
|
|
>
|
|
Copy agent prompt
|
|
</Button>
|
|
<span className="sr-only" role="status">
|
|
{isPromptCopied ? 'Agent prompt copied' : ''}
|
|
</span>
|
|
</div>
|
|
</SectionContainer>
|
|
<div
|
|
aria-hidden
|
|
className="absolute inset-x-0 bottom-0 h-px bg-linear-to-r from-transparent via-border to-transparent"
|
|
/>
|
|
</section>
|
|
<LogoGallery className="pb-0 md:pb-0" />
|
|
<div className="section-container flex flex-col gap-20 pt-20 pb-16 md:pb-24">
|
|
<section className="flex max-w-2xl flex-col gap-2">
|
|
<h2 className="m-0 text-3xl tracking-tight text-foreground">Which file to use</h2>
|
|
<ul className="m-0 flex list-disc flex-col gap-2 pl-5 text-pretty text-base text-foreground-light">
|
|
<li>
|
|
Choose the file for the background where the logo appears, not for your browser or
|
|
editor theme.
|
|
</li>
|
|
<li>All files have a transparent background.</li>
|
|
<li>
|
|
There is no file with the lettering alone. Every wordmark file includes the
|
|
symbol.
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section className="flex max-w-2xl flex-col gap-2">
|
|
<h2 className="m-0 text-3xl tracking-tight text-foreground">Name</h2>
|
|
<p className="m-0 text-pretty text-base text-foreground-light">
|
|
Write Supabase as one word, with a capital S. Do not write SupaBase or Supa Base.
|
|
</p>
|
|
</section>
|
|
<section className="flex max-w-2xl flex-col gap-2">
|
|
<h2 className="m-0 text-3xl tracking-tight text-foreground">Usage</h2>
|
|
<p className="m-0 text-pretty text-base text-foreground-light">
|
|
Use the Supabase logos only to refer to Supabase. Do not change the files or the
|
|
logo colors.
|
|
</p>
|
|
<p className="m-0 text-pretty text-base text-foreground-light">
|
|
Supabase and the Supabase logo are trademarks of Supabase Inc.
|
|
</p>
|
|
</section>
|
|
</div>
|
|
<div
|
|
aria-hidden
|
|
className="h-px bg-linear-to-r from-transparent via-border to-transparent"
|
|
/>
|
|
<CTABanner className="border-t-0" />
|
|
</Container>
|
|
</Layout>
|
|
</>
|
|
)
|
|
}
|
|
|
|
// the hero guides are made of the team names, from the docs humans.txt
|
|
export const getStaticProps = async () => {
|
|
const humans = await readFile(
|
|
path.join(process.cwd(), '..', 'docs', 'public', 'humans.txt'),
|
|
'utf8'
|
|
)
|
|
const lines = humans.split('\n').map((line) => line.trim())
|
|
// the names sit between the team intro sentence and the first rule
|
|
const names = lines
|
|
.slice(
|
|
lines.indexOf('TEAM') + 1,
|
|
lines.findIndex((line) => line.startsWith('_'))
|
|
)
|
|
.filter(Boolean)
|
|
.slice(1)
|
|
return { props: { guideText: `${names.join(' + ')} + `.toUpperCase() } }
|
|
}
|
|
|
|
export default Index
|