List of commits:
Subject Hash Author Date (UTC)
Added the sizes button for content page 8d5ee4c6141a751da3ca35a6b41c0568351f49ec DiAngelo 2015-12-10 15:58:58
Changed content style of drop caps 06c5049d478ac4fc4ad881252064922d7ae25c83 bitvice 2015-12-08 06:27:17
Creted the book content page 672f59bccb826b1334541bca3f4e33d185cfc078 bitvice 2015-12-07 23:39:04
Fixed resources location due to iOS normalization d4d5c6bc35b1f693b4f0e3698f07eeb1c1760092 bitvice 2015-12-04 23:04:43
Normalize main html file for iOS cbe3abfaf4b31d5e60a8eedecd8c851d0d94c661 bitVice 2015-12-04 22:37:14
Created the chapter page 60f92b1deeb20212ae007daeac30eb81a9001c4c DiAngelo 2015-12-04 16:21:59
Created the main books list 8bb7f7ea7f9899f1899325c199026d069b2c78cc DiAngelo 2015-12-04 13:05:30
Created the Home screen 346d0ac674427f6ac93726971305bae9dccd9b0b bitvice 2015-12-03 22:26:22
Added gitignore 04d41132d541491ced51b2a616f3022956b50be5 Gabriel Balasz 2015-12-01 23:20:10
Initial structure 7edeb6fe242457e31b93445a7d821c078b0712a9 Gabriel Balasz 2015-12-01 23:18:58
Initial commit 68c7516c3ec73198c7bcbd8a3dd38bfd721e613c Gabriel Balasz 2015-12-01 22:42:34
Commit 8d5ee4c6141a751da3ca35a6b41c0568351f49ec - Added the sizes button for content page
Author: DiAngelo
Author date (UTC): 2015-12-10 15:58
Committer name: DiAngelo
Committer date (UTC): 2015-12-10 15:58
Parent(s): 06c5049d478ac4fc4ad881252064922d7ae25c83
Signer:
Signing key:
Signing status: N
Tree: 4ac5d5af394e68293128d3d6eb26dffcb0c26b96
File Lines added Lines deleted
app/app.css 1 2
app/index.html 121 71
app/page-content.css 12 12
app/page.css 3 3
index.html 0 20
File app/app.css changed (mode: 100644) (index abaab63..f1f11e3)
... ... body {
33 33 } }
34 34
35 35 h1 { h1 {
36 font-size: 3rem;
36 font-size: 2rem;
37 37 } }
38
File app/index.html changed (mode: 100755) (index 4908267..52a129a)
14 14 <li id="Page0" class="oPage isActive uCenter"> <li id="Page0" class="oPage isActive uCenter">
15 15 <img class="oPage_logo" src="logo.png" /> <img class="oPage_logo" src="logo.png" />
16 16
17 <small>V 5.0.0</small>
17 <small id="AppVersion">V 5.0.1</small>
18 18
19 19 <h1>Texte Liturgice Ortodoxe</h1> <h1>Texte Liturgice Ortodoxe</h1>
20 20
 
41 41 <ul id="ChapterBooks" class="oListBare"></ul> <ul id="ChapterBooks" class="oListBare"></ul>
42 42 </li> </li>
43 43
44 <li id="Page3" class="oPage oContent"></li>
44 <li id="Page3" class="oPage">
45 <main id="Page3Content" class="oContent text-normal"></main>
46 </li>
45 47
46 48 </ul> </ul>
47 49
48 50 <!-- -------------------------------------- --> <!-- -------------------------------------- -->
49 51
50 52 <script type="text/javascript"> <script type="text/javascript">
51 console.log('Start JS');
52 53 var DONE = 4; // readyState 4 means the request is done. var DONE = 4; // readyState 4 means the request is done.
53 54 var OK = 200; // status 200 is a successful return. var OK = 200; // status 200 is a successful return.
54 55
 
