Skip to content

Commit 9a5bc2a

Browse files
committed
Actualiza el Timer para permitir diferentes colores de texto por parámetro
1 parent 723ca7a commit 9a5bc2a

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

timers/index.html

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,32 @@
2323
<!-- Material Kit CSS -->
2424
<link href="../assets/css/material-kit.css?v=2.0.4" rel="stylesheet" />
2525
<style type="text/css">
26-
body {
26+
.color-b {
2727
color: rgb(27, 23, 107);
2828
}
2929

30+
.color-o {
31+
color: rgb(185, 67, 17);
32+
}
33+
34+
.color-w {
35+
color: #eee;
36+
}
37+
3038
.title-container {
31-
39+
3240
height: 85px;
3341
position: relative;
3442
/* background-color: red; */
3543
display: flex;
3644
align-items: center;
3745
}
3846

39-
img:is(:visible) + .title-container{
47+
img:is(:visible)+.title-container {
4048
margin-right: 70px;
4149
}
4250

4351
.title {
44-
color: rgb(27, 23, 107);
4552
font-size: 2em;
4653
font-weight: 800;
4754
line-height: 1;
@@ -132,7 +139,7 @@
132139
<div class="col">
133140
<img src="../assets/img/timers/gorro.png" class="hat" alt="">
134141
<div class="title-container mt-2 justify-content-center">
135-
<p class="title m-0"><span id="title">Micromouse Portugal 2025</span></p>
142+
<p class="title m-0"><span id="title">Micromouse Portugal 2025</span></p>
136143
</div>
137144
</div>
138145
</div>
@@ -167,6 +174,7 @@
167174
const date = urlParams.get('date') || "2025-01-01 00:00:00";
168175
const showHat = urlParams.get('hat') || 1;
169176
const carousel = urlParams.get('carousel') || 0;
177+
const color = urlParams.get('color') || "b";
170178

171179
document.getElementById("title").textContent = title;
172180
if (parseInt(showHat)) {
@@ -179,6 +187,13 @@
179187
} else {
180188
document.querySelector('.title').classList.remove('carousel');
181189
}
190+
document.body.classList.add(`color-${color}`);
191+
document.getElementById("title").classList.add(`color-${color}`);
192+
193+
194+
195+
196+
182197

183198
var countDownDate = new Date(date).getTime();
184199

0 commit comments

Comments
 (0)