Skip to content

Commit d735386

Browse files
committed
Make connection status much prettier.
1 parent 48870dc commit d735386

File tree

3 files changed

+17
-23
lines changed

3 files changed

+17
-23
lines changed

barsystem/src/barsystem/gui/static/css/main.css

+4-21
Original file line numberDiff line numberDiff line change
@@ -82,26 +82,9 @@ input[type=number] {
8282
font-weight: bold;
8383
}
8484

85-
#connection {
86-
position: absolute;
87-
top: 0;
88-
left: 0;
89-
z-index: 1001;
85+
.connection-status.ok {
86+
color: green;
9087
}
91-
#connection.ok div {
92-
border-color: green;
93-
background-color: green;
94-
}
95-
#connection.fail div {
96-
border-color: red;
97-
background-color: red;
98-
}
99-
#connection div {
100-
border-width: 1px;
101-
border-style: solid;
102-
border-color: transparent;
103-
border-radius: 10px;
104-
width: 20px;
105-
height: 20px;
106-
background-color: transparent;
88+
.connection-status {
89+
color: red;
10790
}

barsystem/src/barsystem/gui/templates/barsystem/index.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ <h3>Halp how does this work?</h3>
7676
</div>
7777
{% endblock %}
7878

79+
{% block navextra %}
80+
<div class="navbar-left">
81+
<span class="navbar-text"><span id="connection" class="connection-status glyphicon glyphicon-signal"></span></span>
82+
</div>
83+
{% endblock %}
84+
7985
{% block extracontent %}
80-
<div id="connection"><div></div></div>
8186
<form id="messageForm" method="post">
8287
{% csrf_token %}
8388
<input type="hidden" name="message" />

barsystem/src/barsystem/gui/templates/barsystem/products.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,11 @@ <h4 class="modal-title">Help</h4>
208208
</li>
209209
</template>
210210
<!-- end template -->
211-
<div id="connection"><div></div></div>
211+
{% endblock %}
212+
213+
214+
{% block navextra %}
215+
<div class="navbar-left">
216+
<span class="navbar-text"><span id="connection" class="connection-status glyphicon glyphicon-signal"></span></span>
217+
</div>
212218
{% endblock %}

0 commit comments

Comments
 (0)