1 Commits

Author SHA1 Message Date
kl3z00 3d86976d6f CalendarioMartim 2026-10-26 15:16:57 +00:00
2 changed files with 5 additions and 46 deletions
-9
View File
@@ -1,9 +0,0 @@
services:
horario-escolar:
image: nginx:alpine
container_name: horario-escolar
restart: unless-stopped
ports:
- "2090:80"
volumes:
- ./horario-escolar.html:/usr/share/nginx/html/index.html:ro
+5 -37
View File
@@ -14,11 +14,6 @@
html, body {
margin: 0;
padding: 0;
width: fit-content;
height: fit-content;
min-width: 0;
min-height: 0;
overflow: hidden;
background: transparent;
font-family: Arial, Helvetica, sans-serif;
}
@@ -32,7 +27,7 @@ body {
.schedule {
display: grid;
/* Hora = 35px | cada dia = 58px */
/* Hora = 42px | cada dia = 58px */
grid-template-columns: 42px repeat(5, 58px);
gap: 2px;
@@ -42,7 +37,7 @@ body {
/* CÉLULAS */
.cell {
height: 26px;
height: 30px;
padding: 2px 3px;
display: flex;
@@ -164,7 +159,7 @@ const periods = [
["13:30","14:20"],
["14:20","15:10"],
["15:20","16:10"],
["16:20","17:10"],
["16:10","17:10"],
["17:30","18:20"]
];
@@ -369,60 +364,33 @@ function findClass(day, start) {
}
/* CONSTRUIR HORÁRIO */
function buildSchedule() {
const container = document.getElementById("schedule");
/* Cabeçalho */
const hourHeader = document.createElement("div");
hourHeader.className = "cell header-cell";
hourHeader.textContent = "Hora";
container.appendChild(hourHeader);
days.forEach((name, index) => {
const cell = document.createElement("div");
cell.className = "cell header-cell";
cell.dataset.day = index + 1;
cell.textContent = name;
container.appendChild(cell);
});
/* Aulas */
container.appendChild(cell);});
periods.forEach(period => {
const time = document.createElement("div");
time.className = "cell time";
time.innerHTML = `${period[0]}<br>${period[1]}`;
container.appendChild(time);
for (let day = 1; day <= 5; day++) {
const lesson = findClass(day, period[0]);
const cell = document.createElement("div");
cell.className = "cell";
cell.dataset.day = day;
if (lesson) {
cell.classList.add("class", lesson.color);
cell.dataset.start = lesson.start;
cell.dataset.end = lesson.end;
cell.innerHTML =
`<span>${lesson.subject}</span>
<span class="room">${lesson.room}</span>`;
@@ -506,4 +474,4 @@ setInterval(updateHighlight, 30000);
</script>
</body>
</html>
</html>