-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
145 lines (128 loc) · 6.17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!doctype html>
<html lang="de-DE" ng-app="wahlofantApp">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="robots" content="noindex,nofollow">
<title>WahlOfant</title>
<meta name="description" content="">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link href="stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"/>
<link href="stylesheets/print.css" media="print" rel="stylesheet" type="text/css"/>
<!--[if IE]>
<link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css"/>
<![endif]-->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
your browser</a> to improve your experience.</p>
<![endif]-->
<div ng-controller="PollController">
<div class="logo">
</div>
<div class="loading-container {{ state == 'loaded' ? 'animate' : '' }}">
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i><br><br>
... Laden ...
</div>
<div ng-class="{ 'active' : state == 'loaded' && currentQuestion < 0, 'inactive' : currentQuestion >= 0, 'container' : true }">
<h2>Bitte wähle mindestens fünf Themengebiete, die dich interessieren</h2>
<div class="content">
<ul class="choice-list multiple">
<li ng-repeat="topic in topics" ng-class="{ 'active' : isTopicSelected(topic.name) }"
ng-click="toggleTopic(topic.name)">
{{ topic.name }}<br>
<small>{{ topic.numberOfQuestions }} Fragen</small>
</li>
</ul>
</div>
<div class="container-footer">
<span class="footer-info">
Geschätzte Dauer: {{ calculateMinutes() }} Minuten
</span>
<button ng-show="selectedTopics().length >= 1" ng-click="calculateQuestionList();">Weiter</button>
</div>
</div>
<div ng-repeat="question in questionList"
ng-class="{ 'active' : state == 'loaded' && currentQuestion == $index, 'inactive' : currentQuestion > $index, 'container' : true }">
<h2>{{ question.thesis }}</h2>
<div class="content">
<ul class="choice-list">
<li ng-click="pro(question)" ng-class="{ 'active' : currentAttitude == 'yes' }">Dafür</li>
<li ng-click="con(question)" ng-class="{ 'active' : currentAttitude == 'no' }">Dagegen</li>
<li ng-click="nvm(question)">Mir egal</li>
</ul>
<div class="detail-list" ng-show="questionMode == 'justification'">
<small>Bitte wähle mindestens eine Begründung aus, mit der du einverstanden bist.</small>
<div ng-repeat="answer in question.answers | filter:filterResult"
ng-class="{ 'active' : isAnswerActive(answer) }" ng-click="toggleAnswer(answer)">
{{ answer.reason }}
</div>
</div>
</div>
<div class="container-footer">
<span class="footer-info">
Frage {{ $index+1 }} von {{ questionList.length }}
</span>
<button ng-click="nextQuestion();">Weiter »</button>
<button ng-click="lastQuestion();">« Zurück</button>
</div>
</div>
<div ng-class="{ 'active' : state == 'loaded' && currentQuestion >= questionList.length, 'container' : true }">
<h2>Deine Auswertung</h2>
<div class="container-footer" ng-if="currentQuestion >= questionList.length">
<div class="score-list">
<div class="score-row">
<span class="cell you">DU</span>
<span class="cell total">
Gesamt
</span>
<span class="cell {{ getAttitude(q) }}" ng-repeat="q in questionList"></span>
</div>
<div class="score-row" ng-repeat="party in parties | orderBy: orderTotalScore : true">
<span title="{{party}}" class="cell party" ng-if="hasPartyImage(party)"
style="background-image: url(img/{{ getPartyImage(party) }});"></span>
<span title="{{party}}" class="cell party" ng-if="!hasPartyImage(party)"><small>{{party}}</small></span>
<span class="cell total">
{{ getTotalScore(scores[party]) }}
</span>
<span class="cell {{ getPartyAttitude(q, party) }}" ng-repeat="q in questionList">
<span class="cell-score">{{ getScoreForQuestion(q, scores[party]) }}</span>
</span>
</div>
</div>
<button ng-click="lastQuestion();">« Zurück</button>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="bower_components/trianglify/dist/trianglify.min.js"></script>
<script src="js/data/europa/categories.js"></script>
<script src="js/data/europa/comment.js"></script>
<script src="js/data/europa/opinion.js"></script>
<script src="js/data/europa/overview.js"></script>
<script src="js/data/europa/party.js"></script>
<script src="js/data/europa/statement.js"></script>
<script src="js/main.js"></script>
<script>
var pattern = Trianglify({
height: window.innerHeight,
width: window.innerWidth,
cell_size: 40
});
document.body.appendChild(pattern.canvas());
// hide address bar for mobile devices
window.addEventListener("load",function() {
// Set a timeout...
setTimeout(function(){
// Hide the address bar!
window.scrollTo(0, 1);
}, 0);
});
</script>
</body>
</html>