WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
File tree Expand file tree Collapse file tree 10 files changed +114
-17
lines changed
Expand file tree Collapse file tree 10 files changed +114
-17
lines changed Original file line number Diff line number Diff line change 66 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
77 < link rel ="manifest " href ="/site.webmanifest " />
88 < meta name ="theme-color " content ="#300a38 " />
9- < title > Vite + React + TS</ title >
9+ < title > Vite + React + TS + Vlcn </ title >
1010 </ head >
1111 < style >
12+ /* CSS reset */
13+
14+ * ,
15+ * ::before ,
16+ * ::after {
17+ box-sizing : border-box;
18+ }
19+
20+ * {
21+ margin : 0 ;
22+ min-width : 0 ;
23+ }
24+
25+ img ,
26+ picture ,
27+ video ,
28+ canvas ,
29+ svg {
30+ display : block;
31+ max-width : 100% ;
32+ }
33+
34+ p ,
35+ h1 ,
36+ h2 ,
37+ h3 ,
38+ h4 ,
39+ h5 ,
40+ h6 {
41+ overflow-wrap : break-word;
42+ }
43+
44+ pre {
45+ white-space : pre-wrap;
46+ }
47+
48+ input ,
49+ button ,
50+ textarea ,
51+ select {
52+ font : inherit;
53+ }
54+
55+ : any-link ,
56+ button {
57+ cursor : pointer;
58+ }
59+
1260 : root {
13- color : rgb (212 , 205 , 205 );
14- background-color : rgb (2 , 24 , 13 );
61+ -webkit-tap-highlight-color : transparent;
62+ -webkit-font-smoothing : antialiased;
63+ }
64+
65+ # root {
66+ isolation : isolate;
67+ font-family : system-ui, sans-serif;
1568 }
69+
70+ /* offline fallback */
71+
1672 # root : not (: empty ) + # offline {
1773 display : none;
1874 }
2480 opacity : 0 ;
2581 }
2682 }
83+
84+ /* global styles */
85+
86+ body {
87+ color : rgb (212 , 205 , 205 );
88+ background-color : rgb (2 , 24 , 13 );
89+ }
2790 </ style >
2891 < body >
2992 < div id ="root "> </ div >
Original file line number Diff line number Diff line change @@ -5,14 +5,15 @@ import { ApiDemo } from "client/components/ApiDemo"
55import { UserAccountDemo } from "client/components/UserAccountDemo"
66import { WorkerDemo } from "client/components/WorkerDemo"
77import { DbDemo } from "client/components/DbDemo"
8+ import { Divider } from "client/components/Divider/Divider"
89
910fooBar ( )
1011
1112export default function App ( ) {
1213 return (
1314 < div >
1415 < h1 > Welcome to our Fullstack TypeScript Project!</ h1 >
15- < hr />
16+ < Divider />
1617 < Grid >
1718 < Cell >
1819 < ServiceWorkerDemo />
@@ -26,7 +27,7 @@ export default function App() {
2627 < Cell >
2728 < WorkerDemo />
2829 </ Cell >
29- < Cell y = { 2 } x = { 2 } >
30+ < Cell row >
3031 < DbDemo />
3132 </ Cell >
3233 </ Grid >
Original file line number Diff line number Diff line change 11.grid {
22 display : grid;
3- grid-template-columns : repeat (auto-fit, minmax (250 px , 1fr ));
3+ grid-template-columns : repeat (auto-fit, minmax (165 px , 1fr ));
44 grid-gap : 20px ;
55 grid-auto-flow : dense;
6+ min-width : 50dvw ;
67 max-width : 750px ;
78 margin : auto;
89}
1617 overflow : hidden;
1718 border : 1px solid # ad0489 ;
1819 padding : 10px ;
20+ & > * {
21+ max-width : 100% ;
22+ }
23+ }
24+
25+ .row {
26+ grid-column : 1 / -1 ;
1927}
Original file line number Diff line number Diff line change 11import type { CSSProperties , ReactNode } from "react"
22import classes from "./GridCell.module.css"
3+ import clsx from "clsx"
34
45export function Grid ( { children } : { children : ReactNode } ) {
56 return < div className = { classes . grid } > { children } </ div >
67}
78
8- export function Cell ( { children, x = 1 , y = 1 } : { children : ReactNode ; x ?: number ; y ?: number } ) {
9+ export function Cell ( {
10+ children,
11+ x = 1 ,
12+ y = 1 ,
13+ row,
14+ } : {
15+ children : ReactNode
16+ x ?: number
17+ y ?: number
18+ row ?: boolean
19+ } ) {
920 return (
1021 < div
11- className = { classes . cell }
22+ className = { clsx ( classes . cell , row && classes . row ) }
1223 style = {
1324 {
1425 "--x" : x ,
Original file line number Diff line number Diff line change 1+ .divider {
2+ border : none;
3+ height : 1px ;
4+ background-color : currentColor;
5+ margin : 1em 0 ;
6+ }
Original file line number Diff line number Diff line change 1+ import classes from "./Divider.module.css"
2+
3+ export function Divider ( ) {
4+ return < hr className = { classes . divider } />
5+ }
Original file line number Diff line number Diff line change 11import type { Provider } from "client/auth/providers"
22import { useAuthContext } from "client/auth/useAuthContext"
33import { Button } from "client/components/Button/Button"
4+ import { Divider } from "client/components/Divider/Divider"
45
56export function UserAccountDemo ( ) {
67 const auth = useAuthContext ( )
@@ -58,7 +59,7 @@ function CreateAccount({
5859 { provider . name }
5960 </ Button >
6061 ) ) }
61- < hr />
62+ < Divider />
6263 < Button onClick = { cancelCreateAccount } > Cancel</ Button >
6364 </ >
6465 )
@@ -76,7 +77,7 @@ function NotLoggedIn({
7677 return (
7778 < >
7879 < div > Not logged in</ div >
79- < hr />
80+ < Divider />
8081 < div > Sign up with invite code</ div >
8182 < form
8283 onSubmit = { ( event ) => {
@@ -88,7 +89,7 @@ function NotLoggedIn({
8889 < input type = "text" name = "code" required minLength = { 17 } maxLength = { 17 } />
8990 < Button type = "submit" > Submit</ Button >
9091 </ form >
91- < hr />
92+ < Divider />
9293 < div > Sign in</ div >
9394 { providers . map ( ( provider ) => (
9495 < Button
@@ -118,9 +119,9 @@ function LoggedIn({
118119 return (
119120 < >
120121 < div > Logged in as { userId } </ div >
121- < hr />
122+ < Divider />
122123 < Button onClick = { ( ) => void signOut ( ) } > Logout</ Button >
123- < hr />
124+ < Divider />
124125 < div >
125126 < p > Link accounts</ p >
126127 { providers . map ( ( provider ) => (
Original file line number Diff line number Diff line change 11import { useEffect , useState } from "react"
22import type { Incoming , Outgoing } from "client/worker/sum.worker"
33import Worker from "client/worker/sum.worker?worker"
4+ import { Divider } from "client/components/Divider/Divider"
45
56export function WorkerDemo ( ) {
67 const [ a , setA ] = useState ( 0 )
@@ -58,7 +59,7 @@ export function WorkerDemo() {
5859 pattern = "[0-9]*"
5960 step = "1"
6061 />
61- < hr />
62+ < Divider />
6263 < output > { result } </ output >
6364 </ >
6465 )
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { useDbQuery } from "client/db/useDbQuery"
66import { useDbMutation } from "client/db/useDbMutation"
77import { Button } from "client/components/Button/Button"
88import { useDb } from "client/db/DbProvider"
9+ import { Divider } from "client/components/Divider/Divider"
910
1011function Test ( { name } : { name : string } ) {
1112 const other = useDbQuery < { id : string ; content : string ; position : number } > ( {
@@ -109,7 +110,7 @@ export function Content({ name }: { name: string }) {
109110 Toggle 2 { String ( ! toggle2 ) }
110111 </ Button >
111112 { toggle2 && < Test2 name = { name } /> }
112- < hr />
113+ < Divider />
113114 < form
114115 onSubmit = { ( event ) => {
115116 event . preventDefault ( )
@@ -126,7 +127,7 @@ export function Content({ name }: { name: string }) {
126127 < Button > Add to list</ Button >
127128 </ div >
128129 </ form >
129- < hr />
130+ < Divider />
130131 { sync && (
131132 < >
132133 < Button onClick = { ( ) => void sync . roundTrip ( ) } > Sync</ Button >
Original file line number Diff line number Diff line change 11{
22 "name" : " repo" ,
3- "version" : " 0.0.0-alpha.4 " ,
3+ "version" : " 0.0.0-alpha.5 " ,
44 "license" : " MIT" ,
55 "private" : true ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments