Parcourir la source

Improve mobile view

main
Steve Ruiz il y a 4 ans
Parent
révision
8ad13179ce
1 fichiers modifiés avec 24 ajouts et 7 suppressions
  1. 24
    7
      pages/sponsorware.tsx

+ 24
- 7
pages/sponsorware.tsx Voir le fichier

7
   const [session, loading] = useSession()
7
   const [session, loading] = useSession()
8
 
8
 
9
   return (
9
   return (
10
-    <Content>
10
+    <Content
11
+      size={{
12
+        '@sm': 'small',
13
+      }}
14
+    >
11
       <h1>tldraw (is sponsorware)</h1>
15
       <h1>tldraw (is sponsorware)</h1>
12
       <p>
16
       <p>
13
         Hey, thanks for visiting <a href="https://tldraw.com/">tldraw</a>, a
17
         Hey, thanks for visiting <a href="https://tldraw.com/">tldraw</a>, a
14
         tiny little drawing app by{' '}
18
         tiny little drawing app by{' '}
15
         <a href="https://twitter.com/steveruizok">steveruizok</a>.
19
         <a href="https://twitter.com/steveruizok">steveruizok</a>.
16
       </p>
20
       </p>
17
-      <video src="images/hello.mp4" autoPlay muted loop />
21
+      <video autoPlay muted playsInline onClick={(e) => e.currentTarget.play()}>
22
+        <source src="images/hello.mp4" type="video/mp4" />
23
+      </video>
18
       <p>This project is currently: </p>
24
       <p>This project is currently: </p>
19
       <ul>
25
       <ul>
20
         <li>in development</li>
26
         <li>in development</li>
75
 
81
 
76
 const Content = styled('div', {
82
 const Content = styled('div', {
77
   width: '720px',
83
   width: '720px',
78
-  maxWidth: 'calc(100% - 16px)',
84
+  maxWidth: '100%',
79
   backgroundColor: '$panel',
85
   backgroundColor: '$panel',
80
   margin: '32px auto',
86
   margin: '32px auto',
81
-  borderRadius: '8px',
87
+  borderRadius: '0px',
82
   boxShadow: '0px 2px 24px rgba(0,0,0,.08), 0px 2px 4px rgba(0,0,0,.16)',
88
   boxShadow: '0px 2px 24px rgba(0,0,0,.08), 0px 2px 4px rgba(0,0,0,.16)',
83
-  padding: '32px',
89
+  padding: '16px',
84
   overflow: 'hidden',
90
   overflow: 'hidden',
85
   color: '$text',
91
   color: '$text',
86
-  fontSize: '$3',
92
+  fontSize: '$2',
87
   fontFamily: '$body',
93
   fontFamily: '$body',
88
   lineHeight: 1.5,
94
   lineHeight: 1.5,
89
 
95
 
95
     borderRadius: '2px',
101
     borderRadius: '2px',
96
   },
102
   },
97
 
103
 
98
-  '& p': {},
104
+  '& p': {
105
+    borderRadius: '8px',
106
+  },
99
 
107
 
100
   '& video': {
108
   '& video': {
101
     maxWidth: '100%',
109
     maxWidth: '100%',
110
     backgroundColor: 'none',
118
     backgroundColor: 'none',
111
     background: 'none',
119
     background: 'none',
112
   },
120
   },
121
+
122
+  variants: {
123
+    size: {
124
+      small: {
125
+        fontSize: '$3',
126
+        padding: '32px',
127
+      },
128
+    },
129
+  },
113
 })
130
 })
114
 
131
 
115
 const ButtonGroup = styled('div', {
132
 const ButtonGroup = styled('div', {

Chargement…
Annuler
Enregistrer