mirror of
https://github.com/flynx/Course-JavaScript.git
synced 2025-10-29 02:50:09 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
97454ee0f2
commit
0bba41095b
@ -14,8 +14,8 @@ body.hints:after {
|
|||||||
body.hints:before {
|
body.hints:before {
|
||||||
content: "";
|
content: "";
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-top: dashed 3pt red;
|
border-top: dashed 0.5vmin red;
|
||||||
border-bottom: dashed 3pt red;
|
border-bottom: dashed 0.5vmin red;
|
||||||
}
|
}
|
||||||
body.hints:after {
|
body.hints:after {
|
||||||
content: "↺↻";
|
content: "↺↻";
|
||||||
@ -23,10 +23,10 @@ body.hints:after {
|
|||||||
right: 50%;
|
right: 50%;
|
||||||
left: auto;
|
left: auto;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
border-right: dashed 3pt red;
|
border-right: dashed 0.5vmin red;
|
||||||
|
|
||||||
color: red;
|
color: rgba(255, 0, 0, 0.5);
|
||||||
font-size: 100pt;
|
font-size: 15vmin;
|
||||||
line-height: 70vmin;
|
line-height: 70vmin;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
letter-spacing: 50vmin;
|
letter-spacing: 50vmin;
|
||||||
@ -39,15 +39,17 @@ body.hints:after {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100vmax;
|
width: 100vw;
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 30pt;
|
font-size: 5vh;
|
||||||
|
line-height: 10vh;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
.hints .simplesnake:before {
|
.hints .simplesnake:before {
|
||||||
content: "new level";
|
content: "new level";
|
||||||
}
|
}
|
||||||
.hints .simplesnake:after {
|
.hints .simplesnake:after {
|
||||||
|
bottom: 0;
|
||||||
content: "pause";
|
content: "pause";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,7 +396,8 @@ function setup(snake, timer, size){
|
|||||||
// setup kb handler (only once)...
|
// setup kb handler (only once)...
|
||||||
if(!HANDLER_SET){
|
if(!HANDLER_SET){
|
||||||
document.addEventListener('keydown', makeKeyboardHandler(snake))
|
document.addEventListener('keydown', makeKeyboardHandler(snake))
|
||||||
document.addEventListener('touchstart', makeTapHandler(snake))
|
//document.addEventListener('touchstart', makeTapHandler(snake))
|
||||||
|
document.addEventListener('mousedown', makeTapHandler(snake))
|
||||||
HANDLER_SET = true
|
HANDLER_SET = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user