Skip to content

Commit e699ed7

Browse files
committed
change : minor changes in UI.
1 parent c57dd4c commit e699ed7

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

static/css/style.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,17 @@ th, td {
6767
#myProgress {
6868
width: 100%;
6969
background-color: #ddd;
70-
border-radius: 3px;
70+
border-radius: 5px;
7171
}
7272

7373
#myBar {
7474
width: 0%;
7575
height: 30px;
7676
background-color: #4f8ace;
77+
color:#ffffff;
7778
text-align: center;
7879
line-height: 30px;
79-
border-radius: 3px;
80+
border-radius: 5px;
8081
}
8182

8283
#player_name {

static/js/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ function start() {
55
var elem = document.getElementById("myBar");
66
var width = 0;
77
var time_from_start = 0;
8-
var id = setInterval(frame, 1000);
8+
var id = setInterval(frame, 10);
99
function frame() {
1010
if (width >= 100) {
1111
clearInterval(id);
1212
i = 0;
1313
} else {
14-
width += 100 / 45;
15-
time_from_start ++;
14+
width += 1 / 45;
15+
time_from_start = 45 * width / 100;
1616
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)";
1919
}
2020
}
2121
}

templates/Player.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
{% block sub_table %}
44
<tr>
55
<td class="role">
6-
<h1>{{ player_name }}</h1>
6+
<h1>{{ player[2] }}</h1>
77
</td>
88
</tr>
99
<tr>
1010
<td>
11+
{% if player[3] == "alive" %}
1112
<img class="avatar" src="static/images/Warns/play.png" onclick="start()">
1213
<div id="myProgress">
1314
<div id="myBar">0</div>
1415
</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 %}
1519
</td>
1620
</tr>
1721
{% endblock %}

templates/base_action.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
<link rel = "icon" href="static/images/roles/{{ image_name }}.png" type = "image/x-icon">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<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>
810
</head>
911
<table style="border-collapse: collapse">
1012
{% block sub_table %}{% endblock %}

templates/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ <h2 id="fa">{{ role_name_fa }}</h2>
2424
{% endblock %}
2525

2626
{% block id_sec %}
27-
<hr>
2827
{% endblock %}

0 commit comments

Comments
 (0)