new themes
This commit is contained in:
parent
2cd305fee0
commit
2494b0795d
@ -51,7 +51,7 @@ fieldset {
|
|||||||
grid-template-columns: 25vmin 17vmin 25vmin 17vmin;
|
grid-template-columns: 25vmin 17vmin 25vmin 17vmin;
|
||||||
grid-gap: 1vmin;
|
grid-gap: 1vmin;
|
||||||
margin: 2vmin auto;
|
margin: 2vmin auto;
|
||||||
width: 85vmin;
|
width: 80vmin;
|
||||||
justify-items: right;
|
justify-items: right;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
|
62
css/themes/light-solid.css
Normal file
62
css/themes/light-solid.css
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
.invisible-grid > .empty-cell {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.visible-grid > .empty-cell {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px inset rgba(128, 128, 128, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mino {
|
||||||
|
border: 1px solid white;
|
||||||
|
border-radius: 0vmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
.I-mino {
|
||||||
|
background: rgb(153, 255, 230);
|
||||||
|
}
|
||||||
|
|
||||||
|
.J-mino {
|
||||||
|
background: rgb(153, 204, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
.L-mino {
|
||||||
|
background: rgb(255, 204, 153);
|
||||||
|
}
|
||||||
|
|
||||||
|
.O-mino {
|
||||||
|
background: rgb(255, 255, 153);
|
||||||
|
}
|
||||||
|
|
||||||
|
.S-mino {
|
||||||
|
background: rgb(153, 255, 153);
|
||||||
|
}
|
||||||
|
|
||||||
|
.T-mino {
|
||||||
|
background: rgb(204, 153, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Z-mino {
|
||||||
|
background: rgb(255, 153, 153);
|
||||||
|
}
|
||||||
|
|
||||||
|
.locked-mino {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cleared-line {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.trail {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 0vmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ghost {
|
||||||
|
background: rgba(255, 255, 255, 0.4);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
||||||
|
border-radius: 0vmin;
|
||||||
|
}
|
70
css/themes/pure-relief.css
Normal file
70
css/themes/pure-relief.css
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
.invisible-grid > .empty-cell {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.visible-grid > .empty-cell {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px inset rgba(128, 128, 128, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mino {
|
||||||
|
border: 1px outset;
|
||||||
|
border-radius: 0vmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
.I-mino {
|
||||||
|
background: cyan;
|
||||||
|
border-color: lightcyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
.J-mino {
|
||||||
|
background: blue;
|
||||||
|
border-color: lightblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.L-mino {
|
||||||
|
background: orange;
|
||||||
|
border-color: lightgoldenrodyellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.O-mino {
|
||||||
|
background: yellow;
|
||||||
|
border-color: lightyellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.S-mino {
|
||||||
|
background: green;
|
||||||
|
border-color: lightgreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
.T-mino {
|
||||||
|
background: magenta;
|
||||||
|
border-color: pink;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Z-mino {
|
||||||
|
background: red;
|
||||||
|
border-color: lightpink;
|
||||||
|
}
|
||||||
|
|
||||||
|
.locked-mino {
|
||||||
|
background: white;
|
||||||
|
border-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cleared-line {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.trail {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 0vmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ghost {
|
||||||
|
background: rgba(255, 255, 255, 0.4);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
||||||
|
border-radius: 0vmin;
|
||||||
|
}
|
@ -9,40 +9,48 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mino {
|
.mino {
|
||||||
border: 1px solid white;
|
border: 1px solid;
|
||||||
border-radius: 0vmin;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.I-mino {
|
.I-mino {
|
||||||
background: cyan;
|
background: cyan;
|
||||||
|
border-color: lightcyan;
|
||||||
}
|
}
|
||||||
|
|
||||||
.J-mino {
|
.J-mino {
|
||||||
background: blue;
|
background: blue;
|
||||||
|
border-color: lightblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.L-mino {
|
.L-mino {
|
||||||
background: orange;
|
background: orange;
|
||||||
|
border-color: lightgoldenrodyellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
.O-mino {
|
.O-mino {
|
||||||
background: yellow;
|
background: yellow;
|
||||||
|
border-color: lightyellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
.S-mino {
|
.S-mino {
|
||||||
background: green;
|
background: green;
|
||||||
|
border-color: lightgreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
.T-mino {
|
.T-mino {
|
||||||
background: magenta;
|
background: magenta;
|
||||||
|
border-color: pink;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Z-mino {
|
.Z-mino {
|
||||||
background: red;
|
background: red;
|
||||||
|
border-color: lightpink;
|
||||||
}
|
}
|
||||||
|
|
||||||
.locked-mino {
|
.locked-mino {
|
||||||
background: white;
|
background: white;
|
||||||
|
border-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cleared-line {
|
.cleared-line {
|
||||||
|
BIN
favicon.png
BIN
favicon.png
Binary file not shown.
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
1414
js/excanvas.js
1414
js/excanvas.js
File diff suppressed because it is too large
Load Diff
@ -1,39 +0,0 @@
|
|||||||
const actionsDefaultKeys = {
|
|
||||||
moveLeft: "ArrowLeft",
|
|
||||||
moveRight: "ArrowRight",
|
|
||||||
softDrop: "ArrowDown",
|
|
||||||
hardDrop: " ",
|
|
||||||
rotateCW: "ArrowUp",
|
|
||||||
rotateCCW: "z",
|
|
||||||
hold: "c",
|
|
||||||
pause: "Escape",
|
|
||||||
}
|
|
||||||
var selectedButton = null
|
|
||||||
var selectedAction = ""
|
|
||||||
|
|
||||||
function getKey(action) {
|
|
||||||
key = localStorage.getItem(action) || actionsDefaultKeys[action]
|
|
||||||
if (key == ' ') key = "Space"
|
|
||||||
document.open()
|
|
||||||
document.write(key)
|
|
||||||
document.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeKey(button, action) {
|
|
||||||
button.innerHTML = "Touche ?"
|
|
||||||
selectedButton = button
|
|
||||||
selectedAction = action
|
|
||||||
button.blur()
|
|
||||||
}
|
|
||||||
|
|
||||||
function keyUpHandler(e) {
|
|
||||||
if (selectedButton) {
|
|
||||||
localStorage.setItem(selectedAction, e.key)
|
|
||||||
selectedButton.innerHTML = (e.key == " ") ? "Space" : e.key
|
|
||||||
selectedButton = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function() {
|
|
||||||
addEventListener("keyup", keyUpHandler, false)
|
|
||||||
}
|
|
@ -852,13 +852,19 @@ function hideSettings() {
|
|||||||
applySettings()
|
applySettings()
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case STATE.WAITING:
|
case STATE.WAITING:
|
||||||
case STATE.GAME_OVER:
|
|
||||||
document.getElementById("game").style.display = "none"
|
document.getElementById("game").style.display = "none"
|
||||||
document.getElementById("settings").style.display = "none"
|
document.getElementById("settings").style.display = "none"
|
||||||
document.getElementById("start").style.display = "flex"
|
document.getElementById("start").style.display = "flex"
|
||||||
document.getElementById("settingsButton").style.display = "flex"
|
document.getElementById("settingsButton").style.display = "flex"
|
||||||
document.getElementById("leaderboardLink").style.display = "flex"
|
document.getElementById("leaderboardLink").style.display = "flex"
|
||||||
break
|
break
|
||||||
|
case STATE.GAME_OVER:
|
||||||
|
document.getElementById("game").style.display = "grid"
|
||||||
|
document.getElementById("settings").style.display = "none"
|
||||||
|
document.getElementById("start").style.display = "flex"
|
||||||
|
document.getElementById("settingsButton").style.display = "flex"
|
||||||
|
document.getElementById("leaderboardLink").style.display = "flex"
|
||||||
|
break
|
||||||
case STATE.PAUSED:
|
case STATE.PAUSED:
|
||||||
document.getElementById("game").style.display = "grid"
|
document.getElementById("game").style.display = "grid"
|
||||||
document.getElementById("settings").style.display = "none"
|
document.getElementById("settings").style.display = "none"
|
||||||
|
Reference in New Issue
Block a user