-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathindex.html
93 lines (89 loc) · 4.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>MMPI-2 for all</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container" id="app">
<header class="header clearfix">
<nav class="nav nav-pills float-right">
<router-link class="nav-link" to="/">About</router-link>
<router-link class="nav-link" to="/test">Test</router-link>
<router-link class="nav-link" to="/report">Report</router-link>
</nav>
<h3 class="text-muted">MMPI-2 for all</h3>
</header>
<router-view></router-view>
<footer class="footer">
<p>Unlicensed. Dedicated to Liberty. <a href="https://github.com/nucular/mmpi-2">Fork me on GitHub.</a></p>
</footer>
</div>
<script type="text/x-template" id="about-view-template">
<div class="jumbotron">
<h1 class="display-3">Take the MMPI-2</h1>
<p class="lead">
The Minnesota Multiphasic Personality Inventory (MMPI) is a standardized psychometric test of adult personality and psychopathology.
</p>
<p><router-link class="btn btn-lg btn-success" to="/test/1" role="button">Start</router-link></p>
</div>
</script>
<script type="text/x-template" id="test-view-template">
<div class="jumbotron">
<div class="progress">
<div class="progress-bar" role="progressbar"
:aria-valuenow="currentQuestion"
aria-valuemin="1" :aria-valuemax="questions.length"
style="min-width: 2em;"
:style="{width: (currentQuestion / questions.length) * 100 + '%'}">
{{Math.floor((currentQuestion / questions.length) * 100)}}%
</div>
</div>
<h1 class="display-4">Question {{currentQuestion + 1}}</h1>
<h2>
{{questions[currentQuestion]}}
</h2>
<div class="btn-group">
<button type="button" class="btn btn-success" on:click="answer(true);">True</button>
<button type="button" class="btn" on:click="answer(null);">Unsure</button>
<button type="button" class="btn btn-danger" on:click="answer(false);">False</button>
</div>
<nav aria-label="Question navigation">
<ul class="pagination pagination-lg flex justify-content-center">
<li class="page-item" :class="{disabled: currentQuestion <= 0}">
<router-link class="page-link" :to="'/test/' + currentQuestion" aria-label="Previous">
<span aria-hidden="true">«</span>
</router-link>
</li>
<li v-for="n in paginationEnd - paginationStart" class="page-item" :class="{active: n + paginationStart == currentQuestion + 1}">
<router-link class="page-link" :to="'/test/' + (n + paginationStart)">{{n + paginationStart}}</router-link>
</li>
<li class="page-item" :class="{disabled: currentQuestion == questions.length - 1}">
<router-link class="page-link" :to="'/test/' + (currentQuestion + 2)" aria-label="Next">
<span aria-hidden="true">»</span>
</router-link>
</li>
</ul>
</nav>
</div>
</script>
<script type="text/x-template" id="report-view-template">
<div>
<line-chart :chart-data="charts[0]"></line-chart>
</div>
</script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
<script src="https://unpkg.com/vue-chartjs/dist/vue-chartjs.min.js"></script>
<script src="components/linechart.js"></script>
<script src="views/about.js"></script>
<script src="views/test.js"></script>
<script src="views/report.js"></script>
<script src="app.js"></script>
</body>
</html>