futuro 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,298 +0,0 @@
1
-
2
- let BackgroundShade = { background : "rgba(0,0,0,0.05)" },
3
- ClearDisplay = { clearProps : "display" },
4
- ClearBackground = { clearProps : "background" },
5
- DisplayNone = { display : "none" };
6
-
7
- Browse.book.links = $(".link.browse-book",".wrap.browse-book");
8
- Browse.book.class = "";
9
- Browse.book.notFound = true;
10
-
11
- Browse.chapter.links = $(".link.browse-chapter",".wrap.browse-chapter");
12
- Browse.chapter.books = $(".block.browse-book",".wrap.browse-chapter");
13
- Browse.chapter.class = "";
14
- Browse.chapter.notFound = true;
15
-
16
- Browse.page.links = $(".link.browse-page",".wrap.browse-page");
17
- Browse.page.books = $(".block.browse-book",".wrap.browse-page");
18
- Browse.page.chapters = $(".block.browse-chapter",".wrap.browse-page");
19
- Browse.page.class = "";
20
- Browse.page.notFound = true;
21
-
22
- Browse.found.success = false;
23
-
24
- Browse.match = (value, starts = "book") => {
25
-
26
- $(value.classList).each(function(index,value) {
27
-
28
- if (starts == "book") {
29
-
30
- if (value.startsWith('book-')) { Browse.book.class = value; }
31
-
32
- } else {
33
-
34
- if (value.startsWith('chapter-')) { Browse.chapter.class = value; }
35
-
36
- }
37
-
38
- });
39
-
40
- }
41
-
42
- Browse.found.check = value => {
43
-
44
- if(Browse.found.success) {
45
-
46
- gsap.set(value,ClearDisplay);
47
-
48
- } else {
49
-
50
- gsap.set(value,DisplayNone);
51
-
52
- }
53
- }
54
-
55
- $(window.location.pathname.split('/')).map((index,value) => {
56
-
57
- if (Site.isLibrary) {
58
-
59
- if (index == 1) {
60
-
61
- Book.url = value; Browse.book.class = 'book-' + Book.url;
62
-
63
- } else if (index == 2) {
64
-
65
- Chapter.url = value; Browse.chapter.class = 'chapter-' + Chapter.url;
66
-
67
- } else if (index == 3) {
68
-
69
- Page.url = value; Browse.page.class = 'title-' + Page.url;
70
-
71
- }
72
-
73
- } else {
74
-
75
- if (index == 1) {
76
-
77
- Chapter.url = value; Browse.chapter.class = 'chapter-' + Chapter.url;
78
-
79
- } else if (index == 2) {
80
-
81
- Page.url = value; Browse.page.class = 'title-' + Page.url;
82
-
83
- }
84
-
85
- }
86
-
87
- });
88
-
89
- Check.book.class = value => {
90
-
91
- Browse.found.success = false;
92
-
93
- $(value.classList).map((index,value) => {
94
-
95
- if (value.startsWith('book-')) {
96
-
97
- if (Browse.book.class == value) {
98
-
99
- Browse.found.success = true;
100
-
101
- Browse.book.notFound = false;
102
-
103
- }
104
-
105
- }
106
-
107
- });
108
-
109
- }
110
-
111
- Check.chapter.class = value => {
112
-
113
- Browse.found.success = false;
114
-
115
- $(value.classList).each(function(index,value) {
116
-
117
- if (value.startsWith('chapter-')) {
118
-
119
- if (Browse.chapter.class == value) {
120
-
121
- Browse.found.success = true;
122
-
123
- Browse.chapter.notFound = false;
124
-
125
- }
126
-
127
- }
128
-
129
- });
130
-
131
- }
132
-
133
- Check.page.class = value => {
134
-
135
- Browse.found.success = false;
136
-
137
- $(value.classList).each(function(index,value) {
138
-
139
- if (value.startsWith('title-')) {
140
-
141
- if (Browse.page.class == value) {
142
-
143
- Browse.found.success = true;
144
-
145
- Browse.page.notFound = false;
146
-
147
- }
148
-
149
- }
150
-
151
- });
152
-
153
- }
154
-
155
- Browse.chapter.books.filter = (index,value) => {
156
-
157
- gsap.set(value,ClearDisplay);
158
-
159
- $(value.children).each(function(index,value) {
160
-
161
- Check.chapter.class(value);
162
-
163
- if (Browse.found.success) {
164
-
165
- gsap.set(value,BackgroundShade);
166
-
167
- }
168
-
169
- });
170
-
171
- if (Browse.chapter.notFound) {
172
-
173
- gsap.set(value.children[0],BackgroundShade);
174
-
175
- }
176
- }
177
-
178
- Browse.page.books.filter = (index,value) => {
179
-
180
- gsap.set(value,ClearDisplay);
181
-
182
- $(value.children).each(function(index,value) {
183
-
184
- Check.chapter.class(value);
185
-
186
- if (Browse.found.success) {
187
-
188
- gsap.set(value,ClearDisplay);
189
-
190
- $(value.children).each(function(index,value) {
191
-
192
- Check.page.class(value);
193
-
194
- if (Browse.found.success) {
195
-
196
- gsap.set(value,BackgroundShade);
197
-
198
- }
199
-
200
- })
201
-
202
- if (Browse.page.notFound) {
203
-
204
- gsap.set(value.children[0],BackgroundShade);
205
-
206
- }
207
-
208
- } else {
209
-
210
- gsap.set(value,DisplayNone);
211
-
212
- }
213
-
214
- });
215
-
216
- if (Browse.chapter.notFound) {
217
-
218
- gsap.set(value.children[0],ClearDisplay);
219
-
220
- gsap.set(value.children[0].children[0],BackgroundShade);
221
-
222
- }
223
-
224
- }
225
-
226
- Browse.book.links.respond = value => {
227
-
228
- Browse.match(value);
229
-
230
- gsap.set(Browse.book.links,ClearBackground);
231
-
232
- gsap.set(value,BackgroundShade);
233
-
234
- Check.book.class(value);
235
-
236
- }
237
-
238
- Browse.chapter.books.respond = value => {
239
-
240
- Check.book.class(value);
241
-
242
- Browse.found.check(value);
243
-
244
- gsap.set(value.children,ClearBackground);
245
-
246
- gsap.set(value.children[0],BackgroundShade);
247
-
248
- }
249
-
250
- Browse.chapter.links.respond = value => {
251
-
252
- let parent = value.parentElement;
253
-
254
- Browse.match(parent,"book");
255
-
256
- Browse.match(value,"chapter");
257
-
258
- gsap.set(Browse.chapter.links,ClearBackground);
259
-
260
- gsap.set(value,BackgroundShade);
261
-
262
- }
263
-
264
- Browse.page.books.respond = value => {
265
-
266
- Check.book.class(value);
267
-
268
- Browse.found.check(value);
269
-
270
- gsap.set(value.children,DisplayNone);
271
-
272
- gsap.set(value.children[0],ClearDisplay);
273
-
274
- gsap.set(value.children[0].children,ClearBackground);
275
-
276
- gsap.set(value.children[0].children[0],BackgroundShade);
277
-
278
- }
279
-
280
- Browse.page.chapters.respond = value => {
281
-
282
- Check.chapter.class(value);
283
-
284
- Browse.found.check(value);
285
-
286
- gsap.set(value.children,ClearBackground);
287
-
288
- gsap.set(value.children[0],BackgroundShade);
289
-
290
- }
291
-
292
- Browse.page.links.respond = value => {
293
-
294
- gsap.set(Browse.page.links,ClearBackground);
295
-
296
- gsap.set(value,BackgroundShade);
297
-
298
- }
@@ -1,42 +0,0 @@
1
-
2
- Respond.browse = () => {
3
-
4
- Browse.book.links.hover(function() {
5
-
6
- Browse.book.links.respond(this);
7
-
8
- Browse.chapter.books.map((index,value)=>{
9
-
10
- Browse.chapter.books.respond(value);
11
-
12
- });
13
-
14
- Browse.page.books.map((index,value)=>{
15
-
16
- Browse.page.books.respond(value);
17
-
18
- });
19
-
20
- });
21
-
22
- Browse.chapter.links.hover(function() {
23
-
24
- Browse.chapter.links.respond(this);
25
-
26
- Browse.page.chapters.map((index,value)=>{
27
-
28
- Browse.page.chapters.respond(value);
29
-
30
- });
31
-
32
- });
33
-
34
- Browse.page.links.hover(function() {
35
-
36
- Browse.page.links.respond(this);
37
-
38
- });
39
-
40
- }
41
-
42
- if (!Site.isTheme) { if (!Body.isHome) { if (Browse.able) { Respond.browse(); } } }