Przeglądaj źródła

Small CSS modification for seum counters

Denis Merigoux 8 lat temu
rodzic
commit
30f2e2e91e

+ 3 - 1
counter/templates/baseTemplate.html

@@ -20,8 +20,10 @@
20 20
 		}
21 21
 
22 22
 		.seum-counter {
23
-			height: 75px;
23
+			height: 100px;
24 24
 			overflow: auto;
25
+			display: flex;
26
+			align-items: center;
25 27
 		}
26 28
 
27 29
 		.primary-counter {

+ 2 - 0
counter/templates/counterTemplate.html

@@ -43,6 +43,7 @@
43 43
             </form>
44 44
         </div>
45 45
         <div class="seum-counter panel-body" style="height:125px" id="container{{counter.id}}">
46
+         <div style="width:100%">
46 47
           {% if counter.lastReset.noSeum %}
47 48
             <strong>{% trans "No seum yet" %}.</strong><br />
48 49
           {% else %}
@@ -73,6 +74,7 @@
73 74
               <button type="submit" class="btn btn-default btn-success">{% trans "Throw the seum" %}</button>
74 75
             </div>
75 76
           </form>
77
+         </div>
76 78
         </div>
77 79
       </div>
78 80
     </div>

+ 37 - 58
counter/templates/homeTemplate.html

@@ -1,11 +1,4 @@
1
-{% extends 'baseTemplate.html' %}
2
-
3
-{% load i18n %}
4
-{% load hashtags %}
5
-
6
-{% block title %}{% trans "Counters" %}{% endblock %}
7
-
8
-{% block content %}
1
+{% extends 'baseTemplate.html' %} {% load i18n %} {% load hashtags %} {% block title %}{% trans "Counters" %}{% endblock %} {% block content %}
9 2
 <div class="text-center">
10 3
 	<h1><a class="counter-link" href="{% url 'home' %}">SeumBook™</a></h1>
11 4
 </div>
@@ -29,16 +22,14 @@
29 22
 				<div class="primary-counter panel-body" id="container{{myCounter.id}}">
30 23
 					<div style="width:100%;">
31 24
 						{% if myCounter.lastReset.noSeum %}
32
-							<strong>{% trans "No seum yet" %}.</strong><br />
33
-						{% else %}
34
-							<strong>
25
+						<strong>{% trans "No seum yet" %}.</strong><br /> {% else %}
26
+						<strong>
35 27
 								{% if myCounter.lastReset.selfSeum %}
36 28
 									{% trans "I got the seum" %} {{ myCounter.lastReset.formatted_delta }}.
37 29
 								{% else %}
38 30
 									{{ myCounter.lastReset.who.trigramme }} {% trans "threw me the seum" %} {{ myCounter.lastReset.formatted_delta }}.
39 31
 								{% endif %}
40
-							</strong><br />
41
-						{% endif %}
32
+							</strong><br /> {% endif %}
42 33
 						<p>{{ myCounter.lastReset.reason | hashtag }}</p>
43 34
 						<div class="text-center" id="button{{myCounter.id}}">
44 35
 							<button class="btn btn-default btn-danger" type="button" onclick="revealSeumForm({{myCounter.id}})">
@@ -130,17 +121,17 @@
130 121
 					</form>
131 122
 				</div>
132 123
 				<div class="seum-counter panel-body">
133
-					{% if counter.lastReset.noSeum %}
134
-						<strong>{% trans "Has not got the seum yet" %}</strong><br />
135
-					{% else %}
124
+					<div style="width:100%">
125
+						{% if counter.lastReset.noSeum %}
126
+						<strong>{% trans "Has not got the seum yet" %}</strong><br /> {% else %}
136 127
 						<strong>
137 128
 							{% if counter.lastReset.selfSeum %}
138 129
 								{% trans "Got the seum" %} {{ counter.lastReset.formatted_delta }}.
139 130
 							{% else %}{% blocktrans with trigram=counter.lastReset.who.trigramme time_ago=counter.lastReset.formatted_delta %}Seum thrown by {{ trigram }} {{ time_ago }}.{% endblocktrans %}
140 131
 							{% endif %}
141
-						</strong><br />
142
-					{% endif %}
143
-					<p>{{ counter.lastReset.reason | hashtag }}</p>
132
+						</strong><br /> {% endif %}
133
+						<p>{{ counter.lastReset.reason | hashtag }}</p>
134
+					</div>
144 135
 				</div>
145 136
 			</div>
146 137
 		</div>
@@ -155,12 +146,10 @@
155 146
 				</div>
156 147
 				<div class="panel-body timeline graphs">
157 148
 					{% if noTimeline %}
158
-						<div class="text-center text-muted">
159
-							<p>{% trans "No seum in the last past 24h..." %}</p>
160
-						</div>
161
-					{% else %}
162
-						{{ line_chart.as_html }}
163
-					{% endif %}
149
+					<div class="text-center text-muted">
150
+						<p>{% trans "No seum in the last past 24h..." %}</p>
151
+					</div>
152
+					{% else %} {{ line_chart.as_html }} {% endif %}
164 153
 				</div>
165 154
 			</div>
166 155
 		</div>
@@ -173,12 +162,10 @@
173 162
 				</div>
174 163
 				<div class="panel-body graphs">
175 164
 					{% if noBestSeum %}
176
-						<div class="text-center text-muted">
177
-							<p>{% trans "Nobody got the seum..." %}</p>
178
-						</div>
179
-					{% else %}
180
-						{{ best_chart.as_html }}
181
-					{% endif %}
165
+					<div class="text-center text-muted">
166
+						<p>{% trans "Nobody got the seum..." %}</p>
167
+					</div>
168
+					{% else %} {{ best_chart.as_html }} {% endif %}
182 169
 				</div>
183 170
 			</div>
184 171
 		</div>
@@ -191,12 +178,10 @@
191 178
 				</div>
192 179
 				<div class="panel-body graphs">
193 180
 					{% if noBestLikees %}
194
-						<div class="text-center text-muted">
195
-							<p>{% trans "Nobody liked..." %}</p>
196
-						</div>
197
-					{% else %}
198
-						{{ likees_chart.as_html }}
199
-					{% endif %}
181
+					<div class="text-center text-muted">
182
+						<p>{% trans "Nobody liked..." %}</p>
183
+					</div>
184
+					{% else %} {{ likees_chart.as_html }} {% endif %}
200 185
 				</div>
201 186
 			</div>
202 187
 		</div>
@@ -209,12 +194,10 @@
209 194
 				</div>
210 195
 				<div class="panel-body graphs">
211 196
 					{% if noBestHashtags %}
212
-						<div class="text-center text-muted">
213
-							<p>{% trans "Nobody used any hashtag..." %}</p>
214
-						</div>
215
-					{% else %}
216
-						{{ hashtags_chart.as_html }}
217
-					{% endif %}
197
+					<div class="text-center text-muted">
198
+						<p>{% trans "Nobody used any hashtag..." %}</p>
199
+					</div>
200
+					{% else %} {{ hashtags_chart.as_html }} {% endif %}
218 201
 				</div>
219 202
 			</div>
220 203
 		</div>
@@ -227,12 +210,10 @@
227 210
 				</div>
228 211
 				<div class="panel-body graphs">
229 212
 					{% if noBestLikers %}
230
-						<div class="text-center text-muted">
231
-							<p>{% trans "Nobody liked..." %}</p>
232
-						</div>
233
-					{% else %}
234
-						{{ likers_chart.as_html }}
235
-					{% endif %}
213
+					<div class="text-center text-muted">
214
+						<p>{% trans "Nobody liked..." %}</p>
215
+					</div>
216
+					{% else %} {{ likers_chart.as_html }} {% endif %}
236 217
 				</div>
237 218
 			</div>
238 219
 		</div>
@@ -245,12 +226,10 @@
245 226
 				</div>
246 227
 				<div class="panel-body graphs">
247 228
 					{% if noSeumActivity %}
248
-						<div class="text-center text-muted">
249
-							<p>{% trans "Nobody got the seum..." %}</p>
250
-						</div>
251
-					{% else %}
252
-						{{ activity_chart.as_html }}
253
-					{% endif %}
229
+					<div class="text-center text-muted">
230
+						<p>{% trans "Nobody got the seum..." %}</p>
231
+					</div>
232
+					{% else %} {{ activity_chart.as_html }} {% endif %}
254 233
 				</div>
255 234
 			</div>
256 235
 		</div>
@@ -276,8 +255,8 @@
276 255
 </div>
277 256
 
278 257
 <script>
279
-$(function () {
280
-  $('[data-toggle="tooltip"]').tooltip()
281
-})
258
+	$(function() {
259
+		$('[data-toggle="tooltip"]').tooltip()
260
+	})
282 261
 </script>
283 262
 {% endblock %}

+ 0 - 1
deploy.sh

@@ -1,4 +1,3 @@
1 1
 git pull
2
-source env/bin/activate
3 2
 python manage.py compilemessages > /dev/null
4 3
 sudo service apache2 reload