Files
chesscubing/chrono.html

200 lines
7.3 KiB
HTML

<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="theme-color" content="#140700" />
<meta name="application-name" content="ChessCubing Arena" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="ChessCubing" />
<meta
name="description"
content="Phase chrono de ChessCubing Arena avec gros boutons face-à-face."
/>
<title>ChessCubing Arena | Phase Chrono</title>
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="shortcut icon" href="/favicon.png" />
<link rel="apple-touch-icon" href="logo.png" />
<link rel="manifest" href="site.webmanifest" />
<script>
(() => {
const assetTokenStorageKey = "chesscubing-arena-asset-token";
const pageUrl = new URL(window.location.href);
const refreshToken = pageUrl.searchParams.get("refresh");
if (refreshToken) {
try {
window.sessionStorage.setItem(assetTokenStorageKey, refreshToken);
} catch {
// Ignore storage failures in restricted browsers.
}
pageUrl.searchParams.delete("refresh");
window.history.replaceState(null, "", pageUrl.toString());
}
let assetToken = "";
try {
assetToken = window.sessionStorage.getItem(assetTokenStorageKey) || "";
} catch {
assetToken = "";
}
window.__CHESSCUBING_ASSET_TOKEN__ = assetToken;
window.__CHESSCUBING_ASSET_URL__ = (path) => {
if (!assetToken) {
return path;
}
const assetUrl = new URL(path, window.location.href);
assetUrl.searchParams.set("v", assetToken);
return `${assetUrl.pathname}${assetUrl.search}${assetUrl.hash}`;
};
const stylesheet = document.createElement("link");
stylesheet.rel = "stylesheet";
stylesheet.href = window.__CHESSCUBING_ASSET_URL__("styles.css");
document.head.append(stylesheet);
})();
</script>
</head>
<body data-page="chrono" class="phase-body">
<main class="phase-shell chrono-stage">
<header class="phase-header">
<a class="brand-link brand-link-logo" href="application.html" aria-label="Retour à l'application">
<img class="brand-link-icon" src="logo.png" alt="Icône ChessCubing" />
<img class="brand-link-mark" src="transparent.png" alt="Logo ChessCubing" />
</a>
<div class="phase-title">
<p class="eyebrow">Phase chrono</p>
<h1 id="chronoTitle">Block 1</h1>
<p id="chronoSubtitle" class="phase-subtitle"></p>
</div>
<button class="button ghost small utility-button" id="openArbiterButton" type="button">
Arbitre
</button>
</header>
<section class="status-strip">
<article class="status-card">
<span id="blockTimerLabel">Temps Block</span>
<strong id="blockTimer">03:00</strong>
</article>
<article class="status-card" id="moveTimerCard">
<span>Temps coup</span>
<strong id="moveTimer">00:20</strong>
</article>
<article class="status-card wide">
<span id="chronoCenterLabel">Trait</span>
<strong id="chronoCenterValue">Blanc</strong>
</article>
</section>
<section class="faceoff-board">
<article class="player-zone opponent-zone" id="blackZone">
<div class="zone-inner mirrored-mobile">
<div class="zone-head">
<div>
<span class="seat-tag dark-seat">Noir</span>
<h2 id="blackNameChrono">Noir</h2>
</div>
<div class="zone-stats">
<strong id="blackMovesChrono">0 / 6</strong>
<span class="player-clock" id="blackClockChrono"></span>
</div>
</div>
<button class="zone-button dark-button" id="blackMoveButton" type="button">
En attente
</button>
<p class="zone-foot" id="blackHintChrono"></p>
</div>
</article>
<article class="phase-spine">
<div class="spine-card">
<p class="micro-label" id="spineLabel">État du Block</p>
<strong id="spineHeadline">Prêt à démarrer</strong>
<p id="spineText"></p>
</div>
<button class="button primary spine-button" id="primaryChronoButton" type="button">
Démarrer le Block
</button>
</article>
<article class="player-zone" id="whiteZone">
<div class="zone-inner">
<div class="zone-head">
<div>
<span class="seat-tag light-seat">Blanc</span>
<h2 id="whiteNameChrono">Blanc</h2>
</div>
<div class="zone-stats">
<strong id="whiteMovesChrono">0 / 6</strong>
<span class="player-clock" id="whiteClockChrono"></span>
</div>
</div>
<button class="zone-button light-button" id="whiteMoveButton" type="button">
En attente
</button>
<p class="zone-foot" id="whiteHintChrono"></p>
</div>
</article>
</section>
</main>
<section class="modal hidden" id="arbiterModal" aria-hidden="true">
<div class="modal-backdrop" data-close-modal="true"></div>
<div class="modal-card">
<div class="modal-head">
<div>
<p class="eyebrow">Outils arbitre</p>
<h2>Contrôles avancés</h2>
</div>
<button class="button ghost small" id="closeArbiterButton" type="button">Fermer</button>
</div>
<p class="section-copy" id="arbiterStatus"></p>
<div class="modal-actions">
<button class="button secondary" id="arbiterPauseButton" type="button">
Pause / reprise
</button>
<button class="button secondary" id="arbiterCloseBlockButton" type="button">
Passer au cube
</button>
<button class="button secondary" id="arbiterTimeoutButton" type="button">
Dépassement temps coup
</button>
<button class="button secondary" id="arbiterSwitchTurnButton" type="button">
Corriger le trait
</button>
<button class="button ghost" id="arbiterWhiteWinButton" type="button">
Blanc gagne
</button>
<button class="button ghost" id="arbiterBlackWinButton" type="button">
Noir gagne
</button>
<button class="button ghost danger" id="arbiterStopButton" type="button">
Abandon / arrêt
</button>
<button class="button ghost" id="arbiterResetButton" type="button">
Réinitialiser le match
</button>
</div>
</div>
</section>
<script>
const appScript = document.createElement("script");
appScript.type = "module";
appScript.src = window.__CHESSCUBING_ASSET_URL__("app.js");
document.body.append(appScript);
</script>
</body>
</html>