56 57 var elPageIndex = document.getElementById('Page0'); var elPageIndex = document.getElementById('Page0');
57 58 var elPageHome = document.getElementById('Page1'); var elPageHome = document.getElementById('Page1');
58 59 var elPageChapter = document.getElementById('Page2'); var elPageChapter = document.getElementById('Page2');
59 var elPageContent = document.getElementById('Page3');
60 var elPageBook = document.getElementById('Page3');
61 var elPageContent = document.getElementById('Page3Content');
60 62 var elMainBooks = document.getElementById('MainBooks'); var elMainBooks = document.getElementById('MainBooks');
61 63
62 64 var urls = { var urls = {
 
66 68 var pagesList = []; var pagesList = [];
67 69 var mainBooks = []; var mainBooks = [];
68 70
71
72
73 /// Core section
74
75 function promise (url, fnSuccess, fnError) {
76 var oReq = new XMLHttpRequest();
77
78 oReq.onload = function (e) {
79 if (typeof(fnSuccess) == "function") {
80 var responseText = e.target.response.toString();
81
82 fnSuccess.call(this,[responseText]);
83 }
84 };
85
86 oReq.onerror = function (e) {
87 if (typeof(fnSuccess) == "function") {
88 var responseText = e.target.response.toString();
89
90 fnError.call(this, [responseText]);
91 }
92 };
93
94 oReq.onreadystatechange = function () {
95 console.log(oReq.readyState);
96 };
97
98 oReq.open('GET', url, true);
99
100 oReq.send();
101 }
102
103 function errorHandler () {
104 console.log("ERROR: ");
105 console.error(errorMessage);
106 }
107
69 108 function changePage (elPageCurrent, elPageNew, fnCallback) { function changePage (elPageCurrent, elPageNew, fnCallback) {
70 109 elPageCurrent.classList.add('animated'); elPageCurrent.classList.add('animated');
71 110 elPageCurrent.classList.add('slideOutLeft'); elPageCurrent.classList.add('slideOutLeft');
 
121 160 pagesList.pop(); pagesList.pop();
122 161 } }
123 162
163 function pageContent (strContent) {
164 elPageContent.innerHTML = strContent + mSize();
165
166 mSizeEvents();
167 }
168
169
170
171 /// Size module
172
173 function mSize () {
174 var htmlFooter =
175 '<footer id="ContentFooter">' +
176 '<div id="SizeButtons" class="mSize">' +
177 '<span class="mSize-small">A</span>' +
178 '<span class="mSize-normal mSize-active">A</span>' +
179 '<span class="mSize-large">A</span>' +
180 '</div>' +
181 '</footer>';
182
183 return htmlFooter;
184 }
185
186 function mSizeFind (_inClass) {
187 var elSizeButtons = document.getElementById('SizeButtons');
188 var sizes = elSizeButtons.getElementsByTagName('span');
189
190 _inClass = 'mSize-' + _inClass;
191
192 for (var i in sizes) {
193 if ((' ' + sizes[i].className + ' ').indexOf(' ' + _inClass + ' ') > -1) {
194 return sizes[i];
195 }
196 }
197 return false;
198 }
199
200 function mSizeEvents () {
201 var elSizeButtons = document.getElementById('SizeButtons');
202
203 elSizeButtons.addEventListener('click', function () {
204 var btnSize = document.getElementById('btn-size');
205 var elActive = mSizeFind('active');
206 var classContent = elPageContent.classList[1];
207 var classActive = 'mSize-active';
208
209 elActive.classList.remove(classActive);
210
211 var sizeModifier;
212
213 switch (classContent) {
214 case 'text-normal':
215 sizeModifier = 'large';
216 break;
217 case 'text-large':
218 sizeModifier = 'small';
219 break;
220 case 'text-small':
221 sizeModifier = 'normal';
222 break;
223 default:
224 }
225
226 mSizeFind(sizeModifier).classList.add(classActive);
227 elPageContent.classList.remove(classContent);
228 elPageContent.classList.add("text-" + sizeModifier);
229 });
230 }
231
232
233
234 /// Book section
235
124 236 function addBook (currentBook, index, elParent) { function addBook (currentBook, index, elParent) {
125 237 var elItem = document.createElement("li"); var elItem = document.createElement("li");
126 238 var elCheckbox = document.createElement("input"); var elCheckbox = document.createElement("input");
 
236 348 var bookId = this.getAttribute('data-book'); var bookId = this.getAttribute('data-book');
237 349 var bookUrl = 'book_' + bookId + '.html'; var bookUrl = 'book_' + bookId + '.html';
238 350
239 console.log("Request " + bookUrl);
240
241 351 elPageContent.innerHTML = ""; elPageContent.innerHTML = "";
242
243 changePage(elPageChapter, elPageContent);
244
352 changePage(elPageChapter, elPageBook);
245 353
246 354 promise(bookUrl, function (responseText) { promise(bookUrl, function (responseText) {
247 355 console.log("Received data"); console.log("Received data");
248 356 console.log(responseText); // 'This is the returned text.' console.log(responseText); // 'This is the returned text.'
249 357
250 elPageContent.innerHTML = responseText;
358 pageContent(responseText);
251 359 }, errorHandler); }, errorHandler);
252 360 } }
253
254 // var xhr = new XMLHttpRequest();
255 // xhr.open('GET', bookUrl);
256 // xhr.send(null);
257 // console.log("Request " + bookUrl);
258
259 // xhr.onreadystatechange = function () {
260 // if (xhr.readyState === DONE) {
261 // var chapterBooks = [];
262
263 // if (xhr.status === OK) {
264 // console.log("Received data");
265 // console.log(xhr.responseText); // 'This is the returned text.'
266 // chapterBooks = JSON.parse(xhr.responseText);
267 // } else {
268 // console.log('Error: ' + xhr.status); // An error occurred during the request.
269 // }
270
271 // setTimeout( function () {
272 // changePage(elPageHome, elPageChapter, function () { listChaper(chapterBooks, bookId); });
273 // }, 2000);
274 // }
275 // };
276 }
277
278 function promise (url, fnSuccess, fnError) {
279 var oReq = new XMLHttpRequest();
280
281 oReq.onload = function (e) {
282 if (typeof(fnSuccess) == "function") {
283 var responseText = e.target.response.toString();
284
285 fnSuccess.call(this,[responseText]);
286 }
287 };
288
289 oReq.onerror = function (e) {
290 if (typeof(fnSuccess) == "function") {
291 var responseText = e.target.response.toString();
292
293 fnError.call(this, [responseText]);
294 }
295 };
296
297 oReq.onreadystatechange = function () {
298 console.log(oReq.readyState);
299 };
300
301 oReq.open('GET', url, true);
302
303 oReq.send();
304 }
305
306 function errorHandler () {
307 console.log("ERROR: ");
308 console.error(errorMessage);
309 361 } }
310 362
311 363
312 364
313 //////////
314
315
365 /// Bootstrap actions when page is loaded
316 366
317 367 document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
318 368
 
