File tree 7 files changed +69
-63
lines changed
7 files changed +69
-63
lines changed Original file line number Diff line number Diff line change 44
44
@apply bg-gray-400 text-white;
45
45
}
46
46
47
+ .btn-options {
48
+ @apply flex items-center justify-center w-12 h-12 mx-2 rounded-full bg-gray-300 cursor-pointer;
49
+
50
+ &:last-child {
51
+ @apply mr-0;
52
+ }
53
+ }
54
+
47
55
.no-drag {
48
56
user-drag : none;
49
57
user-select : none;
Original file line number Diff line number Diff line change 13
13
.card-container {
14
14
@apply w-full px-2;
15
15
}
16
-
17
- @screen md {
18
- .card-container {
19
- @apply w-2/ 5 ;
20
- }
21
- }
Original file line number Diff line number Diff line change 5
5
class =" logo cursor-pointer"
6
6
@click =" home()"
7
7
alt =" clef.ninja Logo"
8
+ title =" To Home screen"
8
9
/>
9
10
<h1
10
11
class =" brand cursor-pointer"
11
12
:class =" { 'hidden lg:block': brandHidden, visible: brandVisible }"
12
13
@click =" home()"
14
+ title =" To Home screen"
13
15
>
14
16
<span class =" font-bold" >clef</span >
15
17
<span class =" text-gray-800" >.ninja</span >
21
23
:transition =" fadeTransition"
22
24
@change =" portalChange"
23
25
/>
26
+
27
+ <portal-target
28
+ name =" header-right-small"
29
+ class =" flex ml-auto"
30
+ :transition =" fadeTransition"
31
+ />
24
32
</header >
25
33
</template >
26
34
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" flex flex-col flex-1 max-w-full" >
3
- <portal to =" header-right" >
3
+ <portal to =" header-right-small " >
4
4
<div class =" flex items-center" >
5
- <div class =" btn-options" role =" checkbox" @click =" showSettings = true" >
5
+ <div
6
+ class =" btn-options"
7
+ role =" button"
8
+ @click =" showSettings = true"
9
+ title =" Settings"
10
+ >
6
11
<SettingsIcon :size =" 32" fillColor =" #718096" />
7
12
</div >
8
13
</div >
@@ -169,12 +174,4 @@ export default Vue.extend({
169
174
max-height : 30 vh ;
170
175
@apply flex items-center justify-center mb-8 flex-1;
171
176
}
172
-
173
- .btn-options {
174
- @apply flex items-center justify-center w-12 h-12 mx-2 rounded-full bg-gray-300 cursor-pointer;
175
-
176
- &:last-child {
177
- @apply mr-0;
178
- }
179
- }
180
177
</style >
Original file line number Diff line number Diff line change @@ -4,6 +4,25 @@ exports[`HomeView renders correctly 1`] = `
4
4
<div
5
5
class = " px-4"
6
6
>
7
+ <portal
8
+ to = " header-right-small"
9
+ >
10
+ <div
11
+ class = " flex items-center"
12
+ >
13
+ <div
14
+ class = " btn-options"
15
+ role = " button"
16
+ >
17
+ <settingsicon-stub
18
+ fillcolor = " #718096"
19
+ size = " 32"
20
+ title = " Settings Outline icon"
21
+ />
22
+ </div >
23
+ </div >
24
+ </portal >
25
+
7
26
<h2
8
27
class = " text-2xl"
9
28
>
@@ -67,34 +86,6 @@ exports[`HomeView renders correctly 1`] = `
67
86
</div >
68
87
</div >
69
88
</div >
70
-
71
- <div
72
- class = " card-container"
73
- >
74
- <div
75
- class = " card"
76
- >
77
- <div
78
- class = " card-inner"
79
- >
80
- <settingsicon-stub
81
- fillcolor = " currentColor"
82
- size = " 48"
83
- title = " Settings Outline icon"
84
- />
85
-
86
- <h3 >
87
- Settings
88
- </h3 >
89
-
90
- <p >
91
-
92
- Setup your MIDI keyboard or pick a different instrument.
93
-
94
- </p >
95
- </div >
96
- </div >
97
- </div >
98
89
</div >
99
90
</div >
100
91
` ;
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" px-4" >
3
+ <portal to =" header-right-small" >
4
+ <div class =" flex items-center" >
5
+ <div
6
+ class =" btn-options"
7
+ role =" button"
8
+ @click =" $store.commit('stage', { name: 'settingsView' })"
9
+ >
10
+ <SettingsIcon :size =" 32" fillColor =" #718096" />
11
+ </div >
12
+ </div >
13
+ </portal >
14
+
3
15
<h2 class =" text-2xl" >Select your game mode.</h2 >
4
16
5
17
<div class =" flex justify-around py-8 flex-wrap" >
27
39
</div >
28
40
</div >
29
41
</div >
30
-
31
- <div
32
- class =" card-container"
33
- @click =" $store.commit('stage', { name: 'settingsView' })"
34
- >
35
- <div class =" card" >
36
- <div class =" card-inner" >
37
- <SettingsIcon :size =" 48" />
38
-
39
- <h3 >Settings</h3 >
40
- <p >
41
- Setup your MIDI keyboard or pick a different instrument.
42
- </p >
43
- </div >
44
- </div >
45
- </div >
46
42
</div >
47
43
</div >
48
44
</template >
@@ -69,7 +65,7 @@ export default Vue.extend({
69
65
70
66
@screen md {
71
67
.card-container {
72
- @apply w-1/ 3 ;
68
+ @apply w-1/ 2 ;
73
69
}
74
70
}
75
71
</style >
Original file line number Diff line number Diff line change 4
4
<h2 class =" setting-title" >Input Setup</h2 >
5
5
6
6
<div class =" flex justify-around py-8 flex-wrap" >
7
- <div class =" card-container" @click =" setKeyboard({ type: 'virtual' })" >
7
+ <div
8
+ class =" card-container"
9
+ @click =" setKeyboard({ type: 'virtual' }) || home()"
10
+ >
8
11
<div class =" card" >
9
12
<div class =" card-inner" >
10
13
<VirtualIcon :size =" 48" />
@@ -138,11 +141,14 @@ export default Vue.extend({
138
141
},
139
142
setInstrument(instrument : string ) {
140
143
this .$store .commit (' instrument' , instrument );
141
- this .$store . commit ( ' stage ' , { name: ' homeView ' } );
144
+ this .home ( );
142
145
},
143
146
noteUp() {
144
147
this .stage = ' works' ;
145
148
this .midi ! .off (' noteUp' , this .noteUp );
149
+ this .home ();
150
+ },
151
+ home() {
146
152
this .$store .commit (' stage' , { name: ' homeView' });
147
153
},
148
154
async startMidi() {
@@ -171,4 +177,10 @@ export default Vue.extend({
171
177
@apply text-2xl;
172
178
}
173
179
}
180
+
181
+ @screen md {
182
+ .card-container {
183
+ @apply w-1/ 2 ;
184
+ }
185
+ }
174
186
</style >
You can’t perform that action at this time.
0 commit comments