Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions css/countdown.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 75 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
-->
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
<style>
@import url('./css/countdown.min.css');
<!-- @import url('./css/countdown.min.css'); -->
<!-- @import url('./src/css/countdown.css'); -->
</style>
<!-- <link rel="stylesheet" href="/css/countdown.css"> -->
<!--<link rel="stylesheet" href="./src/css/countdown.css">-->
</head>
<body>
<div id="countdown">
Expand All @@ -33,15 +34,15 @@
">

<div id="actions">
<a href="#start" id="play"><img src="play.svg" style="
<a href="#start"><img src="play.svg" style="
width: 40px;
margin-right: 10px;
"></a>
<a href="#pause" id="pause"><img src="pause.svg" style="
<a href="#pause"><img src="pause.svg" style="
width: 40px;
margin-right: 10px;
"></a>
<a href="#reset" id="reset"><img src="replay.svg" style="
<a href="#reset"><img src="replay.svg" style="
width: 30px;
"></a>
<select id="time" style="
Expand All @@ -56,8 +57,8 @@
position: relative;
top: -12px;
display: block;
margin: 40px auto;
" onchange="changeTime()">
margin: 40px auto;"
onchange="changeTime()">
<option value="01:00">01:00</option>
<option value="05:00">05:00</option>
<option value="10:00">10:00</option>
Expand All @@ -71,6 +72,32 @@
<span>APLAUSOS</span>
</div>

<div class="presentation-time-slots">
<ol id="time-slots-list">
<li class="time-slot" title="10:00">10:00am - 10 min</li>
<li class="time-slot" title="10:00">10:10am - 10 min</li>
<li class="time-slot" title="20:00">10:20am - 20 min</li>
<li class="time-slot" title="30:00">10:40am - 30 min</li>
<li class="time-slot" title="10:00">11:10am - 10 min</li>
<li class="time-slot" title="10:00">11:20am - 10 min</li>
<li class="time-slot" title="20:00">11:30am - 20 min</li>
<li class="time-slot" title="30:00">11:50am - 30 min</li>
<li class="time-slot" title="10:00">12:20pm - 10 min</li>
<li class="time-slot" title="10:00">12:30pm - 10 min</li>
<li class="time-slot" title="10:00">12:40pm - 10 min</li>
<li class="time-slot" title="20:00">03:00pm - 20 min</li>
<li class="time-slot" title="20:00">03:20pm - 20 min</li>
<li class="time-slot" title="20:00">03:40pm - 20 min</li>
<li class="time-slot" title="20:00">04:00pm - 20 min</li>
<li class="time-slot" title="10:00">04:20pm - 10 min</li>
<li class="time-slot" title="30:00">04:30pm - 30 min</li>
<li class="time-slot" title="10:00">05:40pm - 10 min</li>
<li class="time-slot" title="30:00">05:50pm - 30 min</li>
<li class="time-slot" title="10:00">06:20pm - 10 min</li>
<li class="time-slot" title="30:00">06:30pm - 30 min</li>
</ol>
</div>

<script>
window.name = 'countdown';

Expand Down Expand Up @@ -139,6 +166,7 @@
if (t.total <= 0) {
clearInterval(countdown.timeinterval);
document.body.className = "finish";
setTimeout(goToNextTimeSlot, 30000 /* 30 segundos */);
}
countdown.timeInitial = countdown.timeInitial - 1000;
},
Expand Down Expand Up @@ -208,7 +236,46 @@
document.location.hash = '#' + time;
};

// window.open('./countdown-control.html', 'Countdown Control', 'menubar=1, resizable=1, width=150, height=150');
function getEventTarget(e) {
e = e || window.event;
return e.target || e.srcElement;
}

var timeSlotsList = document.getElementById('time-slots-list');

timeSlotsList.onclick = function(event) {
var target = getEventTarget(event);
//alert(target.innerHTML);
if (target.tagName != "LI") {
// avoid multi-line selection
return;
}
for (var i = 0; i < timeSlotsList.children.length; i++) {
timeSlotsList.children[i].style.backgroundColor = "";
timeSlotsList.children[i].classList.remove("selected");
}
selectNewTimeSlot(target);
};

var selectNewTimeSlot = function(targetSlot) {
targetSlot.style.backgroundColor = "white";
targetSlot.classList.add("selected");
document.location.hash = '#' + targetSlot.title;
document.body.className = "";
};

var goToNextTimeSlot = function() {
for (var i = 0; i < timeSlotsList.children.length; i++) {
if (timeSlotsList.children[i].classList.contains("selected")) {
timeSlotsList.children[i].classList.remove("selected");
timeSlotsList.children[i].style.backgroundColor = "";
var nextListIndex = i != timeSlotsList.children.length - 1 ? i + 1 : 0;
selectNewTimeSlot(timeSlotsList.children[nextListIndex]);
return;
}
}
};

</script>
</body>
</html>
28 changes: 22 additions & 6 deletions src/scss/countdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
font-weight: 400;
src: local('Share Tech Mono'),
local('ShareTechMono-Regular'),
url(./../fonts/RQxK-3RA0Lnf3gnnnNrAsYdJ2JT0J65PSe7wdxAnx_I.woff2) format('woff2');
url(./../../fonts/RQxK-3RA0Lnf3gnnnNrAsYdJ2JT0J65PSe7wdxAnx_I.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
body{
Expand Down Expand Up @@ -79,6 +79,18 @@ body.finish .applauses {
color: #B90000;
}

ol {
list-style: none;
}

.time-slot {
font-size: 3em;
}

li.time-slot:hover {
background: rgba(255, 255, 255, 0.6);
}

@keyframes alert {
0% {
background: #DC4949;
Expand All @@ -96,11 +108,9 @@ body.finish .applauses {
}
}

@media only screen and (max-width: 640px) {
body { font-size: 10px; }
}

@media only screen and (max-width: 320px) {
@media only screen and (max-width: 640px) {
body { font-size: 10px; }
#countdown {
font-size: 14em;
letter-spacing: -20px;
Expand All @@ -114,6 +124,12 @@ body.finish .applauses {
}
@media only screen and (min-width: 768px) and (max-width: 1024px) {
#countdown {
font-size: 20em;
font-size: 18em;
}
}

@media only screen and (min-width: 1025px) and (max-width: 1920px) {
#countdown {
font-size: 24em;
}
}