Skip to content

Commit 2f0b2ad

Browse files
connecting it up
1 parent bbc0b98 commit 2f0b2ad

File tree

3 files changed

+70
-27
lines changed

3 files changed

+70
-27
lines changed

playground/internal/react/shareUrlControl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func shareUrlComponent(props Props) *Element {
4040
`type`: `text`,
4141
`className`: className,
4242
`ref`: shareUrlRef,
43-
`value`: shareUrl,
43+
`value`: `https://localhost:8080#/2523432342`, //shareUrl, // TODO(grantnelson-wf): FIX
4444
`readOnly`: true,
4545
`onFocus`: onShareUrlFocus,
4646
}),

playground/playground.css

Lines changed: 68 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
11
:root {
2+
--color-scheme: light;
23
--color-banner-title-text: black;
3-
--color-banner-background: white;
4-
5-
--color-code-text: black;
6-
--color-code-background: #EBDAC7;
7-
--color-code-box-borders: black;
8-
--color-line-nums-text: #888;
9-
--color-line-nums-background: #EBDAC7;
10-
--color-code-line-nums-border: black;
11-
12-
--color-output-normal-text: black;
13-
--color-output-normal-background: #DDD;
14-
--color-output-error-text: #800;
15-
--color-output-error-background: #FCC;
4+
--color-banner-background: #e5fafa;
165

176
--color-run-button-background: #FFF5D5;
187
--color-run-button-boarder: #0E6A8A;
19-
--color-run-button-text: #0E6A8A;
8+
--color-run-button-text: #black;
209
--color-run-button-hover-background: #0E6A8A;
2110
--color-run-button-hover-boarder: #0E6A8A;
2211
--color-run-button-hover-text: #FFF5D5;
2312

24-
--color-buttons-background: #EEE;
13+
--color-buttons-background: #EED;
2514
--color-buttons-boarder: #CCC;
26-
--color-buttons-text: #222;
15+
--color-buttons-text: #0E6A8A;
2716
--color-buttons-hover-background: #0E6A8A;
2817
--color-buttons-hover-boarder: #0E6A8A;
2918
--color-buttons-hover-text: #FFF5D5;
3019

31-
--color-share-url-background: #EEE;
32-
--color-share-url-boarder: #CCC;
33-
--color-share-url-text: black;
34-
20+
--color-format-imports-text: #0E6A8A;
3521
--color-toggle-background: #CCC;
3622
--color-toggle-background-checked: #0E6A8A;
3723
--color-toggle-foreground: #0E6A8A;
3824
--color-toggle-foreground-checked: #FFF5D5;
3925

26+
--color-share-url-background: #EED;
27+
--color-share-url-boarder: #CCC;
28+
--color-share-url-text: black;
29+
30+
--color-code-text: black;
31+
--color-code-background: #F5ECE3;
32+
--color-code-box-borders: black;
33+
--color-line-nums-text: #888;
34+
--color-line-nums-background: #EBDAC7;
35+
--color-code-line-nums-border: black;
36+
37+
--color-output-normal-text: black;
38+
--color-output-normal-background: #DDD;
39+
--color-output-error-text: #800;
40+
--color-output-error-background: #FCC;
41+
42+
--color-buttons-shadow: rgba(0, 0, 0, 0.2) 2px 2px 4px;
4043
--font-family-banner-title: Arial, sans;
4144
--font-size-banner-title: 32px;
4245
--font-size-banner-title-sub: 24px;
@@ -52,9 +55,45 @@
5255
}
5356

5457
[data-theme='dark'] {
55-
--color-banner-title-text: red;
56-
--color-banner-background: blue;
57-
/* TODO(grantnelson-wf): Finish */
58+
--color-scheme: dark;
59+
--color-banner-title-text: white;
60+
--color-banner-background: #007D9C;
61+
62+
--color-run-button-background: #253443;
63+
--color-run-button-boarder: #00ADD8;
64+
--color-run-button-text: #00ADD8;
65+
--color-run-button-hover-background: #00ADD8;
66+
--color-run-button-hover-boarder: black;
67+
--color-run-button-hover-text: black;
68+
69+
--color-buttons-background: #003647;
70+
--color-buttons-boarder: #50B7E0;
71+
--color-buttons-text: #50B7E0;
72+
--color-buttons-hover-background: #50B7E0;
73+
--color-buttons-hover-boarder: #333;
74+
--color-buttons-hover-text: #333;
75+
76+
--color-format-imports-text: #7CF;
77+
--color-toggle-background: #333;
78+
--color-toggle-background-checked: #7CF;
79+
--color-toggle-foreground: #00ADD8;
80+
--color-toggle-foreground-checked: #003647;
81+
82+
--color-share-url-background: #333;
83+
--color-share-url-boarder: #50B7E0;
84+
--color-share-url-text: #7CF;
85+
86+
--color-code-text: #F0F1F2;
87+
--color-code-background: #253443;
88+
--color-code-box-borders: #50B7E0;
89+
--color-line-nums-text: #7CF;
90+
--color-line-nums-background: #253443;
91+
--color-code-line-nums-border: #50B7E0;
92+
93+
--color-output-normal-text: #F0F1F2;
94+
--color-output-normal-background: #2B2D2F;
95+
--color-output-error-text: #E67193;
96+
--color-output-error-background: #411;
5897
}
5998

6099
html, body {
@@ -63,6 +102,7 @@ html, body {
63102
margin: 0;
64103
padding: 0;
65104
box-sizing: border-box;
105+
color-scheme: var(--color-scheme);
66106
}
67107

68108
#playground {
@@ -115,7 +155,7 @@ html, body {
115155
border-radius: 5px;
116156
font-family: var(--font-family-controls);
117157
font-size: var(--font-size-controls);
118-
/* TODO(grantnelson-wf): Add some shadow, like box-shadow: 5px 10px 10px #888888;*/
158+
box-shadow: var(--color-buttons-shadow);
119159
}
120160

121161
/* The run code button */
@@ -148,6 +188,7 @@ html, body {
148188
#format-imports {
149189
font-family: var(--font-family-controls);
150190
font-size: var(--font-size-controls);
191+
color: var(--color-format-imports-text);
151192
}
152193

153194
.toggle-box-wrapper {
@@ -214,7 +255,7 @@ html, body {
214255

215256
/* The text box containing the url for sharing code. */
216257
#share-url {
217-
margin-left: 5px;
258+
margin: 0px 5px 0px 5px;
218259
flex-grow: 3;
219260
font-family: var(--font-family-controls);
220261
font-size: var(--font-size-controls);
@@ -246,6 +287,7 @@ html, body {
246287
max-height: 80%;
247288
height: 75%;
248289
flex-shrink: 0;
290+
background: var(--color-code-background);
249291
}
250292

251293
/* The panel that contains the code text area and the lines numbers */
@@ -258,6 +300,7 @@ html, body {
258300
resize: none;
259301
width: 100%;
260302
align-items: stretch;
303+
background: var(--color-code-background);
261304
border-top: 1px solid var(--color-code-box-borders);
262305
border-bottom: 1px solid var(--color-code-box-borders);
263306
}

playground/playground.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)