-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Use the new logo #750
base: master
Are you sure you want to change the base?
Changes from 9 commits
d94fade
534a365
18023df
25260d8
ad1d5e5
67512c8
276e658
09df826
6a88502
3067288
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from 'react'; | ||
|
||
import { AppBar } from 'docs/src/components/AppBar'; | ||
import { Navigation } from 'docs/src/components/Navigation'; | ||
import routes from 'docs/data/pages'; | ||
import 'docs/src/styles/style.css'; | ||
|
||
export default function Layout({ children }: React.PropsWithChildren<{}>) { | ||
return ( | ||
<React.Fragment> | ||
<AppBar /> | ||
<Navigation routes={routes} /> | ||
{children} | ||
</React.Fragment> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from 'react'; | ||
|
||
import { AppBar } from 'docs/src/components/AppBar'; | ||
import { Navigation } from 'docs/src/components/Navigation'; | ||
import routes from 'docs/data/pages'; | ||
import 'docs/src/styles/style.css'; | ||
|
||
export default function Layout({ children }: React.PropsWithChildren<{}>) { | ||
return ( | ||
<React.Fragment> | ||
<AppBar /> | ||
<Navigation routes={routes} /> | ||
{children} | ||
</React.Fragment> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from 'react'; | ||
import 'docs/src/styles.css'; | ||
|
||
export default function RootLayout({ children }: React.PropsWithChildren) { | ||
return ( | ||
<div className="relative z-0 px-[round(min(3rem,max(2rem,5vw)),1px)]"> | ||
<span className="bg-color-gridline absolute left-0 right-0 top-12 -mt-px h-px" /> | ||
<span className="bg-color-gridline absolute bottom-12 left-0 right-0 -mb-px h-px" /> | ||
<div className="relative mx-auto flex min-h-dvh max-w-[1330px] flex-col py-12"> | ||
<span className="bg-color-gridline absolute bottom-0 left-0 top-0 -ml-px w-px" /> | ||
<span className="bg-color-gridline absolute bottom-0 right-0 top-0 -mr-px w-px" /> | ||
<div className="bg-color-content flex grow flex-col">{children}</div> | ||
</div> | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.LogoPattern { | ||
/* Colm’s space */ | ||
/* background: fancy-gradient() */ | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,79 @@ | ||||||
import * as React from 'react'; | ||||||
import { Metadata } from 'next/types'; | ||||||
import { readFile } from 'node:fs/promises'; | ||||||
import './page.css'; | ||||||
|
||||||
const description = | ||||||
'Unstyled React components for building accessible user interfaces.'; | ||||||
|
||||||
export default async function Page() { | ||||||
const logo = await readFile('public/static/logo.svg', 'utf-8'); | ||||||
return ( | ||||||
<div className="relative flex grow flex-col justify-between gap-10 lg:justify-center [@media(min-height:700px)]:justify-center"> | ||||||
<div className="flex px-7 pt-7 md:px-16 md:pt-14 lg:items-center lg:pb-[min(10rem,max(3.5rem,10vh))]"> | ||||||
<div className="max-w-[26rem] 2xl:max-w-[40rem]"> | ||||||
<h1 className="mb-2 text-balance text-2xl font-medium 2xl:mb-3 2xl:text-3xl"> | ||||||
{description} | ||||||
</h1> | ||||||
<p className="text-color-gray mb-4 text-pretty 2xl:text-lg"> | ||||||
From the creators of Radix, Floating UI, and MUI. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @colmtuite thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vladmoroz It will be MUI next year, but yeah it should be "Material UI" for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Looks like I also don't understand the difference between MUI and Material UI 🫠 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Current state: Who knows what the future will bring ;) |
||||||
</p> | ||||||
<div className="flex"> | ||||||
<span className="text-color-gray border-color-border -ml-[px] relative cursor-default select-none rounded-full border px-1.5 pb-[2px] pt-[1.5px] text-xs"> | ||||||
Coming soon | ||||||
</span> | ||||||
</div> | ||||||
</div> | ||||||
</div> | ||||||
|
||||||
<div className="mb-10 lg:hidden"> | ||||||
<div | ||||||
className="LogoPattern" | ||||||
style={{ | ||||||
height: 70, | ||||||
background: 'var(--color-gridline)', | ||||||
maskImage: `url("data:image/svg+xml;utf8,${encodeURI(logo)}")`, | ||||||
maskSize: '280px 70px', | ||||||
maskPosition: '50%', | ||||||
}} | ||||||
/> | ||||||
<div | ||||||
className="LogoPattern" | ||||||
style={{ | ||||||
height: 70, | ||||||
background: 'var(--color-gridline)', | ||||||
maskImage: `url("data:image/svg+xml;utf8,${encodeURI(logo)}")`, | ||||||
maskSize: '280px 70px', | ||||||
maskPosition: 'calc(50% - 140px)', | ||||||
}} | ||||||
/> | ||||||
</div> | ||||||
|
||||||
<div | ||||||
className="LogoPattern hidden lg:block" | ||||||
style={{ | ||||||
position: 'absolute', | ||||||
top: 0, | ||||||
bottom: 0, | ||||||
right: '5rem', | ||||||
width: 280, | ||||||
background: 'var(--color-gridline)', | ||||||
maskImage: `url("data:image/svg+xml;utf8,${encodeURI(logo)}")`, | ||||||
maskSize: '280px 70px', | ||||||
maskPosition: '0 -52px', | ||||||
maskRepeat: 'repeat-y', | ||||||
}} | ||||||
/> | ||||||
</div> | ||||||
); | ||||||
} | ||||||
|
||||||
export const metadata: Metadata = { | ||||||
description, | ||||||
twitter: { | ||||||
description, | ||||||
}, | ||||||
openGraph: { | ||||||
description, | ||||||
}, | ||||||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use client'; | ||
import * as React from 'react'; | ||
|
||
export function Favicons() { | ||
return ( | ||
<React.Fragment> | ||
{/* Separate set of favicons in dev so that the dev tabs are easier to spot */} | ||
{process.env.NODE_ENV !== 'production' && ( | ||
<React.Fragment> | ||
<link rel="icon" href="/static/favicon-dev.ico" sizes="32x32" /> | ||
<link rel="icon" href="/static/favicon-dev.svg" type="image/svg+xml" /> | ||
</React.Fragment> | ||
)} | ||
|
||
{process.env.NODE_ENV === 'production' && ( | ||
<React.Fragment> | ||
{/* Safari gets a different favicon because it messes up the original one in dark mode */} | ||
<link rel="icon" href="/static/favicon-safari.ico" sizes="32x32" /> | ||
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml" /> | ||
</React.Fragment> | ||
)} | ||
|
||
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png" /> | ||
</React.Fragment> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
import * as React from 'react'; | ||
import { Metadata } from 'next'; | ||
import { GoogleAnalytics } from 'docs/src/components/GoogleAnalytics'; | ||
import * as React from 'react'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a convention to import React first. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can I add an ES lint rule to do import order so that it's fixed automatically then? I agree with the convention, I did similar for Radix Themes with a couple other ordering rules in the mix, just don't think a human should waste time doing it manually There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure! |
||
import { DocsProviders } from './DocsProviders'; | ||
import { Favicons } from './Favicons'; | ||
import { GoogleAnalytics } from '../components/GoogleAnalytics'; | ||
|
||
interface Props { | ||
children: React.ReactNode; | ||
} | ||
|
||
export default function Layout({ children }: Props) { | ||
export default function Layout({ children }: React.PropsWithChildren) { | ||
return ( | ||
<html lang="en"> | ||
<head> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
<link rel="manifest" href="/static/manifest.json" /> | ||
<link rel="shortcut icon" href="/static/favicon.ico" /> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="180x180" | ||
href="/static/icons/180x180.png" | ||
<Favicons /> | ||
|
||
{/* iOS header background */} | ||
<meta | ||
name="theme-color" | ||
content="oklch(98% 0.25% 264)" | ||
media="(prefers-color-scheme: light)" | ||
/> | ||
<meta | ||
name="theme-color" | ||
content="oklch(0% 0% 0)" | ||
media="(prefers-color-scheme: dark)" | ||
/> | ||
</head> | ||
<body> | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't setting
{ skipJSXText: true, skipStrings: true }
be enough?