-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
290 lines (276 loc) · 15.8 KB
/
index.html
File metadata and controls
290 lines (276 loc) · 15.8 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="static/css/popup.css">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/sideModal.css">
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<style type="text/css">
body{
font-size: 20px;
font-family: "Times New Roman", Georgia, Serif;
}
.breadcrumb{
background-color: inherit;
}
.not-button{
padding-bottom: 10px;
border: none;
background: none;
font-size: 21px
}
.button-settings{
border-radius: 86px;
border-style: ridge;
border-color: gray;
}
input{
width: 42%;
}
</style>
</head>
<body>
<!--navbar-->
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<ol class="breadcrumb">
<li class="breadcrumb-item" aria-current="page"><a href="#" data-toggle="modal" data-target="#sideModalLeftBook">Book of Mormon</a></li>
<li class="breadcrumb-item" aria-current="page"><a href="#" data-toggle="modal" data-target="#sideModalLeftChapter">First Nephi</a></li>
<li class="breadcrumb-item" aria-current="page" id="nav_chapter">Chapter</li>
</ol>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" data-toggle="modal" data-target="#settings">Settings</a></li>
<li><a href="#" onclick="logout()">Logout</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<!--Error for settings-->
<div class="alert alert-warning alert-dismissible hide" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Warning!</strong>There was an error while applying your settings.
</div>
<div id="platform-canvas-content" role="main">
<!--Modals-->
<div id="BookOfMormon">
<!--Side Modal-->
<!-- Book Left Modal -->
<div class="modal left fade" id="sideModalLeftBook" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Book</h4>
</div>
<div class="modal-body">
<div v-for="book in books" class= "not-button col-sm-6 col-md-6 col-lg-6 text-center" v-on:click="Active_Chapter = book" ><a v-bind:id="book" href="#" class="not-active" data-toggle="modal" data-target="#sideModalLeftChapter">{{ book }}</a>
</div>
</div>
</div>
<!-- modal-content -->
</div>
<!-- modal-dialog -->
</div>
<!-- modal -->
<!--Left Chapter from Book-->
<div class="modal left fade" id="sideModalLeftChapter" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel2">Chapter Select</h4>
</div>
<div class="modal-body">
<a v-for='chapter in BOM[Active_Chapter]' v-bind:id="chapter" class= "chapter not-button col-sm-6 col-md-6 col-lg-6 text-center not-active" onclick="chapternav()">{{chapter}}</a>
</div>
</div>
<!-- modal-content -->
</div>
<!-- modal-dialog -->
</div>
<!-- modal -->
<!--Settings-->
<div class="modal fade" id="settings" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel2">Settings</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<!--Levels-->
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-center">
<h2>Difficulty Level</h2>
<h4>0 - 100%</h4>
<br>
<input id="difficulty" type="text" name="difficulty" class="text-center">
</div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-center">
<h2>New Words per Chapter</h2>
<br>
<input id="rate" type="text" name="rate" class="text-center">
</div>
</div>
<br><br>
<div class="row">
<!--Language and Account-->
<div id="source" class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-center">
<h2>Source Language</h2>
<br>
<select id="source">
<option value="eng">English</option>
<option value="spa">Spanish</option>
<option value="zho">Mandarin</option>
<option value="msa">Malay</option>
<option value="ces">Czech</option>
</select>
</div>
<!--Language and Account-->
<div id="target" class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-center">
<h2>Target Language</h2>
<br>
<select id="target">
<option value="eng">English</option>
<option value="spa">Spanish</option>
<option value="zho">Mandarin</option>
<option value="msa">Malay</option>
<option value="ces">Czech</option>
</select>
</div>
</div>
<br>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
<button class="btn btn-default" onclick="APIset_preference()"> Apply </button>
</div>
</div>
</div>
</div>
</div>
<!-- modal-content -->
</div>
<!-- modal-dialog -->
</div>
<!-- modal -->
</div>
<!--Chapter-->
<div class="container">
<!--next chapter or previous chapter-->
<nav aria-label="...">
<ul class="pager">
<li class="previous" onclick="previous_chapter()"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span></a></li>
<li class="next" onclick="next_chapter()"><a href="#"><span class="glyphicon glyphicon-chevron-right"></span></a></li>
</ul>
</nav>
<!--Book Title and Introduction-->
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12" style="text-align: center;">
<h1>The First Book of Nephi</h1>
<p class="subtitle" data-aid="128342696" id="subtitle1">His Reign and Ministry</p>
</div>
</div>
<!--Chapter and summary-->
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 wrap">
<h2 class="title-number" id="title_number">Chapter</h2>
</div>
</div>
<!--Verses-->
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 wrap">
<div onclick="popupVue()" id="chapter">
<div v-for=" verseItem in verses" class="verse">
<span><b>{{ verseItem }} </b></span>
<span v-for="item in json">
<span v-if="item.verse == verseItem && item.punctuation==false" v-bind:class="[item.master_position, item.concept_id]" class="popup chunk eng" v-bind:id= "item.instance_id" >
{{ item.instance_text }}
</span>
<span v-else-if="item.verse == verseItem && item.punctuation==true" class="punctuation">
{{ item.instance_text }}
</span>
</span>
</div>
</div>
</div>
</div>
<nav aria-label="...">
<ul class="pager">
<li class="previous" onclick="previous_chapter()"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span></a></li>
<li class="next" onclick="next_chapter()"><a href="#"><span class="glyphicon glyphicon-chevron-right"></span></a></li>
</ul>
</nav>
</div>
</div>
<!-- end #content -->
<script src="static/js/loadChapter.js" ></script>
<script src="static/js/chapters.js" ></script>
<script src="static/js/functions.js" ></script>
<script src="static/js/settings.js" ></script>
<script type="text/javascript">
var current_position = sessionStorage.getItem("current_position");
current_position = current_position.split(":");
var chapter_num = current_position[2];
var chapter = document.getElementById("title_number");
if(chapter_num[0]=="0"){
chapter_num = chapter_num[1];
}
$(chapter).append(" " + chapter_num);
$(nav_chapter).append(" " + chapter_num);
$("#Chapter\\ 1").removeClass("not-active");
$("#Chapter\\ 2").removeClass("not-active");
$("#1\\ Nephi").removeClass("not-active");
function chapternav(){
var id = event.target.id;
id = id.split(" ");
if(id[1] == "1" || id[1] == "2"){
var current_position = sessionStorage.getItem("current_position");
current_position = current_position.split(":");
var origin_lang_id = sessionStorage.getItem("origin_lang_id");
var new_chapter = "0" + id[1];
var next_chapter_string = next_chapter.toString();
var uid = sessionStorage.getItem("user_id");
var new_current_position = current_position[0] + ":" + current_position[1] +":"+ new_chapter;
sessionStorage.setItem("current_position", new_current_position);
var url = "http://diglot.it.et.byu.edu/update_position?user_id=" + uid + "¤t_pos=" + new_current_position;
console.log(url);
fetch(url).then((response) => {
return response.json().then((json) => {
console.log("JSON", json);
});
});
location.reload();
}//end if
}
</script>
</body>
</html>