-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_backup.html
202 lines (167 loc) · 7.23 KB
/
index_backup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html>
<head>
<title>Programa Mensal</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,700;1,300;1,900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
</head>
<style>
* {
-webkit-font-smoothing: antialiased!important;
font-smoothing: antialiased!important;
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
}
body {
background-color: #5b3c88;
color: white;
height: 100vh;
width: 100vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
h1 {
text-align: center;
padding: 0px;
font-size: 3rem;
}
h2 {
text-align: center;
padding-bottom: 20px;
font-style: italic;
padding-top: 30px;
margin-bottom: 5vh;
font-weight: lighter;
font-size: 1.5rem;
}
h3 {
padding: 5px;
color: black;
font-size: 16px;
}
.flex1 {
display: flex;
justify-content: center;
align-items: center;
}
i {
color: #5b3c88;
font-size: 16px;
}
span {
color: white;
font-size: 16px;
background-color: #626262;
padding: 5px;
border-radius: 5px;
text-align: center;
margin: 1rem;
}
.caixa {
background: white;
display: flex;
flex-direction: column;
justify-content: start;
align-items: start;
padding: 16px 32px;
border-radius: 16px;
-webkit-box-shadow:0px 0px 100px 20px rgba(35,39,46,0.5);
-moz-box-shadow: 0px 0px 100px 20px rgba(35,39,46,0.5);
box-shadow: 0px 0px 100px 20px rgba(35,39,46,0.5);
margin: 2rem;
}
</style>
<body>
<h1>Programação da Semana</h1>
<h2 id="datahoje"></h2>
<div class="caixa">
<div class="flex1">
<span class="material-symbols-outlined">desktop_windows</span>
<h3>Vídeo:</h3>
<h3 class="semanaInfo" style="font-weight: lighter;"></h3>
</div>
<div class="flex1">
<span class="material-symbols-outlined">instant_mix</span>
<h3>Som:</h3>
<h3 class="semanaInfo" style="font-weight: lighter;"></h3>
</div>
<div class="flex1">
<span class="material-symbols-outlined" style="font-weight: regular;">podium</span>
<h3>Palco:</h3>
<h3 class="semanaInfo" style="font-weight: lighter;"></h3>
</div>
<div class="flex1">
<span class="material-symbols-outlined">mic_double</span>
<h3>Micros:</h3>
<h3 class="semanaInfo" style="font-weight: lighter;"></h3>
<div style="font-weight: lighter; border-left: #c3c3c3 1px solid; width: 1px; height: 50%; margin-left: 5px; margin-right: 5px;"></div>
<h3 class="semanaInfo" style="font-weight: lighter;"></h3>
</div>
<div class="flex1" style="border-top: #c3c3c3 1px solid; width: 100%; justify-content: start!important;">
<span class="material-symbols-outlined" style="background-color: #c48430;">videocam</span>
<h3>Transmissão Broadcasting:</h3>
<h3 class="semanaInfo" style="font-weight: lighter;"></h3>
</div>
</div>
<script>
Date.prototype.getWeekNumber = function () {
var d = new Date(Date.UTC(this.getFullYear(), this.getMonth(), this.getDate()));
var dayNum = d.getUTCDay() || 7;
d.setUTCDate(d.getUTCDate() + 4 - dayNum);
var yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
return Math.ceil(((d - yearStart) / 86400000 + 1) / 7);
};
var dataAtual = new Date();
var semanaEmVigor = 'semana' + dataAtual.getWeekNumber();
// Determine a semana em vigor (pode ser baseado na data atual)
//var dataAtual = new Date();
//var semanaEmVigor = 'semana' + (Math.ceil(dataAtual.getDate() / 7));
// Formatar a data em português
var dataFormatada = dataAtual.toLocaleDateString('pt-PT', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' });
// Exibir a data na página
document.getElementById('datahoje').textContent = dataFormatada;
// Carregue os dados do programa a partir do arquivo JSON
fetch('https://samiwinho.github.io/dados-programacao/dados-programacao.json')
.then(response => response.json())
.then(programaData => {
// Exiba as informações da semana em vigor
if (programaData[semanaEmVigor]) {
var semanaInfoDivs = document.querySelectorAll('.semanaInfo');
for (var i = 0; i < programaData[semanaEmVigor].length; i++) {
semanaInfoDivs[i].textContent = programaData[semanaEmVigor][i];
}
// Verifique se há texto para Transmissão Broadcasting e mostre a div apenas se houver texto
var transmissaoBroadcastingDiv = document.querySelector('.flex1[style="border-top: #c3c3c3 1px solid; width: 100%; justify-content: start!important;"]');
var textoTransmissaoBroadcasting = programaData[semanaEmVigor][programaData[semanaEmVigor].length - 1];
if (textoTransmissaoBroadcasting) {
transmissaoBroadcastingDiv.style.display = 'flex';
} else {
transmissaoBroadcastingDiv.style.display = 'none';
}
} else {
document.querySelectorAll('.semanaInfo').textContent = "Sem informações para esta semana.";
}
})
.catch(error => {
console.error("Erro ao carregar os dados do programa: " + error);
});
</script>
</body>
</html>