List of commits:
Subject Hash Author Date (UTC)
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 60f92b1deeb20212ae007daeac30eb81a9001c4c - Created the chapter page
Author: DiAngelo
Author date (UTC): 2015-12-04 16:21
Committer name: DiAngelo
Committer date (UTC): 2015-12-04 16:21
Parent(s): 8bb7f7ea7f9899f1899325c199026d069b2c78cc
Signer:
Signing key:
Signing status: N
Tree: 2181f0ba88d956491dd8e0ec1608861ecf860670
File Lines added Lines deleted
app/books/zilnice.json 6 0
app/css/themes/light.css 29 29
app/index.html 122 33
File app/books/zilnice.json added (mode: 100644) (index 0000000..5dad46f)
1 [
2 {"id":"rugaciunile-diminetii", "title":"Rug\u0103ciunile dimine\u021bii"},
3 {"id":"rugaciuni-trebuinte", "title":"Rug\u0103ciuni pentru diferite trebuin\u021be"},
4 {"id":"rugaciunile-meselor", "title":"Rug\u0103ciunile meselor"},
5 {"id":"rugaciunile-de-seara", "title":"Rug\u0103ciunile de sear\u0103"}
6 ]
File app/css/themes/light.css changed (mode: 100644) (index 53bcbc2..6c0deec)
1 body
1 body
2 2 { {
3 background-color: #f5f5f5;
4 background-size: 110%;
3 background-color: #f5f5f5;
4 background-size: 110%;
5 5 margin: 0; margin: 0;
6 6 padding: 5% 2% 4em; padding: 5% 2% 4em;
7 7 color: #333; color: #333;
8 font-family: serif;
8 font-family: serif;
9 9 } }
10 10
11 11 body.text-small { font-size: 62.5%; } body.text-small { font-size: 62.5%; }
12 12 body.text-normal { font-size: 80%; } body.text-normal { font-size: 80%; }
13 13 body.text-large { font-size: 100%; } body.text-large { font-size: 100%; }
14 14
15 h1
16 {
17 font-size: 1.6em;
15 h1
16 {
17 font-size: 1.6em;
18 18 } }
19 19 h3 h3
20 {
21 font-size: 1.4em;
20 {
21 font-size: 1.4em;
22 22 } }
23 23 h4 h4
24 {
25 font-size: 1.2em;
24 {
25 font-size: 1.2em;
26 26 } }
27 27
28 28 h1.red h1.red
 
