APmanageur Wi-Fi V1.0
This commit is contained in:
1 parent
d87b617a38
commit
abf33b9929
8 files changed
+273
-182
No files matched your search
+29
-21
@@ -3137,7 +3137,6 @@
|
|||||||
<input id="packetFilterInput" type="text"
|
<input id="packetFilterInput" type="text"
|
||||||
placeholder="Filtrer paquets ou domaine (ex: google.com, dns, icmp, 10.42.0.1...)"
|
placeholder="Filtrer paquets ou domaine (ex: google.com, dns, icmp, 10.42.0.1...)"
|
||||||
data-i18n-placeholder="placeholder_filter_packets" autocomplete="off">
|
data-i18n-placeholder="placeholder_filter_packets" autocomplete="off">
|
||||||
<button id="clearFilterBtn" class="clear-filter-btn" type="button" title="Effacer" data-i18n-title="btn_clear">✕</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="filter-side-controls">
|
<div class="filter-side-controls">
|
||||||
<label class="check" style="margin:0;white-space:nowrap;font-size:13px"><input id="autoScrollCheck"
|
<label class="check" style="margin:0;white-space:nowrap;font-size:13px"><input id="autoScrollCheck"
|
||||||
@@ -6301,8 +6300,8 @@
|
|||||||
<button type="button" id="btnEggGame_2048" class="game-switch-btn" onclick="switchEasterEggGame('2048')" style="padding:4px 8px;font-size:11px;border-radius:6px;white-space:nowrap;display:inline-flex;align-items:center;gap:4px">🔢 <span>2048</span></button>
|
<button type="button" id="btnEggGame_2048" class="game-switch-btn" onclick="switchEasterEggGame('2048')" style="padding:4px 8px;font-size:11px;border-radius:6px;white-space:nowrap;display:inline-flex;align-items:center;gap:4px">🔢 <span>2048</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" style="padding:0;flex:1;background:var(--bg,#071326);display:flex;justify-content:center;align-items:center;min-height:300px">
|
<div class="modal-body" style="padding:0;flex:1;background:var(--bg,#071326);display:flex;justify-content:center;align-items:center;min-height:300px;overflow:hidden">
|
||||||
<iframe id="easterEggGameIframe" src="" style="width:100%;height:540px;border:0;display:block;transition:height 0.25s cubic-bezier(0.4,0,0.2,1)" title="Easter Egg Game" allow="autoplay"></iframe>
|
<iframe id="easterEggGameIframe" src="" scrolling="no" style="width:100%;height:490px;border:0;display:block;overflow:hidden;transition:height 0.25s cubic-bezier(0.4,0,0.2,1)" title="Easter Egg Game" allow="autoplay"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -9104,8 +9103,15 @@ ${vpnBadgeTopo}
|
|||||||
|
|
||||||
function setQuotaPreset(val, unit) {
|
function setQuotaPreset(val, unit) {
|
||||||
if ($('inputQuotaValue')) $('inputQuotaValue').value = val;
|
if ($('inputQuotaValue')) $('inputQuotaValue').value = val;
|
||||||
if ($('inputRateUp')) $('inputRateUp').value = upMbps;
|
if ($('selectQuotaUnit')) $('selectQuotaUnit').value = unit;
|
||||||
if ($('selectRateUpUnit')) $('selectRateUpUnit').value = 'Mbps';
|
updateQuotaPreview();
|
||||||
|
}
|
||||||
|
|
||||||
|
function setBwPreset(downMbps, upMbps) {
|
||||||
|
if ($('inputRateDown')) $('inputRateDown').value = downMbps;
|
||||||
|
if ($('selectRateDownUnit')) $('selectRateDownUnit').value = 'Mbps';
|
||||||
|
if ($('selectQuotaUnit')) $('selectQuotaUnit').value = unit;
|
||||||
|
updateQuotaPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onQuotaPeriodChanged() {
|
async function onQuotaPeriodChanged() {
|
||||||
@@ -10956,15 +10962,17 @@ ${vpnBadgeTopo}
|
|||||||
document.querySelectorAll('.filter-chip').forEach(c => c.classList.remove('active'));
|
document.querySelectorAll('.filter-chip').forEach(c => c.classList.remove('active'));
|
||||||
renderCaptureTable();
|
renderCaptureTable();
|
||||||
};
|
};
|
||||||
$('clearFilterBtn').onclick = function () {
|
if ($('clearFilterBtn')) {
|
||||||
$('packetFilterInput').value = '';
|
$('clearFilterBtn').onclick = function () {
|
||||||
captureFilter = '';
|
$('packetFilterInput').value = '';
|
||||||
capturePage = 1;
|
captureFilter = '';
|
||||||
document.querySelectorAll('.filter-chip').forEach(c => c.classList.remove('active'));
|
capturePage = 1;
|
||||||
const allChip = document.querySelector('.filter-chip[data-filter=""]');
|
document.querySelectorAll('.filter-chip').forEach(c => c.classList.remove('active'));
|
||||||
if (allChip) allChip.classList.add('active');
|
const allChip = document.querySelector('.filter-chip[data-filter=""]');
|
||||||
renderCaptureTable();
|
if (allChip) allChip.classList.add('active');
|
||||||
};
|
renderCaptureTable();
|
||||||
|
};
|
||||||
|
}
|
||||||
document.querySelectorAll('.filter-chip').forEach(chip => {
|
document.querySelectorAll('.filter-chip').forEach(chip => {
|
||||||
chip.onclick = function () {
|
chip.onclick = function () {
|
||||||
document.querySelectorAll('.filter-chip').forEach(c => c.classList.remove('active'));
|
document.querySelectorAll('.filter-chip').forEach(c => c.classList.remove('active'));
|
||||||
@@ -14470,13 +14478,13 @@ ${vpnBadgeTopo}
|
|||||||
};
|
};
|
||||||
|
|
||||||
const GAME_DIMENSIONS = {
|
const GAME_DIMENSIONS = {
|
||||||
tetris: { maxWidth: '560px', height: '540px' },
|
tetris: { maxWidth: '540px', height: '490px' },
|
||||||
dino: { maxWidth: '720px', height: '370px' },
|
dino: { maxWidth: '680px', height: '320px' },
|
||||||
zipline: { maxWidth: '550px', height: '520px' },
|
zipline: { maxWidth: '540px', height: '475px' },
|
||||||
demineur: { maxWidth: '570px', height: '560px' },
|
demineur: { maxWidth: '560px', height: '480px' },
|
||||||
pacman: { maxWidth: '550px', height: '540px' },
|
pacman: { maxWidth: '540px', height: '480px' },
|
||||||
spaceinvaders: { maxWidth: '580px', height: '570px' },
|
spaceinvaders: { maxWidth: '550px', height: '470px' },
|
||||||
'2048': { maxWidth: '550px', height: '530px' }
|
'2048': { maxWidth: '540px', height: '440px' }
|
||||||
};
|
};
|
||||||
|
|
||||||
window.switchEasterEggGame = function (gameName) {
|
window.switchEasterEggGame = function (gameName) {
|
||||||
|
|||||||
+43
-31
@@ -95,6 +95,17 @@
|
|||||||
font-family: 'Courier New', monospace !important;
|
font-family: 'Courier New', monospace !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
|
||||||
|
* { scrollbar-width: none !important; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
@@ -103,9 +114,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
overflow-x: hidden;
|
padding: 6px;
|
||||||
padding: 4px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
transition: background 0.3s ease, color 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,14 +123,15 @@
|
|||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 10px 14px;
|
padding: 8px 12px;
|
||||||
box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 20px rgba(92,167,255,0.1);
|
box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 20px rgba(92,167,255,0.1);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 360px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bar {
|
.header-bar {
|
||||||
@@ -128,33 +139,33 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-area h1 {
|
.title-area h1 {
|
||||||
font-size: 38px;
|
font-size: 28px;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: var(--blue);
|
color: var(--blue);
|
||||||
letter-spacing: -1px;
|
letter-spacing: -1px;
|
||||||
}
|
}
|
||||||
.title-area p {
|
.title-area p {
|
||||||
font-size: 11.5px;
|
font-size: 10.5px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
margin-top: 2px;
|
margin-top: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scores-row {
|
.scores-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.score-badge {
|
.score-badge {
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 6px 12px;
|
padding: 4px 8px;
|
||||||
min-width: 72px;
|
min-width: 58px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.score-badge .score-label {
|
.score-badge .score-label {
|
||||||
@@ -176,8 +187,8 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 14px;
|
margin-bottom: 6px;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@@ -185,9 +196,9 @@
|
|||||||
color: var(--blue-btn-text);
|
color: var(--blue-btn-text);
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 7px 14px;
|
padding: 5px 10px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 12px;
|
font-size: 11.5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -208,13 +219,13 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
background: var(--grid-bg);
|
background: var(--grid-bg);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
width: 330px;
|
width: 296px;
|
||||||
height: 330px;
|
height: 296px;
|
||||||
padding: 10px;
|
padding: 8px;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
grid-template-rows: repeat(4, 1fr);
|
grid-template-rows: repeat(4, 1fr);
|
||||||
gap: 10px;
|
gap: 8px;
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
|
box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
|
||||||
}
|
}
|
||||||
@@ -228,23 +239,23 @@
|
|||||||
|
|
||||||
.tile-layer {
|
.tile-layer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 8px;
|
||||||
left: 10px;
|
left: 8px;
|
||||||
width: 310px;
|
width: 280px;
|
||||||
height: 310px;
|
height: 280px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tile {
|
.tile {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 70px;
|
width: 64px;
|
||||||
height: 70px;
|
height: 64px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
font-size: 26px;
|
font-size: 24px;
|
||||||
transition: transform 0.11s ease-in-out, opacity 0.11s ease-in-out;
|
transition: transform 0.11s ease-in-out, opacity 0.11s ease-in-out;
|
||||||
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
|
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
|
||||||
}
|
}
|
||||||
@@ -318,9 +329,10 @@
|
|||||||
.instructions {
|
.instructions {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
line-height: 1.4;
|
line-height: 1.35;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 12px;
|
margin-top: 6px;
|
||||||
|
padding: 2px 4px;
|
||||||
}
|
}
|
||||||
.instructions kbd {
|
.instructions kbd {
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
@@ -605,8 +617,8 @@
|
|||||||
const layer = document.getElementById('tileLayer');
|
const layer = document.getElementById('tileLayer');
|
||||||
layer.innerHTML = '';
|
layer.innerHTML = '';
|
||||||
|
|
||||||
const CELL_SIZE = 70;
|
const CELL_SIZE = 64;
|
||||||
const GAP = 10;
|
const GAP = 8;
|
||||||
|
|
||||||
for (let r = 0; r < SIZE; r++) {
|
for (let r = 0; r < SIZE; r++) {
|
||||||
for (let c = 0; c < SIZE; c++) {
|
for (let c = 0; c < SIZE; c++) {
|
||||||
|
|||||||
+43
-29
@@ -123,6 +123,17 @@
|
|||||||
font-family: 'Courier New', monospace !important;
|
font-family: 'Courier New', monospace !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
|
||||||
|
* { scrollbar-width: none !important; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
@@ -131,9 +142,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
overflow-x: hidden;
|
padding: 6px;
|
||||||
padding: 4px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
transition: background 0.3s ease, color 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,13 +151,14 @@
|
|||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 10px 14px;
|
padding: 8px 12px;
|
||||||
box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 20px rgba(92,167,255,0.1);
|
box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 20px rgba(92,167,255,0.1);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
max-width: 540px;
|
max-width: 540px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-controls {
|
.top-controls {
|
||||||
@@ -155,18 +166,17 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 6px;
|
||||||
gap: 10px;
|
gap: 8px;
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.level-select {
|
.level-select {
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
padding: 6px 10px;
|
padding: 4px 8px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 12px;
|
font-size: 11.5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,9 +184,9 @@
|
|||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
padding: 6px 12px;
|
padding: 4px 10px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 12px;
|
font-size: 11.5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -198,33 +208,33 @@
|
|||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
border: 2px solid var(--border);
|
border: 2px solid var(--border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 8px 14px;
|
padding: 4px 12px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.digital-counter {
|
.digital-counter {
|
||||||
background: var(--display-bg);
|
background: var(--display-bg);
|
||||||
color: var(--display-text);
|
color: var(--display-text);
|
||||||
font-family: 'Courier New', Courier, monospace;
|
font-family: 'Courier New', Courier, monospace;
|
||||||
font-size: 26px;
|
font-size: 22px;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
padding: 2px 10px;
|
padding: 2px 8px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
min-width: 70px;
|
min-width: 62px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-shadow: 0 0 6px currentColor;
|
text-shadow: 0 0 6px currentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.face-btn {
|
.face-btn {
|
||||||
font-size: 26px;
|
font-size: 22px;
|
||||||
background: var(--cell-up);
|
background: var(--cell-up);
|
||||||
border: 2px outset var(--cell-border-light);
|
border: 2px outset var(--cell-border-light);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 44px;
|
width: 36px;
|
||||||
height: 44px;
|
height: 36px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -237,10 +247,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.board-wrap {
|
.board-wrap {
|
||||||
overflow: auto;
|
overflow: hidden !important;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 400px;
|
padding: 3px;
|
||||||
padding: 4px;
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: var(--display-bg);
|
background: var(--display-bg);
|
||||||
border: 2px solid var(--border);
|
border: 2px solid var(--border);
|
||||||
@@ -256,14 +265,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cell {
|
.cell {
|
||||||
width: 23px;
|
width: var(--cell-size, 18px);
|
||||||
height: 23px;
|
height: var(--cell-size, 18px);
|
||||||
background: var(--cell-up);
|
background: var(--cell-up);
|
||||||
border: 2px outset var(--cell-border-light);
|
border: 2px outset var(--cell-border-light);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 13px;
|
font-size: var(--cell-font, 11px);
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@@ -287,11 +296,12 @@
|
|||||||
.c-8 { color: #6b7280; }
|
.c-8 { color: #6b7280; }
|
||||||
|
|
||||||
.instructions {
|
.instructions {
|
||||||
font-size: 11.5px;
|
font-size: 11px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
margin-top: 12px;
|
margin-top: 6px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 1.4;
|
line-height: 1.35;
|
||||||
|
padding: 2px 4px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@@ -486,7 +496,11 @@
|
|||||||
|
|
||||||
const gridEl = document.getElementById('mineGrid');
|
const gridEl = document.getElementById('mineGrid');
|
||||||
gridEl.innerHTML = '';
|
gridEl.innerHTML = '';
|
||||||
gridEl.style.gridTemplateColumns = `repeat(${cols}, 23px)`;
|
const cellSize = cols > 16 ? 15 : (cols > 9 ? 18 : 24);
|
||||||
|
const cellFont = cols > 16 ? '10px' : (cols > 9 ? '11px' : '13px');
|
||||||
|
document.documentElement.style.setProperty('--cell-size', cellSize + 'px');
|
||||||
|
document.documentElement.style.setProperty('--cell-font', cellFont);
|
||||||
|
gridEl.style.gridTemplateColumns = `repeat(${cols}, ${cellSize}px)`;
|
||||||
|
|
||||||
board = [];
|
board = [];
|
||||||
for (let r = 0; r < rows; r++) {
|
for (let r = 0; r < rows; r++) {
|
||||||
|
|||||||
+26
-13
@@ -150,6 +150,17 @@
|
|||||||
--star-color: #00ff41;
|
--star-color: #00ff41;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
|
||||||
|
* { scrollbar-width: none !important; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
@@ -158,32 +169,32 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
overflow: hidden;
|
padding: 6px;
|
||||||
padding: 10px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
transition: background 0.3s ease, color 0.3s ease;
|
||||||
}
|
}
|
||||||
.game-card {
|
.game-card {
|
||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 16px;
|
padding: 10px 14px;
|
||||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(92, 167, 255, 0.12);
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(92, 167, 255, 0.12);
|
||||||
position: relative;
|
position: relative;
|
||||||
max-width: 700px;
|
max-width: 660px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
.header-bar {
|
.header-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 6px;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
}
|
}
|
||||||
.scores {
|
.scores {
|
||||||
font-size: 18px;
|
font-size: 17px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
color: var(--blue);
|
color: var(--blue);
|
||||||
@@ -207,17 +218,19 @@
|
|||||||
canvas {
|
canvas {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 220px;
|
height: 200px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.controls-hint {
|
.controls-hint {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 12px;
|
margin-top: 6px;
|
||||||
font-size: 12px;
|
font-size: 11px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
.controls-hint kbd {
|
.controls-hint kbd {
|
||||||
@@ -278,7 +291,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="canvas-wrap" id="canvasWrap">
|
<div class="canvas-wrap" id="canvasWrap">
|
||||||
<canvas id="dinoCanvas" width="640" height="220"></canvas>
|
<canvas id="dinoCanvas" width="640" height="200"></canvas>
|
||||||
<div id="gameOverlay" class="overlay-message" style="display:none">
|
<div id="gameOverlay" class="overlay-message" style="display:none">
|
||||||
<h2 id="dinoGameOverText">G A M E O V E R</h2>
|
<h2 id="dinoGameOverText">G A M E O V E R</h2>
|
||||||
<button id="dinoRestartBtn" class="restart-btn" onclick="resetGame()">🔄 REJOUER (Espace)</button>
|
<button id="dinoRestartBtn" class="restart-btn" onclick="resetGame()">🔄 REJOUER (Espace)</button>
|
||||||
@@ -408,7 +421,7 @@
|
|||||||
const overlay = document.getElementById('gameOverlay');
|
const overlay = document.getElementById('gameOverlay');
|
||||||
const canvasWrap = document.getElementById('canvasWrap');
|
const canvasWrap = document.getElementById('canvasWrap');
|
||||||
|
|
||||||
const GROUND_Y = 180;
|
const GROUND_Y = 165;
|
||||||
let highScore = parseInt(localStorage.getItem('ap_dino_hi') || '0', 10);
|
let highScore = parseInt(localStorage.getItem('ap_dino_hi') || '0', 10);
|
||||||
hiScoreEl.textContent = String(highScore).padStart(5, '0');
|
hiScoreEl.textContent = String(highScore).padStart(5, '0');
|
||||||
|
|
||||||
|
|||||||
+28
-15
@@ -109,6 +109,17 @@
|
|||||||
font-family: 'Courier New', monospace !important;
|
font-family: 'Courier New', monospace !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
|
||||||
|
* { scrollbar-width: none !important; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
@@ -117,9 +128,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
overflow-x: hidden;
|
padding: 6px;
|
||||||
padding: 4px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
transition: background 0.3s ease, color 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,13 +137,14 @@
|
|||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 10px 12px;
|
padding: 8px 12px;
|
||||||
box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(92,167,255,0.12);
|
box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(92,167,255,0.12);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
max-width: 480px;
|
max-width: 480px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bar {
|
.header-bar {
|
||||||
@@ -141,8 +152,8 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 6px;
|
||||||
padding: 6px 10px;
|
padding: 4px 10px;
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -235,10 +246,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.controls-hint {
|
.controls-hint {
|
||||||
margin-top: 8px;
|
margin-top: 6px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
line-height: 1.35;
|
||||||
|
padding: 2px 4px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@@ -255,7 +268,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="canvas-wrap">
|
<div class="canvas-wrap">
|
||||||
<canvas id="pacmanCanvas" width="380" height="420"></canvas>
|
<canvas id="pacmanCanvas" width="342" height="378"></canvas>
|
||||||
|
|
||||||
<div id="gameOverlay" class="overlay" style="display:none">
|
<div id="gameOverlay" class="overlay" style="display:none">
|
||||||
<h2 id="overlayTitle">GAME OVER</h2>
|
<h2 id="overlayTitle">GAME OVER</h2>
|
||||||
@@ -415,7 +428,7 @@
|
|||||||
|
|
||||||
const canvas = document.getElementById('pacmanCanvas');
|
const canvas = document.getElementById('pacmanCanvas');
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
const TILE = 20;
|
const TILE = 18;
|
||||||
const COLS = 19;
|
const COLS = 19;
|
||||||
const ROWS = 21;
|
const ROWS = 21;
|
||||||
|
|
||||||
@@ -445,10 +458,10 @@
|
|||||||
|
|
||||||
function initGhosts() {
|
function initGhosts() {
|
||||||
ghosts = [
|
ghosts = [
|
||||||
{ x: 9, y: 8, pixelX: 9 * TILE, pixelY: 8 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[0], speed: 1.8, isEaten: false },
|
{ x: 9, y: 8, pixelX: 9 * TILE, pixelY: 8 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[0], speed: 2, isEaten: false },
|
||||||
{ x: 8, y: 10, pixelX: 8 * TILE, pixelY: 10 * TILE, dirX: 1, dirY: 0, color: GHOST_COLORS[1], speed: 1.6, isEaten: false },
|
{ x: 8, y: 10, pixelX: 8 * TILE, pixelY: 10 * TILE, dirX: 1, dirY: 0, color: GHOST_COLORS[1], speed: 2, isEaten: false },
|
||||||
{ x: 9, y: 10, pixelX: 9 * TILE, pixelY: 10 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[2], speed: 1.6, isEaten: false },
|
{ x: 9, y: 10, pixelX: 9 * TILE, pixelY: 10 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[2], speed: 2, isEaten: false },
|
||||||
{ x: 10, y: 10, pixelX: 10 * TILE, pixelY: 10 * TILE, dirX: -1, dirY: 0, color: GHOST_COLORS[3], speed: 1.5, isEaten: false }
|
{ x: 10, y: 10, pixelX: 10 * TILE, pixelY: 10 * TILE, dirX: -1, dirY: 0, color: GHOST_COLORS[3], speed: 2, isEaten: false }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -576,8 +589,8 @@
|
|||||||
|
|
||||||
// Move Ghosts
|
// Move Ghosts
|
||||||
ghosts.forEach(g => {
|
ghosts.forEach(g => {
|
||||||
const gOnGridX = (g.pixelX % TILE === 0);
|
const gOnGridX = (Math.round(g.pixelX) % TILE === 0);
|
||||||
const gOnGridY = (g.pixelY % TILE === 0);
|
const gOnGridY = (Math.round(g.pixelY) % TILE === 0);
|
||||||
|
|
||||||
if (gOnGridX && gOnGridY) {
|
if (gOnGridX && gOnGridY) {
|
||||||
const gx = Math.round(g.pixelX / TILE);
|
const gx = Math.round(g.pixelX / TILE);
|
||||||
|
|||||||
+22
-9
@@ -123,6 +123,17 @@
|
|||||||
font-family: 'Courier New', monospace !important;
|
font-family: 'Courier New', monospace !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
|
||||||
|
* { scrollbar-width: none !important; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
@@ -131,9 +142,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
overflow-x: hidden;
|
padding: 6px;
|
||||||
padding: 4px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
transition: background 0.3s ease, color 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,13 +151,14 @@
|
|||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 10px 12px;
|
padding: 8px 12px;
|
||||||
box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(92,167,255,0.12);
|
box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(92,167,255,0.12);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
max-width: 580px;
|
max-width: 520px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bar {
|
.header-bar {
|
||||||
@@ -155,8 +166,8 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 6px;
|
||||||
padding: 6px 14px;
|
padding: 4px 12px;
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -252,10 +263,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.controls-hint {
|
.controls-hint {
|
||||||
margin-top: 8px;
|
margin-top: 6px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
line-height: 1.35;
|
||||||
|
padding: 2px 4px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@@ -272,7 +285,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="canvas-wrap">
|
<div class="canvas-wrap">
|
||||||
<canvas id="siCanvas" width="520" height="420"></canvas>
|
<canvas id="siCanvas" width="480" height="360"></canvas>
|
||||||
|
|
||||||
<div id="gameOverlay" class="overlay" style="display:none">
|
<div id="gameOverlay" class="overlay" style="display:none">
|
||||||
<h2 id="overlayTitle">GAME OVER</h2>
|
<h2 id="overlayTitle">GAME OVER</h2>
|
||||||
|
|||||||
+36
-30
@@ -93,6 +93,17 @@
|
|||||||
font-family: 'Courier New', monospace !important;
|
font-family: 'Courier New', monospace !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
|
||||||
|
* { scrollbar-width: none !important; }
|
||||||
|
|
||||||
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
|
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
|
||||||
body {
|
body {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
@@ -102,21 +113,22 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
overflow: hidden;
|
padding: 6px;
|
||||||
padding: 4px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
transition: background 0.3s ease, color 0.3s ease;
|
||||||
}
|
}
|
||||||
.arcade-wrap {
|
.arcade-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 14px;
|
flex-direction: row !important;
|
||||||
|
gap: 12px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 12px;
|
padding: 10px;
|
||||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(92, 167, 255, 0.1);
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(92, 167, 255, 0.1);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
flex-shrink: 0;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
.canvas-container {
|
.canvas-container {
|
||||||
@@ -133,21 +145,21 @@
|
|||||||
.sidebar {
|
.sidebar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
width: 154px;
|
width: 146px;
|
||||||
}
|
}
|
||||||
.panel-box {
|
.panel-box {
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 8px;
|
padding: 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.stats-box {
|
.stats-box {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
padding: 6px 2px;
|
padding: 4px 2px;
|
||||||
}
|
}
|
||||||
.stat-col {
|
.stat-col {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -155,14 +167,14 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.stat-col h3 {
|
.stat-col h3 {
|
||||||
font-size: 10px;
|
font-size: 9.5px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
.stat-col .value {
|
.stat-col .value {
|
||||||
font-size: 15px;
|
font-size: 14px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--blue);
|
color: var(--blue);
|
||||||
font-family: "Courier New", Courier, monospace;
|
font-family: "Courier New", Courier, monospace;
|
||||||
@@ -177,16 +189,16 @@
|
|||||||
.btn-row {
|
.btn-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
gap: 6px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
background: var(--blue);
|
background: var(--blue);
|
||||||
color: var(--blue-btn-text);
|
color: var(--blue-btn-text);
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 7px 8px;
|
padding: 6px 6px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 12px;
|
font-size: 11.5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all .15s ease;
|
transition: all .15s ease;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -200,21 +212,21 @@
|
|||||||
}
|
}
|
||||||
.btn.secondary:hover { opacity: 0.85; }
|
.btn.secondary:hover { opacity: 0.85; }
|
||||||
.controls-help {
|
.controls-help {
|
||||||
font-size: 10.5px;
|
font-size: 9.5px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
line-height: 1.45;
|
line-height: 1.35;
|
||||||
background: rgba(0,0,0,0.12);
|
background: rgba(0,0,0,0.12);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 6px 8px;
|
padding: 5px 6px;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
.controls-help kbd {
|
.controls-help kbd {
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
padding: 1px 4px;
|
padding: 1px 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
font-size: 10px;
|
font-size: 9px;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
.touch-controls {
|
.touch-controls {
|
||||||
@@ -239,12 +251,6 @@
|
|||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
}
|
}
|
||||||
.touch-btn:active { background: var(--blue); color: var(--blue-btn-text); }
|
.touch-btn:active { background: var(--blue); color: var(--blue-btn-text); }
|
||||||
@media (max-width: 360px) {
|
|
||||||
.arcade-wrap { flex-direction: column; align-items: center; padding: 6px; }
|
|
||||||
.sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
|
|
||||||
.sidebar .panel-box { flex: 1; min-width: 80px; }
|
|
||||||
.touch-controls { display: grid; }
|
|
||||||
}
|
|
||||||
.overlay-msg {
|
.overlay-msg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
@@ -269,7 +275,7 @@
|
|||||||
|
|
||||||
<div class="arcade-wrap">
|
<div class="arcade-wrap">
|
||||||
<div class="canvas-container">
|
<div class="canvas-container">
|
||||||
<canvas id="tetris" width="240" height="480"></canvas>
|
<canvas id="tetris" width="220" height="440"></canvas>
|
||||||
<div id="gameOverlay" class="overlay-msg" style="display:none">
|
<div id="gameOverlay" class="overlay-msg" style="display:none">
|
||||||
<h2 id="overlayTitle">GAME OVER</h2>
|
<h2 id="overlayTitle">GAME OVER</h2>
|
||||||
<div id="overlayScore" style="color:var(--blue);font-size:16px;font-weight:700">Score: 0</div>
|
<div id="overlayScore" style="color:var(--blue);font-size:16px;font-weight:700">Score: 0</div>
|
||||||
@@ -278,9 +284,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="panel-box" style="padding:6px">
|
<div class="panel-box" style="padding:5px">
|
||||||
<h3 id="labelNext" style="font-size:10px;margin-bottom:4px">Prochaine</h3>
|
<h3 id="labelNext" style="font-size:9.5px;margin-bottom:3px">Prochaine</h3>
|
||||||
<canvas id="next" class="preview-canvas" width="80" height="74"></canvas>
|
<canvas id="next" class="preview-canvas" width="74" height="66"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-box stats-box">
|
<div class="panel-box stats-box">
|
||||||
<div class="stat-col">
|
<div class="stat-col">
|
||||||
@@ -606,7 +612,7 @@
|
|||||||
|
|
||||||
const COLS = 10;
|
const COLS = 10;
|
||||||
const ROWS = 20;
|
const ROWS = 20;
|
||||||
const BLOCK = 24;
|
const BLOCK = 22;
|
||||||
|
|
||||||
const COLORS = [
|
const COLORS = [
|
||||||
null,
|
null,
|
||||||
|
|||||||
+46
-34
@@ -136,6 +136,17 @@
|
|||||||
--node-color: #00ff41;
|
--node-color: #00ff41;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
|
||||||
|
* { scrollbar-width: none !important; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
@@ -144,9 +155,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
overflow-x: hidden;
|
padding: 6px;
|
||||||
padding: 4px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
transition: background 0.3s ease, color 0.3s ease;
|
||||||
}
|
}
|
||||||
.game-container {
|
.game-container {
|
||||||
@@ -155,12 +165,13 @@
|
|||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 10px 14px;
|
padding: 10px 14px;
|
||||||
box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(92,167,255,0.12);
|
box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(92,167,255,0.12);
|
||||||
max-width: 480px;
|
max-width: 430px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
flex-shrink: 0;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
.top-bar {
|
.top-bar {
|
||||||
@@ -168,7 +179,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 6px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.title-badge {
|
.title-badge {
|
||||||
@@ -177,15 +188,15 @@
|
|||||||
gap: 6px;
|
gap: 6px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--blue);
|
color: var(--blue);
|
||||||
font-size: 16px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
.level-selector select {
|
.level-selector select {
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
padding: 5px 10px;
|
padding: 4px 8px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 12px;
|
font-size: 11.5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.stats-bar {
|
.stats-bar {
|
||||||
@@ -194,22 +205,22 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: var(--panel-box);
|
background: var(--panel-box);
|
||||||
padding: 8px 14px;
|
padding: 4px 10px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
margin-bottom: 14px;
|
margin-bottom: 6px;
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
.stats-bar strong {
|
.stats-bar strong {
|
||||||
color: var(--blue);
|
color: var(--blue);
|
||||||
}
|
}
|
||||||
.progress-bar-wrap {
|
.progress-bar-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 6px;
|
height: 5px;
|
||||||
background: var(--board-bg);
|
background: var(--board-bg);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 14px;
|
margin-bottom: 8px;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
.progress-bar-fill {
|
.progress-bar-fill {
|
||||||
@@ -221,28 +232,28 @@
|
|||||||
.board-container {
|
.board-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: var(--board-bg);
|
background: var(--board-bg);
|
||||||
border: 3px solid var(--border);
|
border: 2px solid var(--border);
|
||||||
border-radius: 12px;
|
border-radius: 10px;
|
||||||
padding: 8px;
|
padding: 4px;
|
||||||
box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
|
box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
.grid {
|
.grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 6px;
|
gap: 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.cell {
|
.cell {
|
||||||
width: 58px;
|
width: 44px;
|
||||||
height: 58px;
|
height: 44px;
|
||||||
background: var(--cell-bg);
|
background: var(--cell-bg);
|
||||||
border: 1px solid var(--cell-border);
|
border: 1px solid var(--cell-border);
|
||||||
border-radius: 8px;
|
border-radius: 7px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 20px;
|
font-size: 17px;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -264,15 +275,15 @@
|
|||||||
.cell.number-node {
|
.cell.number-node {
|
||||||
color: var(--node-color);
|
color: var(--node-color);
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 22px;
|
font-size: 18px;
|
||||||
text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
|
text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
|
||||||
}
|
}
|
||||||
.cell.number-node::after {
|
.cell.number-node::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 4px;
|
inset: 3px;
|
||||||
border: 2px dashed rgba(255, 255, 255, 0.35);
|
border: 2px dashed rgba(255, 255, 255, 0.35);
|
||||||
border-radius: 6px;
|
border-radius: 5px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.cell.number-node.visited-num {
|
.cell.number-node.visited-num {
|
||||||
@@ -285,10 +296,10 @@
|
|||||||
/* SVG overlay for path */
|
/* SVG overlay for path */
|
||||||
.path-svg {
|
.path-svg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
top: 4px;
|
||||||
left: 8px;
|
left: 4px;
|
||||||
width: calc(100% - 16px);
|
width: calc(100% - 8px);
|
||||||
height: calc(100% - 16px);
|
height: calc(100% - 8px);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
@@ -296,7 +307,7 @@
|
|||||||
.path-line {
|
.path-line {
|
||||||
fill: none;
|
fill: none;
|
||||||
stroke: var(--path-stroke, #5ca7ff);
|
stroke: var(--path-stroke, #5ca7ff);
|
||||||
stroke-width: 7;
|
stroke-width: 6;
|
||||||
stroke-linecap: round;
|
stroke-linecap: round;
|
||||||
stroke-linejoin: round;
|
stroke-linejoin: round;
|
||||||
filter: drop-shadow(0 0 6px var(--path-stroke, #5ca7ff));
|
filter: drop-shadow(0 0 6px var(--path-stroke, #5ca7ff));
|
||||||
@@ -305,8 +316,8 @@
|
|||||||
.bottom-actions {
|
.bottom-actions {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 1.25fr;
|
grid-template-columns: 1fr 1fr 1.25fr;
|
||||||
gap: 10px;
|
gap: 6px;
|
||||||
margin-top: 16px;
|
margin-top: 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
@@ -354,11 +365,12 @@
|
|||||||
.btn.primary:hover { opacity: 0.9; }
|
.btn.primary:hover { opacity: 0.9; }
|
||||||
|
|
||||||
.instructions {
|
.instructions {
|
||||||
margin-top: 12px;
|
margin-top: 6px;
|
||||||
font-size: 11.5px;
|
font-size: 11px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 1.45;
|
line-height: 1.35;
|
||||||
|
padding: 2px 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Win overlay */
|
/* Win overlay */
|
||||||
|
|||||||
Reference in new issue
Block a user