Skip to content

Commit a3330ec

Browse files
author
Christoph Schreiber
committed
result sorting, style improvements
1 parent 1530c59 commit a3330ec

File tree

4 files changed

+43
-14
lines changed

4 files changed

+43
-14
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <h2>Deine Auswertung</h2>
9595
</span>
9696
<span class="cell {{ getAttitude(q) }}" ng-repeat="q in questionList"></span>
9797
</div>
98-
<div class="score-row" ng-repeat="party in parties">
98+
<div class="score-row" ng-repeat="party in parties | orderBy: orderTotalScore : true">
9999
<span class="cell party"
100100
style="background-image: url(img/{{ getPartyImage(party) }});"></span>
101101
<span class="cell total">

js/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ app.controller('PollController', function($http, $scope) {
250250
return scores;
251251
};
252252

253+
$scope.orderTotalScore = function(partyName) {
254+
return $scope.getTotalScore($scope.scores[partyName])
255+
};
256+
253257
function unselectByQuestionAndResult(questionId, result) {
254258
var removedEntry = true;
255259
while(removedEntry) {

sass/screen.scss

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ h2 {
154154
}
155155

156156
&.active {
157-
background-color: #39cc39;
157+
background-color: #39cc39 !important;
158158
}
159159
small {
160160
font-size: 0.6rem;
@@ -315,7 +315,7 @@ button {
315315

316316
@media (max-width:640px) {
317317
h2 {
318-
font-size: 1.3rem;
318+
font-size: 1.2rem;
319319
margin-bottom: .7rem;
320320
}
321321
ul.choice-list.multiple {
@@ -327,21 +327,20 @@ button {
327327
}
328328
}
329329
.footer-info {
330-
height: 30px;
331-
line-height: 30px;
330+
height: 30px !important;
331+
line-height: 30px !important;
332332
display: block;
333333
float: none;
334334
width: 100%;
335335
font-size: 0.9rem;
336336
}
337337

338338
.logo {
339+
top: 0px;
339340
height: 45px;
340341
background-position: center center;
341342
}
342343

343-
344-
345344
.container {
346345
.content {
347346
max-height: 40vh;
@@ -353,6 +352,17 @@ button {
353352
}
354353

355354
.detail-list {
355+
small {
356+
color: #999;
357+
}
356358
margin-top: 6px;
359+
&>div {
360+
margin: 8px 0px;
361+
font-size: 0.9rem;
362+
padding: 10px 0px 10px 34px;
363+
&::before {
364+
font-size: 1.3rem;
365+
}
366+
}
357367
}
358368
}

stylesheets/screen.css

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ h2 {
252252
}
253253
/* line 156, ../sass/screen.scss */
254254
.choice-list li.active {
255-
background-color: #39cc39;
255+
background-color: #39cc39 !important;
256256
}
257257
/* line 159, ../sass/screen.scss */
258258
.choice-list li small {
@@ -431,7 +431,7 @@ button:hover {
431431
@media (max-width: 640px) {
432432
/* line 317, ../sass/screen.scss */
433433
h2 {
434-
font-size: 1.3rem;
434+
font-size: 1.2rem;
435435
margin-bottom: .7rem;
436436
}
437437

@@ -445,8 +445,8 @@ button:hover {
445445

446446
/* line 329, ../sass/screen.scss */
447447
.footer-info {
448-
height: 30px;
449-
line-height: 30px;
448+
height: 30px !important;
449+
line-height: 30px !important;
450450
display: block;
451451
float: none;
452452
width: 100%;
@@ -455,22 +455,37 @@ button:hover {
455455

456456
/* line 338, ../sass/screen.scss */
457457
.logo {
458+
top: 0px;
458459
height: 45px;
459460
background-position: center center;
460461
}
461462

462-
/* line 346, ../sass/screen.scss */
463+
/* line 345, ../sass/screen.scss */
463464
.container .content {
464465
max-height: 40vh;
465466
}
466-
/* line 349, ../sass/screen.scss */
467+
/* line 348, ../sass/screen.scss */
467468
.container .container-footer {
468469
margin-top: 6px;
469470
height: 24px;
470471
}
471472

472-
/* line 355, ../sass/screen.scss */
473+
/* line 354, ../sass/screen.scss */
473474
.detail-list {
474475
margin-top: 6px;
475476
}
477+
/* line 355, ../sass/screen.scss */
478+
.detail-list small {
479+
color: #999;
480+
}
481+
/* line 359, ../sass/screen.scss */
482+
.detail-list > div {
483+
margin: 8px 0px;
484+
font-size: 0.9rem;
485+
padding: 10px 0px 10px 34px;
486+
}
487+
/* line 363, ../sass/screen.scss */
488+
.detail-list > div::before {
489+
font-size: 1.3rem;
490+
}
476491
}

0 commit comments

Comments
 (0)