File tree Expand file tree Collapse file tree 5 files changed +16
-10
lines changed Expand file tree Collapse file tree 5 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,17 @@ th, td {
67
67
# myProgress {
68
68
width : 100% ;
69
69
background-color : # ddd ;
70
- border-radius : 3 px ;
70
+ border-radius : 5 px ;
71
71
}
72
72
73
73
# myBar {
74
74
width : 0% ;
75
75
height : 30px ;
76
76
background-color : # 4f8ace ;
77
+ color : # ffffff ;
77
78
text-align : center;
78
79
line-height : 30px ;
79
- border-radius : 3 px ;
80
+ border-radius : 5 px ;
80
81
}
81
82
82
83
# player_name {
Original file line number Diff line number Diff line change @@ -5,17 +5,17 @@ function start() {
5
5
var elem = document . getElementById ( "myBar" ) ;
6
6
var width = 0 ;
7
7
var time_from_start = 0 ;
8
- var id = setInterval ( frame , 1000 ) ;
8
+ var id = setInterval ( frame , 10 ) ;
9
9
function frame ( ) {
10
10
if ( width >= 100 ) {
11
11
clearInterval ( id ) ;
12
12
i = 0 ;
13
13
} else {
14
- width += 100 / 45 ;
15
- time_from_start ++ ;
14
+ width += 1 / 45 ;
15
+ time_from_start = 45 * width / 100 ;
16
16
elem . style . width = width + "%" ;
17
- elem . innerHTML = time_from_start ;
18
- elem . style . backgroundColor = "rgb(" + time_from_start * 5 + ", 138, 223 )" ;
17
+ elem . innerHTML = time_from_start . toFixed ( 2 ) ;
18
+ elem . style . backgroundColor = "rgb(" + time_from_start * 6 + ", 50, 50 )" ;
19
19
}
20
20
}
21
21
}
Original file line number Diff line number Diff line change 3
3
{% block sub_table %}
4
4
< tr >
5
5
< td class ="role ">
6
- < h1 > {{ player_name }}</ h1 >
6
+ < h1 > {{ player[2] }}</ h1 >
7
7
</ td >
8
8
</ tr >
9
9
< tr >
10
10
< td >
11
+ {% if player[3] == "alive" %}
11
12
< img class ="avatar " src ="static/images/Warns/play.png " onclick ="start() ">
12
13
< div id ="myProgress ">
13
14
< div id ="myBar "> 0</ div >
14
15
</ div >
16
+ {% endif %}
17
+ {% if player[3] == "dead" %}You are Killed!{% endif %}
18
+ {% if player[3] == "banned" %}You are Banned from speaking this turn!{% endif %}
15
19
</ td >
16
20
</ tr >
17
21
{% endblock %}
Original file line number Diff line number Diff line change 4
4
< link rel = "icon " href ="static/images/roles/{{ image_name }}.png " type = "image/x-icon ">
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
6
< link rel ="stylesheet " href ="{{ url_for('static', filename='css/style.css') }} ">
7
- < script src ="static/js/main.js " type ="text/javascript "> </ script >
7
+ < script type ="text/javascript " src ="static/js/jquery-1.11.1.min.js "> </ script >
8
+ < script type ="text/javascript " src ="static/js/shieldui-all.min.js "> </ script >
9
+ < script type ="text/javascript " src ="static/js/main.js "> </ script >
8
10
</ head >
9
11
< table style ="border-collapse: collapse ">
10
12
{% block sub_table %}{% endblock %}
Original file line number Diff line number Diff line change @@ -24,5 +24,4 @@ <h2 id="fa">{{ role_name_fa }}</h2>
24
24
{% endblock %}
25
25
26
26
{% block id_sec %}
27
- < hr >
28
27
{% endblock %}
You can’t perform that action at this time.
0 commit comments