Commit 94ba5a952926d0805f1643b14b4d3fc338e11c85
1 parent
d8ea2f90
Exists in
master
and in
1 other branch
- removed unused templates
- cosmetic changes.
Showing
4 changed files
with
18 additions
and
323 deletions
Show diff stats
templates/login.html
... | ... | @@ -6,46 +6,30 @@ |
6 | 6 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
7 | 7 | <meta name="description" content="" /> |
8 | 8 | <meta name="author" content="" /> |
9 | + <title>Teste</title> | |
9 | 10 | <link rel="icon" href="/static/favicon.ico" /> |
10 | 11 | |
11 | 12 | <!-- MathJax --> |
12 | 13 | <script type="text/x-mathjax-config"> |
13 | - MathJax.Hub.Config({ | |
14 | - extensions: ["tex2jax.js"], | |
15 | - jax: ["input/TeX","output/HTML-CSS"], | |
16 | - tex2jax: {inlineMath: [["$$$","$$$"], ["$","$"], ["\\(","\\)"]]} | |
17 | - }); | |
14 | + MathJax.Hub.Config({ | |
15 | + tex2jax: { | |
16 | + inlineMath: [["$$$","$$$"], ["$","$"], ["\\(","\\)"]] | |
17 | + } | |
18 | + }); | |
18 | 19 | </script> |
19 | - <script type="text/javascript" src="/static/js/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> | |
20 | - </script> | |
21 | - | |
22 | - <title>UEvora</title> | |
20 | + <script type="text/javascript" src="/static/js/mathjax/MathJax.js?config=TeX-AMS_CHTML-full"></script> | |
23 | 21 | |
24 | 22 | <!-- Bootstrap --> |
25 | 23 | <link rel="stylesheet" href="/static/css/bootstrap.min.css"> |
26 | 24 | <link rel="stylesheet" href="/static/css/bootstrap-theme.min.css"> <!-- optional --> |
25 | + <link rel="stylesheet" href="/static/font-awesome/css/font-awesome.min.css"> | |
26 | + <link rel="stylesheet" href="/static/css/github.css"> <!-- syntax highlight --> | |
27 | + <link rel="stylesheet" href="/static/css/test.css"> | |
27 | 28 | |
28 | 29 | <script src="/static/js/jquery.min.js"></script> |
29 | 30 | <script src="/static/js/bootstrap.min.js"></script> |
30 | - | |
31 | - <style> | |
32 | - /* Fixes navigation panel overlaying content */ | |
33 | - body { | |
34 | - padding-top: 80px; | |
35 | - background: #aaa; | |
36 | - } | |
37 | - .drop-shadow { | |
38 | - -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .5); | |
39 | - box-shadow: 0px 2px 10px 3px rgba(0, 0, 0, .2); | |
40 | - border-radius:5px; | |
41 | - } | |
42 | - .voffset { | |
43 | - margin-bottom: 20px; | |
44 | - } | |
45 | - </style> | |
46 | - | |
47 | 31 | </head> |
48 | - | |
32 | +<!-- ===================================================================== --> | |
49 | 33 | <body> |
50 | 34 | <div class="container-fluid"> |
51 | 35 | <div class="well drop-shadow"> |
... | ... | @@ -54,10 +38,10 @@ |
54 | 38 | <img src="/static/logo_horizontal.png" class="img-responsive" /> |
55 | 39 | </div> |
56 | 40 | |
57 | - <div class="col-xs-4"> | |
41 | +<!-- <div class="col-xs-4"> | |
58 | 42 | </div> |
59 | - | |
60 | - <div class="col-xs-4"> | |
43 | + --> | |
44 | + <div class="col-xs-8"> | |
61 | 45 | <h4>Identificação:</h4> |
62 | 46 | <form method="post" action="/login" class="form-signin"> |
63 | 47 | <div class="form-group"> |
... | ... | @@ -65,7 +49,7 @@ |
65 | 49 | <input type="password" name="pw" class="form-control" placeholder="Password" required> |
66 | 50 | </div> |
67 | 51 | <button class="btn btn-primary" type="submit"> |
68 | - <span class="glyphicon glyphicon-log-in"></span> Entrar | |
52 | + <i class="fa fa-sign-in" aria-hidden="true"></i> Entrar | |
69 | 53 | </button> |
70 | 54 | </form> |
71 | 55 | </div> | ... | ... |
templates/results.html
... | ... | @@ -1,155 +0,0 @@ |
1 | -<!DOCTYPE html> | |
2 | -<html> | |
3 | -<head> | |
4 | - <meta charset="UTF-8"> | |
5 | - <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
6 | - <meta name="viewport" content="width=device-width, initial-scale=1"> | |
7 | - <title> ${t['title']} </title> | |
8 | - <link rel="icon" href="favicon.ico"> | |
9 | - | |
10 | - <!-- Bootstrap --> | |
11 | - <link rel="stylesheet" href="/css/bootstrap.min.css"> | |
12 | - <link rel="stylesheet" href="/css/bootstrap-theme.min.css"> <!-- optional --> | |
13 | - | |
14 | - <script src="/js/jquery.min.js"></script> | |
15 | - <script src="/js/bootstrap.min.js"></script> | |
16 | - | |
17 | - <style> | |
18 | - /* Fixes navigation panel overlaying content */ | |
19 | - body { | |
20 | - padding-top: 80px; | |
21 | - background: #aaa; | |
22 | - } | |
23 | - .drop-shadow { | |
24 | - -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .5); | |
25 | - box-shadow: 0px 2px 10px 3px rgba(0, 0, 0, .2); | |
26 | - border-radius:5px; | |
27 | - } | |
28 | - .progress { | |
29 | - margin-bottom: 0px; | |
30 | - border-radius: 25px; | |
31 | - } | |
32 | - </style> | |
33 | - </head> | |
34 | - <!-- ===================================================================== --> | |
35 | -<body> | |
36 | - | |
37 | - <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> | |
38 | - <div class="container-fluid drop-shadow"> | |
39 | - <div class="navbar-header"> | |
40 | - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> | |
41 | - <span class="icon-bar"></span> | |
42 | - <span class="icon-bar"></span> | |
43 | - <span class="icon-bar"></span> | |
44 | - </button> | |
45 | - <a class="navbar-brand" href="#"> | |
46 | - ${t['title']} | |
47 | - </a> | |
48 | - </div> | |
49 | - | |
50 | - <div class="collapse navbar-collapse" id="myNavbar"> | |
51 | - | |
52 | - <ul class="nav navbar-nav navbar-right"> | |
53 | - <li class="dropdown"> | |
54 | - <a class="dropdown-toggle" data-toggle="dropdown" href="#"> | |
55 | - <span class="glyphicon glyphicon-user" aria-hidden="true"></span> | |
56 | - ${name} (${uid}) <span class="caret"></span> | |
57 | - </a> | |
58 | - <ul class="dropdown-menu"> | |
59 | - <li><a href="/test">Teste</a></li> | |
60 | - <li class="active"><a href="/results">Ver resultados</a></li> | |
61 | - <li><a href="/logout"><span class="glyphicon glyphicon-log-out" aria-hidden="true"></span> Sair</a></li> | |
62 | - </ul> | |
63 | - </li> | |
64 | - </ul> | |
65 | - </div> | |
66 | - </div> | |
67 | -</nav> | |
68 | - | |
69 | - | |
70 | - | |
71 | -<div class="container"> | |
72 | - <div class="panel panel-default drop-shadow"> | |
73 | - <!-- <div class="panel-heading"> | |
74 | - ${t['title']} | |
75 | - </div> | |
76 | - --><!-- <div class="panel-body"> --> | |
77 | - % if not results: | |
78 | - <h4 class="text-center">Ainda não há resultados</h4> | |
79 | - | |
80 | - % else: | |
81 | - <table class="table table-hover"> | |
82 | - <thead> | |
83 | - <tr> | |
84 | - <th class="col-md-1 text-center">#</th> | |
85 | - <th class="col-md-7 text-left">Nome</th> | |
86 | - <th class="col-md-4 text-center">Nota</th> | |
87 | - <th class="col-md-0"></th> | |
88 | - </tr> | |
89 | - </thead> | |
90 | - <tbody> | |
91 | - <%! | |
92 | - from datetime import datetime | |
93 | - %> | |
94 | - % for r in results: | |
95 | - <tr class="default"> | |
96 | - <td class="text-center"> | |
97 | - % if loop.index == 0: | |
98 | - <h4> | |
99 | - <!-- <span class="label label-primary"> --> | |
100 | - 1º | |
101 | - <!-- </span> --> | |
102 | - </h4> | |
103 | - % else: | |
104 | - <!-- <span class="label label-primary"> --> | |
105 | - ${loop.index+1} | |
106 | - <!-- </span> --> | |
107 | - % endif | |
108 | - </td> | |
109 | - <!-- <td>${r[0]}</td> --> <!-- numero --> | |
110 | - <td> | |
111 | - % if loop.index == 0: | |
112 | - <h4 class="text-uppercase"><img src="/crown.jpg" /> ${r[1]}</h4> | |
113 | - % else: | |
114 | - ${r[1]} | |
115 | - % endif | |
116 | - </td> <!-- nome --> | |
117 | - <td> <!-- nota --> | |
118 | - <div class="progress"> | |
119 | - % if r[2] < 10: | |
120 | - <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="${'{0}'.format(round(r[2]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * r[2]))}%;"> | |
121 | - % elif r[2] < 15: | |
122 | - <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="${'{0}'.format(round(r[2]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * r[2]))}%;"> | |
123 | - % else: | |
124 | - <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="${'{0}'.format(round(r[2]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * r[2]))}%;"> | |
125 | - % endif | |
126 | - ${'{:.1f}'.format(r[2])} | |
127 | - </div> | |
128 | - </div> | |
129 | - </td> | |
130 | - <td class="text-right"> | |
131 | - <% | |
132 | - dt = datetime.now() - datetime.strptime(r[3], '%Y-%m-%d %H:%M:%S.%f') | |
133 | - %> | |
134 | - <small> | |
135 | - % if dt.days > 0: | |
136 | - ${dt.days}d | |
137 | - % elif dt.seconds >= 3600: | |
138 | - ${dt.seconds // 3600}h | |
139 | - % elif dt.seconds >= 60: | |
140 | - ${dt.seconds // 60}m | |
141 | - % else: | |
142 | - ${dt.seconds}s | |
143 | - % endif | |
144 | - | |
145 | - </small> | |
146 | - </td> | |
147 | - </tr> | |
148 | - % endfor | |
149 | - </tbody> | |
150 | - </table> | |
151 | - % endif | |
152 | - </div> <!-- panel --> | |
153 | -</div> <!-- container --> | |
154 | -</body> | |
155 | -</html> |
templates/students.html
... | ... | @@ -1,134 +0,0 @@ |
1 | -<!DOCTYPE html> | |
2 | -<html> | |
3 | -<head> | |
4 | - <meta charset="UTF-8"> | |
5 | - <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
6 | - <meta name="viewport" content="width=device-width, initial-scale=1"> | |
7 | - <title> List of students </title> | |
8 | - <link rel="icon" href="favicon.ico"> | |
9 | - | |
10 | - <!-- Bootstrap --> | |
11 | - <link rel="stylesheet" href="/css/bootstrap.min.css"> | |
12 | - <link rel="stylesheet" href="/css/bootstrap-theme.min.css"> <!-- optional --> | |
13 | - | |
14 | - <script src="/js/jquery.min.js"></script> | |
15 | - <script src="/js/bootstrap.min.js"></script> | |
16 | - | |
17 | - <style> | |
18 | - /* Fixes navigation panel overlaying content */ | |
19 | - body { | |
20 | - padding-top: 80px; | |
21 | - background: #aaa; | |
22 | - } | |
23 | - .drop-shadow { | |
24 | - -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .5); | |
25 | - box-shadow: 0px 2px 10px 3px rgba(0, 0, 0, .2); | |
26 | - border-radius:5px; | |
27 | - } | |
28 | - </style> | |
29 | - </head> | |
30 | - <!-- ===================================================================== --> | |
31 | -<body> | |
32 | - | |
33 | -<div class="container"> | |
34 | - <div class="panel panel-default drop-shadow"> | |
35 | - <div class="panel-heading"> | |
36 | - ${len(tags['finished'])} Terminado(s)</span> | |
37 | - </div> | |
38 | - <div class="panel-body"> | |
39 | - <table class="table"> | |
40 | - <thead> | |
41 | - <tr> | |
42 | - <th>Número</th> | |
43 | - <th>Nome</th> | |
44 | - <th>Login</th> | |
45 | - <th>Logout</th> | |
46 | - <th>Nota</th> | |
47 | - </tr> | |
48 | - </thead> | |
49 | - <tbody> | |
50 | - % for r in grades: | |
51 | - <tr> | |
52 | - % if r[0] in tags['finished']: | |
53 | - <td>${r[0]}</td> <!-- numero --> | |
54 | - <td>${r[1]}</td> <!-- nome --> | |
55 | - <td>${r[3][:19]}</td> | |
56 | - <td>${r[4][:19]}</td> | |
57 | - <td>${r[2]}</td> | |
58 | - | |
59 | - % endif | |
60 | - </tr> | |
61 | - % endfor | |
62 | - </tbody> | |
63 | - </table> | |
64 | - </div> | |
65 | - </div> | |
66 | - | |
67 | - <div class="panel panel-success drop-shadow"> | |
68 | - <div class="panel-heading"> | |
69 | - ${len(tags['online'])} Activo(s)</span> | |
70 | - </div> | |
71 | - <div class="panel-body"> | |
72 | - <table class="table"> | |
73 | - <thead> | |
74 | - <tr> | |
75 | - <th>Número</th> | |
76 | - <th>Nome</th> | |
77 | -<!-- <th>Login</th> --> | |
78 | - </tr> | |
79 | - </thead> | |
80 | - <tbody> | |
81 | - % for r in students: | |
82 | - <tr> | |
83 | - % if r[0] in tags['online']: | |
84 | - <td>${r[0]}</td> <!-- numero --> | |
85 | - <td>${r[1]}</td> <!-- nome --> | |
86 | - % endif | |
87 | - </tr> | |
88 | - % endfor | |
89 | - </tbody> | |
90 | - </table> | |
91 | - </div> | |
92 | - </div> | |
93 | - | |
94 | - | |
95 | - <div class="panel panel-danger drop-shadow"> | |
96 | - <div class="panel-heading"> | |
97 | - ${len(students)-len(tags['online'])} Inactivo(s)</span> | |
98 | - </div> | |
99 | - <div class="panel-body"> | |
100 | - | |
101 | - <table class="table"> | |
102 | - <thead> | |
103 | - <tr> | |
104 | - <th>Número</th> | |
105 | - <th>Nome</th> | |
106 | - <th>Password</th> | |
107 | - </tr> | |
108 | - </thead> | |
109 | - <tbody> | |
110 | - % for r in students: | |
111 | - <tr> | |
112 | - % if r[0] not in tags['online']: | |
113 | - <td>${r[0]}</td> <!-- numero --> | |
114 | - <td>${r[1]}</td> <!-- nome --> | |
115 | - <td class="col-sm-3"> | |
116 | - <form action="/students/" method="post" id="${r[0]}"> | |
117 | - <div class="input-group"> | |
118 | - <input type="password" class="form-control" placeholder="${r[2][:8]}" name="${r[0]}"> | |
119 | - <span class="input-group-btn"> | |
120 | - <button form="${r[0]}" type="submit" value="submit" class="btn btn-danger">reset</button> | |
121 | - </span> | |
122 | - </div><!-- /input-group --> | |
123 | - </form> | |
124 | - </td> <!-- password --> | |
125 | - % endif | |
126 | - </tr> | |
127 | - % endfor | |
128 | - </tbody> | |
129 | - </table> | |
130 | - </div> | |
131 | - </div> | |
132 | -</div> <!-- container --> | |
133 | -</body> | |
134 | -</html> |
templates/test.html
... | ... | @@ -2,9 +2,9 @@ |
2 | 2 | <html> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8"> |
5 | - <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
6 | - <meta name="viewport" content="width=device-width, initial-scale=1"> | |
7 | - <title> Teste </title> | |
5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
6 | + <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
7 | + <title>Teste</title> | |
8 | 8 | <link rel="icon" href="/static/favicon.ico"> |
9 | 9 | |
10 | 10 | <!-- MathJax --> | ... | ... |