Skip to content

Commit 8028e9d

Browse files
committed
Summary data for the main Guess
1 parent 00ed925 commit 8028e9d

File tree

12 files changed

+529
-97
lines changed

12 files changed

+529
-97
lines changed

env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/// <reference types="vite/client" />
22
declare let GITVERSION: string
3+
declare module "vue3-popper"

index.html

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@
3434
--orange: #f5793a;
3535
--blue: #85c0f9;
3636

37+
/* Grade colors */
38+
--grade-a-bg: #00695c;
39+
--grade-a-fg: #e0f2f1;
40+
41+
--grade-b-bg: #fbc02d;
42+
--grade-b-fg: #fffde7;
43+
44+
--grade-c-bg: #ff8f00;
45+
--grade-c-fg: #fff8e1;
46+
47+
--grade-d-bg: #d84315;
48+
--grade-d-fg: #fbe9e7;
49+
50+
--grade-f-bg: #c62828;
51+
--grade-f-fg: #ffebee;
52+
3753
/* Main app header */
3854
--header-height: 55px;
3955

@@ -66,7 +82,12 @@
6682
:root,
6783
.darktheme {
6884
--color-background: var(--gray-7);
69-
85+
86+
--modal-content-bg: var(--gray-7);
87+
88+
--tooltip-bg: var(--gray-6);
89+
--tooltip-fg: var(--gray-1);
90+
--tooltip-border: var(--gray-4);
7091
}
7192

7293
:root {
@@ -85,30 +106,13 @@
85106
--input-border: var(--gray-4);
86107
--input-border-error: #800000;
87108
--input-border-focus: var(--gray-2);
88-
89-
--modal-content-bg: var(--gray-7);
90-
91-
--grade-a-bg: #00695c;
92-
--grade-a-fg: #e0f2f1;
93-
94-
--grade-b-bg: #fbc02d;
95-
--grade-b-fg: #fffde7;
96-
97-
--grade-c-bg: #ff8f00;
98-
--grade-c-fg: #fff8e1;
99-
100-
--grade-d-bg: #d84315;
101-
--grade-d-fg: #fbe9e7;
102-
103-
--grade-f-bg: #c62828;
104-
--grade-f-fg: #ffebee;
105-
106109
}
107110

108111
.darktheme {
109112
--color-correct: var(--darkGreen);
110113
--color-present: var(--darkYellow);
111114
--color-absent: var(--gray-4);
115+
--tile-text-color: var(--gray-1);
112116

113117
--button-background: var(--gray-3);
114118
--button-text: var(--gray-1);
@@ -120,8 +124,6 @@
120124
--input-border: var(--gray-1);
121125
--input-border-error: #ffaeae;
122126
--input-border-focus: var(--gray-1);
123-
124-
--modal-content-bg: var(--gray-7);
125127
}
126128

127129
.colorblind {

package-lock.json

Lines changed: 56 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore --global GITVERSION"
1313
},
1414
"dependencies": {
15-
"vue": "^3.2.31"
15+
"vue": "^3.2.31",
16+
"vue3-popper": "^1.4.2"
1617
},
1718
"devDependencies": {
1819
"@rushstack/eslint-patch": "^1.1.0",

src/App.vue

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ function closeModal(name: string) {
110110
width: auto;
111111
}
112112
113+
.icon-inline {
114+
display: inline-block;
115+
height: 1em;
116+
vertical-align: -0.15em;
117+
}
118+
113119
a {
114120
color: var(--gray-1);
115121
}
@@ -346,16 +352,72 @@ function closeModal(name: string) {
346352
padding: .75em .5em;
347353
}
348354
349-
@media screen and (min-width: 60em) {
355+
@media screen and (min-width: 70em) {
350356
.section__body {
351357
padding: 1em;
352358
}
353359
}
354360
361+
.grade {
362+
width: 5em;
363+
padding: .5em;
364+
display: flex;
365+
flex-flow: column nowrap;
366+
justify-content: center;
367+
align-items: center;
368+
}
369+
370+
.grade .letter {
371+
flex: 0 0 auto;
372+
font-size: 2.5em;
373+
text-shadow: 3px 2px 12px rgba(0, 0, 0, 0.7);
374+
}
375+
376+
.grade .percent {
377+
font-size: 1.1em;
378+
font-weight: bold;
379+
}
380+
381+
.grade-color {
382+
background: var(--gray-5) !important;
383+
}
384+
385+
.grade-color.a {
386+
background: var(--grade-a-bg) !important;
387+
color: var(--grade-a-fg) !important;
388+
}
389+
390+
.grade-color.b {
391+
background: var(--grade-b-bg) !important;
392+
color: var(--grade-b-fg) !important;
393+
}
394+
395+
.grade-color.c {
396+
background: var(--grade-c-bg) !important;
397+
color: var(--grade-c-fg) !important;
398+
}
399+
400+
.grade-color.d {
401+
background: var(--grade-d-bg) !important;
402+
color: var(--grade-d-fg) !important;
403+
}
404+
405+
.grade-color.f {
406+
background: var(--grade-f-bg) !important;
407+
color: var(--grade-f-fg) !important;
408+
}
409+
355410
strong {
356411
font-size: 1.2em;
357412
}
358413
414+
/* hijacked for variable letters */
415+
small {
416+
font-style: italic;
417+
font-size: 1em;
418+
font-weight: bold;
419+
}
420+
359421
.middle-center {
360422
height: 100%;
361423
display: flex;

src/components/MainInterface.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function showSummaryPage() {
5353
}
5454
5555
const dragEnabled = computed(() => {
56-
return page.screenWidth < 960;
56+
return page.screenWidth < 70*16;
5757
});
5858
5959
const dragOffset = computed(() => {
@@ -206,7 +206,7 @@ function guessClicked(guess?: Guess) {
206206
}
207207
208208
/* Small screens only */
209-
@media screen and (max-width: 59.9375em) {
209+
@media screen and (max-width: 69.9375em) {
210210
.main-interface {
211211
position: relative;
212212
width: 100%;
@@ -228,7 +228,7 @@ function guessClicked(guess?: Guess) {
228228
}
229229
230230
/* Large screens only */
231-
@media screen and (min-width: 60em) {
231+
@media screen and (min-width: 70em) {
232232
.main-interface {
233233
display: grid;
234234
grid-template-columns: 1fr 1fr;

0 commit comments

Comments
 (0)