Fixes sponsorship page
This commit is contained in:
parent
1965c97f68
commit
356b62c91e
4 changed files with 81 additions and 59 deletions
|
@ -113,7 +113,7 @@ const StyledDocs = styled('div', {
|
|||
},
|
||||
|
||||
'& blockquote': {
|
||||
backgroundColor: 'rgba(144, 144, 144, .05)',
|
||||
backgroundColor: '$overlay',
|
||||
padding: 12,
|
||||
margin: '20px 0',
|
||||
borderRadius: 8,
|
||||
|
|
|
@ -114,7 +114,7 @@ export const RowButton = styled('button', {
|
|||
|
||||
'& svg': {
|
||||
position: 'relative',
|
||||
stroke: 'rgba(0,0,0,.2)',
|
||||
stroke: '$overlay',
|
||||
strokeWidth: 1,
|
||||
zIndex: 1,
|
||||
},
|
||||
|
|
|
@ -7,60 +7,67 @@ export default function Sponsorware(): JSX.Element {
|
|||
const [session, loading] = useSession()
|
||||
|
||||
return (
|
||||
<Content
|
||||
size={{
|
||||
'@sm': 'small',
|
||||
}}
|
||||
>
|
||||
<h1>tldraw (is sponsorware)</h1>
|
||||
<p>
|
||||
Hey, thanks for visiting <a href="https://tldraw.com/">tldraw</a>, a
|
||||
tiny little drawing app by{' '}
|
||||
<a href="https://twitter.com/steveruizok">steveruizok</a>.
|
||||
</p>
|
||||
<video autoPlay muted playsInline onClick={(e) => e.currentTarget.play()}>
|
||||
<source src="images/hello.mp4" type="video/mp4" />
|
||||
</video>
|
||||
<p>This project is currently: </p>
|
||||
<ul>
|
||||
<li>in development</li>
|
||||
<li>only available for my sponsors</li>
|
||||
</ul>
|
||||
<p>
|
||||
If you'd like to try it out,{' '}
|
||||
<a
|
||||
href="https://github.com/sponsors/steveruizok"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
<OuterContent>
|
||||
<Content
|
||||
size={{
|
||||
'@sm': 'small',
|
||||
}}
|
||||
>
|
||||
<h1>tldraw (is sponsorware)</h1>
|
||||
<p>
|
||||
Hey, thanks for visiting <a href="https://tldraw.com/">tldraw</a>, a
|
||||
tiny little drawing app by{' '}
|
||||
<a href="https://twitter.com/steveruizok">steveruizok</a>.
|
||||
</p>
|
||||
<video
|
||||
autoPlay
|
||||
muted
|
||||
playsInline
|
||||
onClick={(e) => e.currentTarget.play()}
|
||||
>
|
||||
sponsor me on Github
|
||||
</a>{' '}
|
||||
(at any level) and sign in below.
|
||||
</p>
|
||||
<ButtonGroup>
|
||||
{session ? (
|
||||
<>
|
||||
<Button onClick={() => signout()} variant={'secondary'}>
|
||||
Sign Out
|
||||
</Button>
|
||||
<Detail>
|
||||
Signed in as {session?.user?.name} ({session?.user?.email}), but
|
||||
it looks like you're not yet a sponsor.
|
||||
<br />
|
||||
Something wrong? Try <a href="/">reloading the page</a> or DM me
|
||||
on <a href="https://twitter.com/steveruizok">Twitter</a>.
|
||||
</Detail>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Button onClick={() => signin('github')} variant={'primary'}>
|
||||
{loading ? 'Loading...' : 'Sign in With Github'}
|
||||
</Button>
|
||||
<Detail>Already a sponsor? Just sign in to visit the app.</Detail>
|
||||
</>
|
||||
)}
|
||||
</ButtonGroup>
|
||||
</Content>
|
||||
<source src="images/hello.mp4" type="video/mp4" />
|
||||
</video>
|
||||
<p>This project is currently: </p>
|
||||
<ul>
|
||||
<li>in development</li>
|
||||
<li>only available for my sponsors</li>
|
||||
</ul>
|
||||
<p>
|
||||
If you'd like to try it out,{' '}
|
||||
<a
|
||||
href="https://github.com/sponsors/steveruizok"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
sponsor me on Github
|
||||
</a>{' '}
|
||||
(at any level) and sign in below.
|
||||
</p>
|
||||
<ButtonGroup>
|
||||
{session ? (
|
||||
<>
|
||||
<Button onClick={() => signout()} variant={'secondary'}>
|
||||
Sign Out
|
||||
</Button>
|
||||
<Detail>
|
||||
Signed in as {session?.user?.name} ({session?.user?.email}), but
|
||||
it looks like you're not yet a sponsor.
|
||||
<br />
|
||||
Something wrong? Try <a href="/">reloading the page</a> or DM me
|
||||
on <a href="https://twitter.com/steveruizok">Twitter</a>.
|
||||
</Detail>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Button onClick={() => signin('github')} variant={'primary'}>
|
||||
{loading ? 'Loading...' : 'Sign in With Github'}
|
||||
</Button>
|
||||
<Detail>Already a sponsor? Just sign in to visit the app.</Detail>
|
||||
</>
|
||||
)}
|
||||
</ButtonGroup>
|
||||
</Content>
|
||||
</OuterContent>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -74,15 +81,29 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
|||
}
|
||||
}
|
||||
|
||||
const OuterContent = styled('div', {
|
||||
backgroundColor: '$canvas',
|
||||
padding: '32px',
|
||||
margin: '0 auto',
|
||||
overflow: 'scroll',
|
||||
position: 'fixed',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-start',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
})
|
||||
|
||||
const Content = styled('div', {
|
||||
width: '720px',
|
||||
maxWidth: '100%',
|
||||
backgroundColor: '$panel',
|
||||
margin: '32px auto',
|
||||
borderRadius: '0px',
|
||||
borderRadius: '4px',
|
||||
boxShadow: '$12',
|
||||
padding: '16px',
|
||||
overflow: 'hidden',
|
||||
color: '$text',
|
||||
fontSize: '$2',
|
||||
fontFamily: '$body',
|
||||
|
|
|
@ -140,6 +140,7 @@ const globalStyles = global({
|
|||
fontSize: '$2',
|
||||
color: '$text',
|
||||
backgroundColor: '$canvas',
|
||||
minHeight: '100vh',
|
||||
},
|
||||
body: {
|
||||
overflow: 'hidden',
|
||||
|
|
Loading…
Reference in a new issue