Skip to content

Commit 4c94d95

Browse files
committed
round complete for phone
1 parent ea66f40 commit 4c94d95

File tree

7 files changed

+219
-34
lines changed

7 files changed

+219
-34
lines changed

app/components/JamoTable.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ const JamoTable = ({known = {}, newJamos = {}, geometric, jamos = {}}) => (
2727
style={{
2828
animationDelay: `${Math.max(0, newJamos.indexOf(jamo)) * 120}ms`
2929
}}
30+
data-jamo={jamo}
3031
onClick={() => jamos[jamo] && play(jamos[jamo].audio.url)}
32+
onTouchStart={(e) => {
33+
let el = document.querySelector(`[data-jamo="${jamo}"]`);
34+
el.classList.add('touched');
35+
setTimeout(() => el.classList.remove('touched'), 500);
36+
}}
3137
>
3238
<div className={classNames("jamo-table__jamo__latin", {"vowel": isMedial(jamo)})}>
3339
{getJamoHint(jamo)}

app/components/Level.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const Level = ({children, params, location, level}) => {
1010
return (
1111
<div className="level-container">
1212
<div className={classNames("level", {
13-
'level--learning': /\/learn$/.test(location.pathname),
13+
'level--learning': /\/learn/.test(location.pathname),
14+
'level--round-complete': /\/round\/\d+\/complete/.test(location.pathname),
1415
})}>
1516
<Logo />
1617
<YouAreHere params={params} />

app/components/RoundComplete.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ const RoundComplete = ({level, round, rounds, nextRound, newJamos = [], params,
4040
}
4141
</div>
4242

43-
<Link to={path} className="button button--forward round__complete__continue-bottom" data-autofocus="true">
44-
Continue
45-
</Link>
43+
<div className="back-forward-buttons">
44+
<Link to={path} className="button button--forward round__complete__continue-bottom" data-autofocus="true">
45+
Continue
46+
</Link>
47+
</div>
4648

4749
{showingLetters ?
4850
<JamoTable newJamos={newJamos} known={known} />
@@ -103,10 +105,11 @@ const RoundComplete = ({level, round, rounds, nextRound, newJamos = [], params,
103105
</div>
104106
</div>
105107

106-
107-
<Link to={path} className="button button--forward round__complete__continue" data-autofocus="true">
108-
Continue
109-
</Link>
108+
<div className="back-forward-buttons">
109+
<Link to={path} className="button button--forward round__complete__continue" data-autofocus="true">
110+
Continue
111+
</Link>
112+
</div>
110113
</div>
111114
);
112115
}

app/styles/common/_media-queries.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ $mq-desktop-above: screen and (min-width: $bp-desktop-min);
4646
}
4747
}
4848

49+
@mixin small-desktop {
50+
@media screen and (min-width: 1200px) and (max-width: $bp-desktop-min - 1px) {
51+
@content;
52+
}
53+
}
54+
4955
@mixin desktop {
5056
@media #{$mq-desktop-only} {
5157
@content;

app/styles/components/_JamoTable.scss

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,36 @@
1616
.jamo-table {
1717
width: 1000px;
1818

19+
@include phone {
20+
width: 100%;
21+
}
22+
1923
&__jamo {
2024
position: relative;
2125
float: left;
2226
width: 100px;
2327
height: 100px;
2428
cursor: pointer;
2529

30+
@include phone {
31+
width: 20%;
32+
height: 2rem;
33+
}
34+
2635
.geometric-jamo {
2736
position: relative;
2837
left: 20px;
2938
top: 20px;
3039
width: 60px;
3140
height: 60px;
3241
z-index: 5;
42+
43+
@include phone {
44+
top: .4rem;
45+
left: 20%;
46+
width: 60%;
47+
height: 1.2rem;
48+
}
3349
}
3450

3551
&__latin {
@@ -39,7 +55,7 @@
3955
transform: translateX(-50%) translateY(-50%);
4056
font-weight: 900;
4157
color: $red;
42-
font-size: 32px;
58+
font-size: .8888rem;
4359
pointer-events: none;
4460
opacity: 0;
4561

@@ -48,7 +64,8 @@
4864
}
4965
}
5066

51-
.can-hover &:hover {
67+
.can-hover &:hover,
68+
&.touched {
5269
.jamo-table__jamo__latin {
5370
opacity: 1;
5471
}
@@ -76,6 +93,14 @@
7693
border-radius: 80px;
7794
animation: scale-in .72s both;
7895
animation-delay: inherit;
96+
97+
@include phone {
98+
left: 10%;
99+
top: .1rem;
100+
width: 80%;
101+
height: 0;
102+
padding-bottom: 80%;
103+
}
79104
}
80105
}
81106
}

app/styles/components/_Level.scss

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
.level {
22
// @extend .radial;
33

4-
&--learning .logo {
5-
@include phone {
6-
display: none !important;
4+
&--learning,
5+
&--round-complete {
6+
.logo {
7+
@include phone {
8+
display: none !important;
9+
}
10+
}
11+
}
12+
13+
&--round-complete {
14+
.you-are-here {
15+
@include phone {
16+
display: none !important;
17+
}
718
}
819
}
920
}

0 commit comments

Comments
 (0)