forked from episphere/quest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
191 lines (182 loc) · 10.5 KB
/
index.html
File metadata and controls
191 lines (182 loc) · 10.5 KB
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/fontawesome.min.css" integrity="sha384-BY+fdrpOd3gfeRvTSMT+VUZmA728cfF9Z2G42xpaRkUGu2i3DyzpTURDo5A6CaLK" crossorigin="anonymous">
<!-- Custom CSS -->
<link id="pagestyle" href="Default.css" rel="stylesheet" type="text/css">
<link id="pagelogic" href="Default.css" rel="stylesheet" type="text/css">
<link href="Quest.css" rel="stylesheet" type="text/css">
<title>Quest</title>
</head>
<body class="w-100">
<nav id="questNavbar" class="navbar navbar-expand-sm quest-bg-gradient" data-bs-theme="dark">
<div class="container-fluid">
<a class="navbar-brand text-baskerville" href="#">Quest</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#questNavContent" aria-controls="questNavContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="questNavContent">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-bs-toggle="offcanvas" href="#settings"
aria-controls="settings">Settings</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/episphere/quest-dev" target="_blank"
rel="noopener noreferrer">Source</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/episphere/quest/wiki" target="_blank"
rel="noopener noreferrer">Wiki</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/episphere/quest-dev/issues" target="_blank"
rel="noopener noreferrer">Issues</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://gitter.im/episphere/quest" target="_blank"
rel="noopener noreferrer">Talk to us</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="offcanvas" href="#cache" role="button"
id="viewCurrentResponses" aria-controls="cache">View Current Responses</a>
</li>
<li class="nav-item">
<a class="nav-link" id="Reference" href="https://doi.org/10.1186/s12911-023-02338-6"
target="_blank" rel="noopener noreferrer">Paper</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="offcanvas" href="#helpOC" role="button"
aria-controls="helpOC">Help</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid" id="tool">
<div class="offcanvas offcanvas-start" tabindex="-1" id="settings" aria-labelledby="settingLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="settingLabel">Settings</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="d-flex flex-wrap">
<form class="form border flex-grow-1 p-1 d-flex flex-column">
<h3>Questionnaire Options</h3>
<div>
<label for="url" class="form-label">Module URL</label>
<div class="input-group mb-3">
<input id="url" class="form-control" aria-label="url">
<button type="button" class="btn btn-outline-secondary" id="loadURLBtn" aria-label="Load URL">Load</button>
</div>
<label for="tb" class="form-label">Save Module</label>
<div class="input-group mb-3">
<input id="tb" class="form-control" aria-label="File Name" style="margin-top: 10px;">
<button type="button" class="btn">.txt</button>
<button type="button" class="btn btn-outline-secondary" id="saveBtn" aria-label="Save">Save</button>
</div>
</div>
<div>
<label class="form-check form-switch mt-2">
Use Styling
<input class="form-check-input" type="checkbox" role="switch" id="styling" data-sheet-on="Style1.css" data-sheet-off="Default.css">
</label>
</div>
<div>
<label class="form-check form-switch mt-2">
Activate Logic
<input class="form-check-input" type="checkbox" role="switch" id="logic" data-sheet-on="ActiveLogic.css" data-sheet-off="Default.css">
</label>
</div>
<div>
<label class="form-check form-switch mt-2">
Hide Markup
<input class="form-check-input" type="checkbox" role="switch" id="hide-markup">
</label>
</div>
<div>
<label for="langSelect">Language:</label>
<div class="input-group mb-3">
<select id="langSelect" class="form-select" aria-label="quest-locale">
<option value="en" selected>en-US</option>
<option value="es">en-MX</option>
</select>
</div>
</div>
</form>
<div class="border flex-grow-1 p-1">
<h3>Previous Results</h3>
<textarea id="jsonInput" aria-label="json input" style="width: 100%; height:150px"></textarea>
<div class="col" style="margin-top: 10px;">
<button type="button" id="updater" class="btn btn-outline-secondary">Add JSON to
Memory</button>
<button type="button" id="clearMem" class="btn btn-outline-danger">Clear Memory</button>
<div id="loadDisplay"></div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 col-md-6" id="markup">
<div class="d-flex flex-wrap justify-content-between align-items-end">
<span class="me-1 h4">Markup</span>
<div class="d-flex align-items-center">
<span class="me-1 h5">(<a
href="https://raw.githubusercontent.com/episphere/quest/main/questionnaires/demo.txt"
id="demo">Demo</a>)</span>
<label for="fontSpan" id="fontSpan" class="me-1 h5">Change Font Size</label>
<button type="button" id="increaseSizeButton" aria-label="Increase Font Size"
class="btn btn-sm btn-outline-primary me-1">+</button>
<button type="button" id="decreaseSizeButton" aria-label="Decrease Font Size"
class="btn btn-sm btn-outline-primary">-</button>
</div>
</div>
<textarea class="form-control" id="markupTextArea" placeholder="type, paste, or upload questionnaire markup"></textarea>
</div>
<div class="col-12 col-md-6">
<h4 id="renderText" style="color: navy;">Rendering</h4>
<div id="rendering"></div>
</div>
</div>
</div>
<div id="helpOC" class="offcanvas offcanvas-end" tabindex="-1" aria-labelledby="helpOCLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="helpOCLabel">Help</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="card">
<div class="card-body">
<h5 class="card-title">How do I load a module from a URL?</h5>
<p class="card-text">
The questionnaire module load/save features were hidden to save space on the screen.
Click "settings" in the menu and type the URL in the <i>Module URL</i> box.
</p>
</div>
</div>
</div>
</div>
<div id="cache" class="offcanvas offcanvas-end" tabindex="-1" aria-labelledby="cacheLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="cacheLabel">Current Responses</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<table class="table table-striped" id="currentResponsesTable"></table>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.10.0/localforage.min.js" defer></script>
<script src="main.js" type="module"></script>
<script src="buildGrid.js" type="module"></script>
<script src="quest.js" type="module"></script>
</body>
</html>