1 Commits

Author SHA1 Message Date
kl3z00 c4a3da8694 Horário 2026-10-26 15:45:36 +00:00
2 changed files with 46 additions and 5 deletions
+9
View File
@@ -0,0 +1,9 @@
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
+37 -5
View File
@@ -14,6 +14,11 @@
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;
}
@@ -27,7 +32,7 @@ body {
.schedule {
display: grid;
/* Hora = 42px | cada dia = 58px */
/* Hora = 35px | cada dia = 58px */
grid-template-columns: 42px repeat(5, 58px);
gap: 2px;
@@ -37,7 +42,7 @@ body {
/* CÉLULAS */
.cell {
height: 30px;
height: 26px;
padding: 2px 3px;
display: flex;
@@ -159,7 +164,7 @@ const periods = [
["13:30","14:20"],
["14:20","15:10"],
["15:20","16:10"],
["16:10","17:10"],
["16:20","17:10"],
["17:30","18:20"]
];
@@ -364,33 +369,60 @@ 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);});
container.appendChild(cell);
});
/* Aulas */
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>`;
@@ -474,4 +506,4 @@ setInterval(updateHighlight, 30000);
</script>
</body>
</html>
</html>