|
|
@@ -1,16 +1,89 @@
|
|
|
1
|
+import styled from 'styles'
|
|
|
2
|
+import { signin, signout, useSession } from 'next-auth/client'
|
|
|
3
|
+
|
|
1
|
4
|
export default function Sponsorware() {
|
|
|
5
|
+ const [session, loading] = useSession()
|
|
|
6
|
+
|
|
2
|
7
|
return (
|
|
3
|
|
- <div>
|
|
4
|
|
- Hey, this site is for sponsors only for the moment. Sorry! If you're
|
|
5
|
|
- really curious,{' '}
|
|
6
|
|
- <a
|
|
7
|
|
- href="https://github.com/sponsors/steveruizok"
|
|
8
|
|
- target="_blank"
|
|
9
|
|
- rel="noopener noreferrer"
|
|
10
|
|
- >
|
|
11
|
|
- Sponsor me on Github
|
|
12
|
|
- </a>{' '}
|
|
13
|
|
- and try that again.
|
|
14
|
|
- </div>
|
|
|
8
|
+ <Content>
|
|
|
9
|
+ <h1>tldraw is sponsorware</h1>
|
|
|
10
|
+ <video src="images/hello.mp4" autoPlay muted loop />
|
|
|
11
|
+ <p>
|
|
|
12
|
+ Hey, thanks for visiting <a href="https://tldraw.com/">tldraw</a>, a
|
|
|
13
|
+ tiny little drawing app by{' '}
|
|
|
14
|
+ <a href="https://twitter.com/steveruizok">steveruizok</a>.
|
|
|
15
|
+ </p>
|
|
|
16
|
+ <p>
|
|
|
17
|
+ {' '}
|
|
|
18
|
+ This project is currently:{' '}
|
|
|
19
|
+ <ul>
|
|
|
20
|
+ <li>in development</li>
|
|
|
21
|
+ <li>only available for my sponsors</li>
|
|
|
22
|
+ </ul>
|
|
|
23
|
+ </p>
|
|
|
24
|
+ <p>
|
|
|
25
|
+ If you'd like to try it out,{' '}
|
|
|
26
|
+ <a
|
|
|
27
|
+ href="https://github.com/sponsors/steveruizok"
|
|
|
28
|
+ target="_blank"
|
|
|
29
|
+ rel="noopener noreferrer"
|
|
|
30
|
+ >
|
|
|
31
|
+ sponsor me on Github
|
|
|
32
|
+ </a>{' '}
|
|
|
33
|
+ (at $1 or more) and sign in below.
|
|
|
34
|
+ </p>
|
|
|
35
|
+ <Button onClick={() => signin('github')}>Sign in With Github</Button>
|
|
|
36
|
+ <button onClick={() => signout()}>Sign Out</button>
|
|
|
37
|
+ <pre>{JSON.stringify(session, null, 2)}</pre>
|
|
|
38
|
+ </Content>
|
|
15
|
39
|
)
|
|
16
|
40
|
}
|
|
|
41
|
+
|
|
|
42
|
+const Content = styled('div', {
|
|
|
43
|
+ width: '720px',
|
|
|
44
|
+ maxWidth: 'calc(100% - 16px)',
|
|
|
45
|
+ backgroundColor: '$panel',
|
|
|
46
|
+ margin: '72px auto',
|
|
|
47
|
+ borderRadius: '4px',
|
|
|
48
|
+ boxShadow: '0px 2px 4px rgba(0,0,0,.2)',
|
|
|
49
|
+ padding: '16px',
|
|
|
50
|
+ overflow: 'hidden',
|
|
|
51
|
+ color: '$text',
|
|
|
52
|
+
|
|
|
53
|
+ '& a': {
|
|
|
54
|
+ color: '$bounds',
|
|
|
55
|
+ backgroundColor: '$boundsBg',
|
|
|
56
|
+ padding: '2px 4px',
|
|
|
57
|
+ margin: '0 -3px',
|
|
|
58
|
+ borderRadius: '2px',
|
|
|
59
|
+ },
|
|
|
60
|
+
|
|
|
61
|
+ '& p': {
|
|
|
62
|
+ fontFamily: '$body',
|
|
|
63
|
+ fontSize: '$3',
|
|
|
64
|
+ lineHeight: 1.5,
|
|
|
65
|
+ },
|
|
|
66
|
+
|
|
|
67
|
+ '& video': {
|
|
|
68
|
+ maxWidth: '100%',
|
|
|
69
|
+ boxShadow: '0px 2px 4px rgba(0,0,0,.2)',
|
|
|
70
|
+ borderRadius: '4px',
|
|
|
71
|
+ overflow: 'hidden',
|
|
|
72
|
+ margin: '16px 0',
|
|
|
73
|
+ },
|
|
|
74
|
+})
|
|
|
75
|
+
|
|
|
76
|
+const Button = styled('button', {
|
|
|
77
|
+ width: '100%',
|
|
|
78
|
+ padding: '12px 0',
|
|
|
79
|
+ display: 'flex',
|
|
|
80
|
+ alignItems: 'center',
|
|
|
81
|
+ justifyContent: 'center',
|
|
|
82
|
+ font: '$ui',
|
|
|
83
|
+ fontWeight: 'bold',
|
|
|
84
|
+ fontSize: '$3',
|
|
|
85
|
+ background: '$bounds',
|
|
|
86
|
+ color: '$panel',
|
|
|
87
|
+ border: 'none',
|
|
|
88
|
+ margin: '32px 0 8px 0',
|
|
|
89
|
+})
|