diff --git a/app.js b/app.js
index 278fd92..e967330 100644
--- a/app.js
+++ b/app.js
@@ -95,7 +95,7 @@ const actionsDefaultKeys = {
pause: "Escape",
}
const RETRIES = 3
-const DEFAULT_THEME = "light-relief"
+const DEFAULT_THEME = "default"
var theme = null
@@ -296,15 +296,15 @@ class Matrix extends MinoesTable {
this.drawPiece(ghost)
}
- this.drawPiece(this.piece)
-
// trail
if (this.trail.height) {
this.trail.minoesPos.forEach(pos => {
- for (var y = pos.y; y < pos.y + this.trail.height; y++)
+ for (var y = pos.y; y < pos.y + this.trail.height - 1; y++)
this.drawMino(pos.x, y, CLASSNAME.TRAIL)
})
}
+
+ this.drawPiece(this.piece)
}
}
diff --git a/index.php b/index.php
index a911de7..87ef36d 100644
--- a/index.php
+++ b/index.php
@@ -36,6 +36,7 @@
Webtris
+
diff --git a/leaderboard.js b/leaderboard.js
new file mode 100644
index 0000000..611ba4f
--- /dev/null
+++ b/leaderboard.js
@@ -0,0 +1,16 @@
+const DEFAULT_THEME = "default"
+
+function loadTheme() {
+ var link = document.createElement('link')
+ link.id = "theme";
+ link.rel = 'stylesheet'
+ link.type = 'text/css'
+ link.href = 'themes/' + themeName + '/style.css'
+ link.media = 'all'
+ document.head.appendChild(link);
+}
+
+window.onload = function() {
+ themeName = localStorage.getItem("themeName") || DEFAULT_THEME
+ loadTheme()
+}
diff --git a/leaderboard.php b/leaderboard.php
index efba78d..42d5cf3 100644
--- a/leaderboard.php
+++ b/leaderboard.php
@@ -4,7 +4,7 @@
Meilleurs scores - Webtris
-
+
@@ -28,8 +28,8 @@
$db = null;
?>
-
+
+