... ... h1.red
30 30 text-transform: uppercase; text-transform: uppercase;
31 31 } }
32 32
33 h1,h2,h3,h4 {
34 color: #e20000;
35 text-align: center;
33 h1,h2,h3,h4 {
34 color: #e20000;
35 text-align: center;
36 36 } }
37 37
38 38 .drop-caps { .drop-caps {
 
... ... h1,h2,h3,h4 {
54 54
55 55 span.directive { font-size: .75em; } span.directive { font-size: .75em; }
56 56
57 p, li
58 {
59 text-indent: 0;
60 font-size: 1.2em;
57 p, li
58 {
59 text-indent: 0;
60 font-size: 1.2em;
61 61 text-align: justify; text-align: justify;
62 62 line-height: 2em; line-height: 2em;
63 63 clear: both; clear: both;
64 64 } }
65 p.centered
65 p.centered
66 66 { {
67 text-indent: 0;
68 text-align: center;
67 text-indent: 0;
68 text-align: center;
69 69 padding: 0.5em 0 0; padding: 0.5em 0 0;
70 70 } }
71 .red
72 {
73 color: #e20000;
71 .red
72 {
73 color: #e20000;
74 74 } }
75 75 .black .black
76 {
77 color: #333;
76 {
77 color: #333;
78 78 } }
79 79 ol ol
80 80 { {
81 padding-left: 2.4em;
81 padding-left: 2.4em;
82 82 } }
83 83 ol li ol li
84 84 { {
 
... ... ol li
86 86 text-indent: 0; text-indent: 0;
87 87 } }
88 88
89 #footer
89 #footer
90 90 { {
91 91 position: fixed; position: fixed;
92 92 bottom: 0; bottom: 0;
93 93 height: 32px; height: 32px;
94 width: 96%;
94 width: 96%;
95 95 } }
96 96
97 97 .btn-size .btn-size
File app/index.html changed (mode: 100644) (index f5c2c7c..d231005)
27 27 <img src="images/christ_icon.jpg" /> <img src="images/christ_icon.jpg" />
28 28 </div> </div>
29 29
30 <h2 class="oPage_header fillMain">Texte Liturgice Ortodoxe</h2>
30 <h2 id="AppTitle" class="oPage_header fillMain">Texte Liturgice Ortodoxe</h2>
31 31
32 <ul id="MainBooks" class="oListBare">
33
34 <!-- <li class="oListBare_item fillRoot hasChildren isOpen">Carte de rugaciuni</li>
35 <li class="oListBare_item fillRoot hasChildren">Molitfelnic</li>
36 -->
37 </ul>
32 <ul id="MainBooks" class="oListBare"></ul>
38 33 </li> </li>
39 34
35 <li id="Page2" class="oPage">
36 <h2 id="ChapterTitle" class="oPage_header fillMain"></h2>
37
38 <ul id="ChapterBooks" class="oListBare"></ul>
39 </li>
40
40 41 </ul> </ul>
41 42
42 43 <!-- -------------------------------------- --> <!-- -------------------------------------- -->
43 44
44 45 <script type="text/javascript"> <script type="text/javascript">
45 46
46 var elPageIndex = document.getElementById('Page0');
47 var elPageHome = document.getElementById('Page1');
48 var elMainBooks = document.getElementById('MainBooks');
47 var DONE = 4; // readyState 4 means the request is done.
48 var OK = 200; // status 200 is a successful return.
49 49
50 var elPageIndex = document.getElementById('Page0');
51 var elPageHome = document.getElementById('Page1');
52 var elPageChapter = document.getElementById('Page2');
53 var elMainBooks = document.getElementById('MainBooks');
54
55 var pagesList = [];
50 56 var mainBooks = []; var mainBooks = [];
51 57
52 function hideIndexPage () {
53 elPageIndex.classList.add('animated');
54 elPageIndex.classList.add('slideOutLeft');
55 elPageHome.classList.add('animated');
56 elPageHome.classList.add('slideInRight');
57 elPageHome.classList.add('isActive');
58 function changePage (elPageCurrent, elPageNew, fnCallback) {
59 elPageCurrent.classList.add('animated');
60 elPageCurrent.classList.add('slideOutLeft');
61 elPageNew.classList.add('animated');
62 elPageNew.classList.add('slideInRight');
63 elPageNew.classList.add('isActive');
64
65 setTimeout(function () {
66 elPageCurrent.classList.remove('animated');
67 elPageCurrent.classList.remove('slideOutLeft');
68 elPageCurrent.classList.remove('isActive');
69 elPageCurrent.classList.add('isRendered');
70 elPageNew.classList.remove('animated');
71 elPageNew.classList.remove('slideInRight');
72
73 if (typeof(fnCallback) == "function") {
74 fnCallback.call();
75 }
76 }, 1000);
77
78 if (pagesList.length == 0) {
79 pagesList.push(elPageCurrent);
80 }
58 81
59 setTimeout( function () {
60 elPageIndex.classList.remove('isActive');
61 elPageIndex.classList.add('isRendered');
82 pagesList.push(elPageNew);
83 }
62 84
63 listBooks();
64 }, 1000);
65 }
85 function backPage () {
86 var elPageCurrent = pagesList[pagesList.length - 1];
87 var elPagePrev;
66 88
67 function listBooks () {
68 for (var i = 0; i < mainBooks.length; i++) {
69 addBook(mainBooks[i], i);
89 if (pagesList.length > 2) {
90 elPageCurrent.classList.add('animated');
91 elPageCurrent.classList.add('slideOutRight');
92
93 elPagePrev = pagesList[pagesList.length - 2];
94 elPagePrev.classList.remove('isRendered');
95 elPagePrev.classList.add('animated');
96 elPagePrev.classList.add('slideInLeft');
97 elPagePrev.classList.add('isActive');
98
99 setTimeout(function () {
100 elPageCurrent.classList.remove('isActive');
101 elPageCurrent.classList.remove('animated');
102 elPageCurrent.classList.remove('slideOutRight');
103 elPagePrev.classList.remove('slideInLeft');
104 }, 1000);
105
106 } else {
107 alert("Exit APP");
70 108 } }
109
110 pagesList.pop();
71 111 } }
72 112
73 113 function addBook (currentBook, index, elParent) { function addBook (currentBook, index, elParent) {
 
80 120 var type = 'Root'; var type = 'Root';
81 121 var hasChildren = false; var hasChildren = false;
82 122 var elList; var elList;
83 var id = "Book" + index;
123 var id = "Book_" + currentBook.id;
84 124 var idBox = id + "_box"; var idBox = id + "_box";
85 125 var animEffect = 'bounceInRight'; var animEffect = 'bounceInRight';
86 126
 
104 144 } else { } else {
105 145 type = 'Secondary'; type = 'Secondary';
106 146 idBox = type + idBox; idBox = type + idBox;
107 wait = 0;
147 // wait = 0;
108 148 animEffect = 'fadeIn'; animEffect = 'fadeIn';
109 149 } }
110 150
111 151 elCheckbox.setAttribute('id', idBox); elCheckbox.setAttribute('id', idBox);
112 152 elLbl.setAttribute('for', idBox); elLbl.setAttribute('for', idBox);
153 elLbl.setAttribute('data-book', currentBook.id);
113 154 elLbl.classList.add('fill' + type); elLbl.classList.add('fill' + type);
114 155 elLbl.classList.add(animEffect); elLbl.classList.add(animEffect);
115 156 elLbl.classList.add('animated'); elLbl.classList.add('animated');
 
121 162
122 163 elLbl.classList.add('hasChildren'); elLbl.classList.add('hasChildren');
123 164 hasChildren = true; hasChildren = true;
165 } else {
166 elLbl.addEventListener('click', bookClicked);
124 167 } }
125 168
126 169 setTimeout(function () { setTimeout(function () {
 
134 177 }, wait); }, wait);
135 178 } }
136 179
137 document.addEventListener('DOMContentLoaded', function() {
180 function listBooks () {
181 var elChapterTitle = document.getElementById('AppTitle');
182
183 elChapterTitle.addEventListener('click', backPage);
184
185 for (var i = 0; i < mainBooks.length; i++) {
186 addBook(mainBooks[i], i);
187 }
188 }
189
190 function listChaper (chapterBooks, parentBookId) {
191 var elChapterTitle = document.getElementById('ChapterTitle');
192 var elChapterBooks = document.getElementById('ChapterBooks');
193 var elParentBook = document.getElementById('Book_' + parentBookId);
194 var elParentLabel = elParentBook.getElementsByTagName('label')[0];
138 195
196 elChapterTitle.addEventListener('click', backPage);
197 elChapterTitle.textContent = elParentLabel.textContent;
198
199 for (var i = 0; i < chapterBooks.length; i++) {
200 addBook(chapterBooks[i], i, elChapterBooks);
201 }
202 }
203
204 function bookClicked () {
205 var bookId = this.getAttribute('data-book');
206 var bookUrl = 'books/' + bookId + '.json'
139 207 var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
140 xhr.open('GET', 'books.json');
208 xhr.open('GET', bookUrl);
141 209 xhr.send(null); xhr.send(null);
210 console.log("Request " + bookUrl);
142 211
143 212 xhr.onreadystatechange = function () { xhr.onreadystatechange = function () {
144 var DONE = 4; // readyState 4 means the request is done.
145 var OK = 200; // status 200 is a successful return.
146
147 213 if (xhr.readyState === DONE) { if (xhr.readyState === DONE) {
214 var chapterBooks = [];
215
148 216 if (xhr.status === OK) { if (xhr.status === OK) {
217 console.log("Received data");
149 218 console.log(xhr.responseText); // 'This is the returned text.' console.log(xhr.responseText); // 'This is the returned text.'
219 chapterBooks = JSON.parse(xhr.responseText);
220 } else {
221 console.log('Error: ' + xhr.status); // An error occurred during the request.
222 }
223
224 setTimeout( function () {
225 changePage(elPageHome, elPageChapter, function () { listChaper(chapterBooks, bookId); });
226 }, 200);
227 }
228 };
229 }
230
231 document.addEventListener('DOMContentLoaded', function() {
232 var xhr = new XMLHttpRequest();
233 xhr.open('GET', 'books.json');
234 xhr.send(null);
235
236 xhr.onreadystatechange = function () {
237 if (xhr.readyState === DONE) {
238 if (xhr.status === OK) {
150 239 mainBooks = JSON.parse(xhr.responseText); mainBooks = JSON.parse(xhr.responseText);
151 240 } else { } else {
152 241 console.log('Error: ' + xhr.status); // An error occurred during the request. console.log('Error: ' + xhr.status); // An error occurred during the request.
153 242 } }
154 243
155 244 setTimeout( function () { setTimeout( function () {
156 hideIndexPage();
245 changePage(elPageIndex, elPageHome, listBooks);
157 246 }, 200); }, 200);
158 247 } }
159 248 }; };
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