Skip to content

Commit 0116c2b

Browse files
committed
add help
1 parent 8500768 commit 0116c2b

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
</head>
2020
<body>
2121
<canvas id="canvas"></canvas>
22+
<div id="help">
23+
<p>Tile: scroll, swipe ↑↓</p>
24+
<p>Color: shift + scroll, swipe ←→</p>
25+
<p>FullScreen: click, tap</p>
26+
</div>
2227
<div class="select" id="colors"></div>
2328
<div class="select" id="tiles"></div>
2429
</body>

main.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,13 @@ input[type="radio"]:checked {
8080
@media screen and (min-width: 15cm) {
8181
.select { width: 50%; }
8282
}
83+
84+
#help {
85+
position: fixed;
86+
top: 45%;
87+
background-color: black;
88+
padding: 1em;
89+
font-size: 22pt;
90+
box-shadow: 0 0 16px 16px black;
91+
transition: opacity 1s ease-in-out;
92+
}

tile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ function RadioHandler( e ){
128128
}
129129

130130
function EventHandler( e ){
131+
// document.getElementById( 'help' ).style.display = 'none';
132+
document.getElementById( 'help' ).style.opacity = 0;
131133
switch( e.type ){
132134
case 'keydown':
133135
switch( e.key ){

0 commit comments

Comments
 (0)