redo the disigne(Codex)
This commit is contained in:
269
www/css/clock-scene.css
Normal file
269
www/css/clock-scene.css
Normal file
@@ -0,0 +1,269 @@
|
|||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
overflow: hidden;
|
||||||
|
background: #c89d70;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scene-clock {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 100vh;
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at top center, rgba(255, 235, 200, 0.5), transparent 24%),
|
||||||
|
linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(112, 68, 21, 0.18)),
|
||||||
|
repeating-linear-gradient(
|
||||||
|
0deg,
|
||||||
|
#d8b186 0,
|
||||||
|
#d8b186 2px,
|
||||||
|
#c99d71 2px,
|
||||||
|
#c99d71 5px,
|
||||||
|
#bc8f65 5px,
|
||||||
|
#bc8f65 7px
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scene-clock::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 50% 39%, rgba(255, 217, 122, 0.75), transparent 8%),
|
||||||
|
radial-gradient(circle at 50% 47%, rgba(255, 221, 143, 0.42), transparent 18%);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-shell {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 4vh 5vw 6vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-topbar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1.8vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-board {
|
||||||
|
width: min(1100px, 100%);
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
|
||||||
|
align-items: center;
|
||||||
|
gap: clamp(18px, 3vw, 40px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-zone {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2.4vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-badge {
|
||||||
|
min-width: 190px;
|
||||||
|
padding: 0.45em 1.4em;
|
||||||
|
border-radius: 18px;
|
||||||
|
border: 1px solid rgba(110, 72, 34, 0.22);
|
||||||
|
background: linear-gradient(180deg, rgba(255, 246, 231, 0.96), rgba(232, 207, 171, 0.92));
|
||||||
|
color: #352112;
|
||||||
|
text-align: center;
|
||||||
|
font-family: "Cinzel", serif;
|
||||||
|
font-size: clamp(1.6rem, 2vw, 2.4rem);
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
box-shadow:
|
||||||
|
0 4px 14px rgba(80, 43, 8, 0.15),
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-badge-dark {
|
||||||
|
border-color: rgba(42, 24, 14, 0.5);
|
||||||
|
background: linear-gradient(180deg, rgba(63, 39, 22, 0.96), rgba(37, 22, 13, 0.98));
|
||||||
|
color: #f6ead7;
|
||||||
|
box-shadow:
|
||||||
|
0 4px 18px rgba(37, 16, 7, 0.28),
|
||||||
|
inset 0 1px 0 rgba(255, 235, 214, 0.14);
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-panel {
|
||||||
|
position: relative;
|
||||||
|
width: min(100%, 460px);
|
||||||
|
min-height: clamp(280px, 48vh, 420px);
|
||||||
|
border-radius: 38px;
|
||||||
|
padding: clamp(28px, 4vh, 42px) clamp(24px, 3vw, 34px);
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 2.4vh;
|
||||||
|
box-shadow:
|
||||||
|
0 20px 30px rgba(74, 45, 20, 0.18),
|
||||||
|
inset 0 0 0 1px rgba(255, 255, 255, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-panel-white {
|
||||||
|
background: linear-gradient(180deg, rgba(255, 246, 228, 0.98), rgba(241, 215, 171, 0.98));
|
||||||
|
border: 2px solid rgba(255, 211, 94, 0.75);
|
||||||
|
color: #2c1d14;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-panel-black {
|
||||||
|
background: linear-gradient(180deg, rgba(77, 53, 37, 0.96), rgba(43, 29, 21, 0.98));
|
||||||
|
border: 2px solid rgba(46, 28, 20, 0.78);
|
||||||
|
color: #f0e1cf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-light {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-divider {
|
||||||
|
width: 100%;
|
||||||
|
height: min(48vh, 420px);
|
||||||
|
border-radius: 999px;
|
||||||
|
background: linear-gradient(180deg, rgba(183, 131, 68, 0), rgba(183, 131, 68, 0.9), rgba(183, 131, 68, 0));
|
||||||
|
box-shadow: 0 0 22px rgba(255, 211, 119, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scene-clock .button {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
top: auto;
|
||||||
|
right: auto;
|
||||||
|
border-radius: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 2;
|
||||||
|
background: transparent;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scene-clock #white_button,
|
||||||
|
.scene-clock #black_button {
|
||||||
|
inset: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scene-clock .click {
|
||||||
|
transform: scale(0.985);
|
||||||
|
filter: brightness(0.96);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scene-clock .TextClock {
|
||||||
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
text-align: center;
|
||||||
|
font-family: "Cormorant Garamond", serif;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scene-clock #TimeWhite,
|
||||||
|
.scene-clock #TimeBlack,
|
||||||
|
.scene-clock #BlockTime,
|
||||||
|
.scene-clock #MoveLeftWhite,
|
||||||
|
.scene-clock #MoveLeftBlack,
|
||||||
|
.scene-clock #BlockType {
|
||||||
|
top: auto;
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-status {
|
||||||
|
color: #2f1d13;
|
||||||
|
font-size: clamp(2rem, 2.6vw, 3.4rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-mode {
|
||||||
|
min-width: 220px;
|
||||||
|
padding: 0.28em 1.2em;
|
||||||
|
border-radius: 999px;
|
||||||
|
border: 1px solid rgba(112, 76, 41, 0.3);
|
||||||
|
background: linear-gradient(180deg, rgba(251, 242, 228, 0.98), rgba(232, 208, 178, 0.94));
|
||||||
|
color: #342012;
|
||||||
|
font-size: clamp(1.8rem, 2.2vw, 3rem);
|
||||||
|
box-shadow:
|
||||||
|
0 5px 16px rgba(111, 70, 28, 0.12),
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-time {
|
||||||
|
font-size: clamp(4.8rem, 9vw, 8.4rem);
|
||||||
|
line-height: 0.95;
|
||||||
|
letter-spacing: 0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-moves {
|
||||||
|
max-width: 82%;
|
||||||
|
font-size: clamp(2rem, 3.2vw, 3.6rem);
|
||||||
|
line-height: 1.02;
|
||||||
|
}
|
||||||
|
|
||||||
|
body::before {
|
||||||
|
content: "";
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow-left::before {
|
||||||
|
opacity: 1;
|
||||||
|
background: radial-gradient(circle at 24% 58%, rgba(255, 214, 115, 0.35), transparent 22%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow-right::before {
|
||||||
|
opacity: 1;
|
||||||
|
background: radial-gradient(circle at 76% 58%, rgba(255, 196, 92, 0.22), transparent 22%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow-left #white_button {
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 2px rgba(255, 220, 113, 0.8),
|
||||||
|
0 0 38px rgba(255, 205, 95, 0.55),
|
||||||
|
0 0 70px rgba(255, 202, 93, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow-right #black_button {
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 2px rgba(255, 196, 102, 0.72),
|
||||||
|
0 0 34px rgba(255, 179, 82, 0.3),
|
||||||
|
0 0 62px rgba(255, 179, 82, 0.16);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.clock-shell {
|
||||||
|
padding: 3vh 4vw 5vh;
|
||||||
|
gap: 3vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-board {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-divider {
|
||||||
|
width: 72%;
|
||||||
|
height: 8px;
|
||||||
|
justify-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock-panel {
|
||||||
|
min-height: 250px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,23 +8,46 @@
|
|||||||
<link rel="manifest" href="manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
<meta name="theme-color" content="#000000">
|
<meta name="theme-color" content="#000000">
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<link rel="stylesheet" href="css/clock-scene.css">
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Cinzel:wght@400;500;600&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
<div id="sceneClock" class="scene">
|
<div id="sceneClock" class="scene scene-clock">
|
||||||
<div class="button" id="black_button"></div>
|
<div class="clock-shell">
|
||||||
<div class="button" id="white_button"></div>
|
<div class="clock-topbar">
|
||||||
<h1 id="TimeWhite" class="TextClock">10:00</h1>
|
<h1 id="BlockTime" class="TextClock clock-status">Temps restant Block : 3:00</h1>
|
||||||
<h1 id="TimeBlack" class="TextClock">10:00</h1>
|
<h1 id="BlockType" class="TextClock clock-mode">Block -</h1>
|
||||||
<h1 id="BlockTime" class="TextClock">temps restant Block : 03:00</h1>
|
</div>
|
||||||
<h1 id="MoveLeftWhite" class="TextClock">Coup restant Blanc : 8</h1>
|
|
||||||
<h1 id="MoveLeftBlack" class="TextClock">Coup restant Noire : 8</h1>
|
<div class="clock-board">
|
||||||
<h1 id="BlockType" class="TextClock">Block -</h1>
|
<section class="player-zone player-zone-white">
|
||||||
|
<div class="player-badge">BLANC</div>
|
||||||
|
<div class="clock-panel clock-panel-white">
|
||||||
|
<div class="button" id="white_button" aria-label="White clock button"></div>
|
||||||
|
<div class="panel-light"></div>
|
||||||
|
<h1 id="TimeWhite" class="TextClock clock-time">10:00</h1>
|
||||||
|
<h1 id="MoveLeftWhite" class="TextClock clock-moves">Coup restant Blanc : 8</h1>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="clock-divider"></div>
|
||||||
|
|
||||||
|
<section class="player-zone player-zone-black">
|
||||||
|
<div class="player-badge player-badge-dark">NOIR</div>
|
||||||
|
<div class="clock-panel clock-panel-black">
|
||||||
|
<div class="button" id="black_button" aria-label="Black clock button"></div>
|
||||||
|
<div class="panel-light"></div>
|
||||||
|
<h1 id="TimeBlack" class="TextClock clock-time">10:00</h1>
|
||||||
|
<h1 id="MoveLeftBlack" class="TextClock clock-moves">Coup restant Noir : 8</h1>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/ClockFrontEnd.js"></script>
|
<script src="js/ClockFrontEnd.js"></script>
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ function change_move_left_white(number){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function change_move_left_black(number){
|
function change_move_left_black(number){
|
||||||
black_move_left.innerText = `Coup restant Noire : ${number}`
|
black_move_left.innerText = `Coup restant Noir : ${number}`
|
||||||
}
|
}
|
||||||
|
|
||||||
function change_time_block(Time){
|
function change_time_block(Time){
|
||||||
BlockTime.innerText = `temps restant Block : ${msToMinSec(Time)}`
|
BlockTime.innerText = `Temps restant Block : ${msToMinSec(Time)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_block_type(type){
|
function set_block_type(type){
|
||||||
|
|||||||
Reference in New Issue
Block a user