-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
298 lines (262 loc) · 11 KB
/
index.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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<!DOCTYPE html>
<html manifest="ifisica.appcache"> <!-- CACHE PARA ARMAZENAMENTO DE DADOS OFFLINE -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <!-- AJUSTAR A PÁGINA A DIFERENTES TAMANHOS DE TELA -->
<title>iFísica</title>
<!-- CSS -->
<link rel="stylesheet" href="css/material.min.css"> <!-- CSS DO MATERIAL UI -->
<link rel="stylesheet" href="css/bootstrap.min.css"> <!-- CSS DO BOOTSTRAP -->
<link rel="stylesheet" href="css/dialog-polyfill.css"> <!-- CSS DO DIALOG POLYFILL -->
<link rel="stylesheet" href="css/pace-theme-flash.css"> <!-- CSS DO PACE -->
<!-- JS -->
<script src="js/jquery-3.2.1.min.js"></script> <!-- JS DO JQUERY -->
<script src="js/material.min.js"></script> <!-- JS DO MATERIAL UI -->
<script src="js/bootstrap.min.js"></script> <!-- JS DO BOOTSTRAP -->
<script src="js/dialog-polyfill.js"></script> <!-- JS DO DIALOG POLYFILL -->
<script src="js/pace.min.js"></script> <!-- JS DO PACE -->
<style type="text/css">
/* ICONES MATERIAL (FONTE) */
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(fonts/MaterialIcons-Regular.eot); /* IE6-8 */
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url(fonts/MaterialIcons-Regular.woff2) format('woff2'),
url(fonts/MaterialIcons-Regular.woff) format('woff'),
url(fonts/MaterialIcons-Regular.ttf) format('truetype');
}
/* ROBOTO (FONTE) */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url(fonts/Roboto-Regular.ttf);
}
/* COR DE FUNDO DA PÁGINA */
body {
background-color: #e9ecef;
}
.formula {
margin: 10px;
width: 250px;
}
/* LOGOTIPO DA JANELA SOBRE */
.logo {
width: 64px;
height: 64px;
margin: 0 16px 0 0;
}
/* COLUNA DOS BOTÕES */
.col-xl {
padding: 0;
}
/* ICONES DOS BOTÕES */
.btnIcone {
width: 20px;
height: 20px;
margin: 5px;
}
/* ADAPTA O ATRITO EM RELAÇÃO AOS OUTROS */
#iconeAtrito {
width: 30px;
height: 30PX;
margin: 5px;
}
/* AJUSTA AS MARGENS DOS ALERTAS (BOOTSTRAP) */
.alert {
margin: 16px 0 0 0;
}
/* TEXTO "ATIVAR" NO ALERTA (BOOTSTRAP) */
.alert-link:hover {
text-decoration: underline;
}
/* EFEITO DE FADE */
html {
-webkit-animation: fadeEffect 1s;
animation: fadeEffect 1s; /* Fading effect takes 1 second */
}
@-webkit-keyframes fadeEffect {
from {opacity: 0;}
to {opacity: 1;}
}
@keyframes fadeEffect {
from {opacity: 0;}
to {opacity: 1;}
}
</style>
</head>
<body>
<!-- ########## MENU ########## -->
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<!-- TITULO -->
<span class="mdl-layout-title">iFísica</span>
<!-- ADICIONA UM ESPAÇAMENTO, PARA ALINHAR A NAVEGAÇÃO A DIREITA -->
<div class="mdl-layout-spacer"></div>
<!-- BARRA DE NAVEGAÇÃO HORIZONTAL -->
<nav class="mdl-navigation mdl-layout--large">
<!-- BOTÃO DO MENU -->
<button id="demo-menu-lower-right" class="mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">more_vert</i>
</button>
<!-- OPÇÕES DO MENU -->
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="demo-menu-lower-right">
<li><a href="index.html" class="mdl-menu__item">Página Inicial</a></li>
<li><a target="_blank" href="https://github.com/nsioficial/ifisica" class="mdl-menu__item">Repositório no Github</a></li>
<li><a id="show-dialog" class="mdl-menu__item">Sobre o iFísica</a></li>
</ul>
</nav>
</div>
</header>
<!-- ########## MENU LATERAL ########## -->
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">iFísica</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="formulas/peso.html">Força Peso</a>
<a class="mdl-navigation__link" href="formulas/atrito.html">Força de atrito</a>
<a class="mdl-navigation__link" href="formulas/elastica.html">Força elástica</a>
<a class="mdl-navigation__link" href="formulas/centripeta.html">Força centripeta</a>
<a class="mdl-navigation__link" href="formulas/forca.html">Trabalho de uma força</a>
</nav>
</div>
<!-- ########## SOBRE O IFISICA ########## -->
<dialog class="mdl-dialog">
<h4 class="mdl-dialog__title"><img class="logo" src="img/logo-ifisica.png">iFísica</h4>
<div id="alertaCache" class="alert alert-success" role="alert">
This is a success alert—check it out!
</div>
<div class="mdl-dialog__content">
<p>
Um app desenvolvido na feira de ciencias de 2017 do IFTO Campus Palmas, para consultar formulas de física diretamente do seu smartphone, incluindo vídeo-aulas, métodos de resolução e uma calculadora interativa para solução de exercicíos mais complexos.
</p>
<hr>
<small>Projeto desenvolvido por:<br>
- <a target="_blank" href="https://henriquehbr.github.io">Henrique Borges</a> (Programação)<br>
- <a target="_blank" href="https://github.com/angeloecw">Angelo Emanuel</a> (Programação)<br>
- <a target="_blank" href="https://github.com/GiordanoBrandao-NSI">Giordano Bruno</a> (Programação)<br>
- <a target="_blank" href="#">Alexander Justus</a> (Produção das vídeo-aulas)<br>
- <a target="_blank" href="#">Luiz Felipe</a> (Produção das vídeo-aulas)<br></small>
</div>
<div class="mdl-dialog__actions">
<!-- BOTÃO OK -->
<button type="button" class="mdl-button close">OK</button>
</div>
</dialog>
<!-- ########## SOBRE O IFISICA (SCRIPT) ########## -->
<script>
var dialog = document.querySelector('dialog');
var btnMostrarDialog = document.querySelector('#show-dialog');
var alertaCache = document.getElementById('alertaCache');
var appCache = window.applicationCache;
if (! dialog.showModal) {
// ##### REGISTRA OS DIALOGS DA PÁGINA USANDO POLYFILL #####
dialogPolyfill.registerDialog(dialog);
}
// QUANDO O BOTÃO FOR CLICADO, A JANELA É ABERTA
btnMostrarDialog.addEventListener('click', function() {
dialog.showModal();
// ########## ANALISA O ESTADO DO CACHE DO SITE ##########
switch (appCache.status) {
// UNCACHED (SEM CACHE) == 0
case appCache.UNCACHED:
alertaCache.setAttribute('class', 'alert alert-danger');
alertaCache.innerHTML = "Visualização offline desativada. " + "<a href='javascript:appCache.update();' class='alert-link'>Ativar</a>";
break;
// IDLE (PARADO) == 1
case appCache.IDLE:
alertaCache.setAttribute('class', 'alert alert-success');
alertaCache.innerHTML = "Visualização offline funcionando! " + "<a href='javascript:appCache.update();' class='alert-link'>Recarregar</a>";
break;
// CHECKING (CHECANDO) == 2
case appCache.CHECKING:
alertaCache.setAttribute('class', 'alert alert-info');
alertaCache.innerHTML = "Buscando atualizações...";
break;
// DOWNLOADING (BAIXANDO) == 3
case appCache.DOWNLOADING:
alertaCache.setAttribute('class', 'alert alert-primary');
alertaCache.innerHTML = "Ativando visualização offline...";
break;
// UPDATEREADY (ATUALIZAÇÃO DISPONIVEL) == 4
case appCache.UPDATEREADY:
alertaCache.setAttribute('class', 'alert alert-warning');
alertaCache.innerHTML = "Atualização da visualização offline disponível! " + "<a href='javascript:appCache.update(), appCache.swapCache();' class='alert-link'>Atualizar</a>";
break;
// OBSOLETE (OBSOLETO) == 5
case appCache.OBSOLETE:
alertaCache.setAttribute('class', 'alert alert-dark');
alertaCache.innerHTML = "Visualização offline obsoleta. " + "<a href='javascript:appCache.update();' class='alert-link'>Atualizar</a>";
break;
default:
alertaCache.setAttribute('class', 'alert alert-dark');
alertaCache.innerHTML = "Erro desconhecido! " + "<a href='javascript:appCache.update();' class='alert-link'>Recarregar</a>";
break;
};
});
// BOTÃO PARA FECHAR A JANELA
dialog.querySelector('.close').addEventListener('click', function() {
dialog.close();
});
</script>
<main class="mdl-layout__content">
<!-- ########## CONTEÚDO DA PÁGINA ########## -->
<div class="page-content">
<!-- ##### PÁGINA INICIAL ##### -->
<div class="jumbotron">
<h1 class="display-3">Bem vindo ao iFísica!</h1>
<p class="lead">Escolha uma das formula abaixo para mais informações.</p>
<hr class="my-4">
<p class="lead">
<!-- ########## BOTÕES ########## -->
<center>
<div class="container">
<div class="row">
<!-- ##### FORÇA PESO ##### -->
<div class="col-xl">
<button onclick="location.href='formulas/peso.html';" href="peso.html" type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored formula">
<img class="btnIcone" src="img/icone-peso.png">
Força Peso
</button>
</div>
<!-- ##### FORÇA DE ATRITO ##### -->
<div class="col-xl">
<button onclick="location.href='formulas/atrito.html';" type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored formula">
<img id="iconeAtrito" class="btnIcone" src="img/icone-atrito.png">
Força de atrito
</button>
</div>
<!-- ##### FORÇA ELÁSTICA ##### -->
<div class="col-xl">
<button onclick="location.href='formulas/elastica.html';" type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored formula">
<img class="btnIcone" src="img/icone-elastico.png">
Força elástica
</button>
</div>
<!-- ##### FORÇA CENTRIPETA ##### -->
<div class="col-xl">
<button onclick="location.href='formulas/centripeta.html';" type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored formula">
<img class="btnIcone" src="img/icone-centripeta.png">
Força centripeta
</button>
</div>
<!-- ##### TRABALHO DA FORÇA ##### -->
<div class="col-xl">
<button onclick="location.href='formulas/forca.html';" type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored formula">
<img class="btnIcone" src="img/icone-peso.png">
Trabalho de uma força
</button>
</div>
</div>
</div>
</center>
</p>
</div>
</div>
</main>
</div>
</body>
</html>