320 370 mainBooks = JSON.parse(responseText); mainBooks = JSON.parse(responseText);
321 371 setTimeout( function () { setTimeout( function () {
322 372 changePage(elPageIndex, elPageHome, listBooks); changePage(elPageIndex, elPageHome, listBooks);
323 }, 2000);
373 }, 1000);
324 374 }, errorHandler); }, errorHandler);
325 375
326 376 }); });
 
328 378 </script> </script>
329 379
330 380 </body> </body>
331 </html>
381 </html>
File app/page-content.css changed (mode: 100644) (index 7a156d3..0028f62)
12 12 box-sizing: border-box; box-sizing: border-box;
13 13 } }
14 14
15 .oContent.text-small { font-size: 62.5%; }
16 .oContent.text-normal { font-size: 80%; }
17 .oContent.text-large { font-size: 100%; }
15 .oContent.text-small { font-size: .6rem; }
16 .oContent.text-normal { font-size: .8rem; }
17 .oContent.text-large { font-size: 1rem; }
18 18
19 19 .oContent h1 .oContent h1
20 20 { {
21 font-size: 1.6rem;
21 font-size: 1.6em;
22 22 } }
23 23 .oContent h3 .oContent h3
24 24 { {
25 font-size: 1.4rem;
25 font-size: 1.4em;
26 26 } }
27 27 .oContent h4 .oContent h4
28 28 { {
29 font-size: 1.2rem;
29 font-size: 1.2em;
30 30 } }
31 31
32 32 .oContent h1.red .oContent h1.red
 
95 95 text-indent: 0; text-indent: 0;
96 96 } }
97 97
98 .oContent #footer
98 .oContent footer
99 99 { {
100 100 position: fixed; position: fixed;
101 101 bottom: 0; bottom: 0;
 
103 103 width: 96%; width: 96%;
104 104 } }
105 105
106 .oContent .btn-size
106 .oContent .mSize
107 107 { {
108 108 float: right; float: right;
109 109 padding: 5px 10px; padding: 5px 10px;
 
115 115 text-align:center; text-align:center;
116 116 text-decoration: none; text-decoration: none;
117 117 } }
118 .oContent .btn-size > span.active { color: #333; }
119 .oContent .btn-size .size-small { font-size: 10px; }
120 .oContent .btn-size .size-normal { font-size: 13px; }
121 .oContent .btn-size .size-large { font-size: 16px; }
118 .oContent .mSize-active { color: #333; }
119 .oContent .mSize-small { font-size: .6rem; }
120 .oContent .mSize-normal { font-size: .8rem; }
121 .oContent .mSize-large { font-size: 1rem; }
File app/page.css changed (mode: 100644) (index cbbf09a..3e91cf8)
1 1 .oPage { .oPage {
2 2 position: fixed; position: fixed;
3 top: 0 ;
3 top: 0 ;
4 4 bottom: 0 ; bottom: 0 ;
5 5 left: 100%; left: 100%;
6 6 width: 100%; width: 100%;
 
24 24 } }
25 25
26 26 .oPage_link { .oPage_link {
27 font-size: 2rem;
27 font-size: 1.5rem;
28 28 color: #00c; color: #00c;
29 29 } }
30 30
 
50 50 .oPage_header { .oPage_header {
51 51 display: block; display: block;
52 52 text-align: center; text-align: center;
53 font-size: 2rem;
53 font-size: 1.5rem;
54 54 margin: 0 0 1rem ; margin: 0 0 1rem ;
55 55 padding: .5rem; padding: .5rem;
56 56 } }
File index.html deleted (index c327029..0000000)
1 <!doctype html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="css/app.css" type="text/css">
5 </head>
6 <body>
7 <h1>Texte Liturgice Ortodoxe</h1>
8
9 <img src="images/logo.png" />
10
11 <p id="debug"></p>
12
13 <!-- -------------------------------------- -->
14
15 <script type="text/javascript">
16 // js here
17 </script>
18
19 </body>
20 </html>
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/bitvice/TexteLiturgice

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/bitvice/TexteLiturgice

Clone this repository using git:
git clone git://git.rocketgit.com/user/bitvice/TexteLiturgice

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main