futuro 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/artwork/animal/icon.svg +10 -0
  3. data/_includes/artwork/orwell/animal/flob.scss +5 -0
  4. data/_includes/artwork/orwell/animal/waldo.scss +45 -0
  5. data/_includes/html/assign/page.liquid +85 -0
  6. data/_includes/html/assign/site.liquid +88 -0
  7. data/_includes/html/layout/loop.liquid +32 -0
  8. data/_includes/html/layout/type.liquid +16 -0
  9. data/_includes/html/overlay/about.liquid +5 -2
  10. data/_includes/html/overlay/browse/book.liquid +14 -25
  11. data/_includes/html/overlay/browse/chapter.liquid +24 -19
  12. data/_includes/html/overlay/browse/page.liquid +50 -30
  13. data/_includes/html/overlay/browse.liquid +5 -5
  14. data/_includes/html/overlay/load.liquid +29 -9
  15. data/_includes/html/overlay/search.liquid +20 -12
  16. data/_includes/html/overlay/wrap.liquid +18 -0
  17. data/_includes/html/page/clippies.liquid +22 -0
  18. data/_includes/html/page/content/chart.liquid +8 -0
  19. data/_includes/html/page/content/header.liquid +42 -0
  20. data/_includes/html/page/content/loop/artwork/image.liquid +2 -0
  21. data/_includes/html/page/content/loop/artwork/video.liquid +4 -0
  22. data/_includes/html/page/content/loop/artwork.liquid +22 -0
  23. data/_includes/html/page/content/loop/chart/assign.liquid +30 -0
  24. data/_includes/html/page/content/loop/chart.liquid +38 -0
  25. data/_includes/html/page/content/loop/form/alert.liquid +14 -0
  26. data/_includes/html/page/content/loop/form/button.liquid +26 -0
  27. data/_includes/html/page/content/loop/form/callout.liquid +6 -0
  28. data/_includes/html/page/content/loop/form/checkbox.liquid +24 -0
  29. data/_includes/html/page/content/loop/form/date.liquid +197 -0
  30. data/_includes/html/page/content/loop/form/fee.liquid +9 -0
  31. data/_includes/html/page/content/loop/form/input.liquid +7 -0
  32. data/_includes/html/page/content/loop/form/item.liquid +38 -0
  33. data/_includes/html/page/content/loop/form/label.liquid +15 -0
  34. data/_includes/html/page/content/loop/form/legend.liquid +38 -0
  35. data/_includes/html/page/content/loop/form/message.liquid +6 -0
  36. data/_includes/html/page/content/loop/form/password.liquid +11 -0
  37. data/_includes/html/page/content/loop/form/radio.liquid +39 -0
  38. data/_includes/html/page/content/loop/form/select.liquid +22 -0
  39. data/_includes/html/page/content/loop/form/text.liquid +45 -0
  40. data/_includes/html/page/content/loop/form/textarea.liquid +18 -0
  41. data/_includes/html/page/content/loop/form/yousaved.liquid +10 -0
  42. data/_includes/html/page/content/loop/form.liquid +66 -0
  43. data/_includes/html/page/content/loop/header/back.liquid +6 -0
  44. data/_includes/html/page/content/loop/header/basket.liquid +8 -0
  45. data/_includes/html/page/content/loop/header/login.liquid +28 -0
  46. data/_includes/html/page/content/loop/header/logo.liquid +32 -0
  47. data/_includes/html/page/content/loop/header/search.liquid +16 -0
  48. data/_includes/html/page/content/loop/header/subheader.liquid +8 -0
  49. data/_includes/html/page/content/loop/header.liquid +18 -0
  50. data/_includes/html/page/content/loop/number.liquid +16 -0
  51. data/_includes/html/page/content/loop/pies.liquid +42 -0
  52. data/_includes/html/page/content/loop/roller/item.liquid +47 -0
  53. data/_includes/html/page/content/loop/roller.liquid +8 -0
  54. data/_includes/html/page/content/loop/screen/row.liquid +18 -0
  55. data/_includes/html/page/content/loop/screen/small.liquid +6 -0
  56. data/_includes/html/page/content/loop/screen/title.liquid +12 -0
  57. data/_includes/html/page/content/loop/screen.liquid +38 -0
  58. data/_includes/html/page/content/loop.liquid +10 -0
  59. data/_includes/html/page/content/more.liquid +10 -0
  60. data/_includes/html/page/content/roller.liquid +76 -0
  61. data/_includes/html/page/content.liquid +135 -0
  62. data/_includes/html/page/footnote.liquid +24 -0
  63. data/_includes/html/page/header.liquid +8 -34
  64. data/_includes/html/page/info.liquid +18 -23
  65. data/_includes/html/page/layout/home.liquid +7 -0
  66. data/_includes/html/page/layout/page.liquid +15 -24
  67. data/_includes/html/page/subtitle.liquid +1 -3
  68. data/_includes/html/page/title.liquid +18 -17
  69. data/_includes/html/page/topbar.liquid +16 -8
  70. data/_includes/html/page/{utils → util}/author.liquid +1 -1
  71. data/_includes/html/page/util/share.liquid +24 -0
  72. data/_includes/html/page/{utils → util}/update.liquid +1 -1
  73. data/_includes/html/page/util.liquid +28 -12
  74. data/_includes/html/search/loop.liquid +11 -0
  75. data/_includes/html/site/footer.liquid +10 -0
  76. data/_includes/html/site/header.liquid +10 -0
  77. data/_includes/html/site/scroller.liquid +68 -0
  78. data/_includes/svg/site/icon.liquid +17 -11
  79. data/_layouts/feed.html +37 -33
  80. data/_layouts/single.html +36 -31
  81. data/_sass/_bar.scss +1 -1
  82. data/_sass/_base.scss +10 -21
  83. data/_sass/_block.scss +7 -26
  84. data/_sass/_box.scss +1 -1
  85. data/_sass/_button.scss +2 -2
  86. data/_sass/_col.scss +2 -2
  87. data/_sass/_input.scss +14 -28
  88. data/_sass/_item.scss +20 -16
  89. data/_sass/_link.scss +42 -0
  90. data/_sass/_list.scss +21 -20
  91. data/_sass/_site.scss +3 -3
  92. data/_sass/_title.scss +74 -42
  93. data/_sass/area/book.scss +18 -0
  94. data/_sass/area/chapter.scss +15 -0
  95. data/_sass/area/content.scss +9 -0
  96. data/_sass/area/overlay.scss +50 -5
  97. data/_sass/area/page.scss +59 -20
  98. data/_sass/area/topbar.scss +5 -2
  99. data/_sass/block/chart.scss +44 -0
  100. data/_sass/block/custom.scss +9 -0
  101. data/_sass/block/form/alert.scss +17 -0
  102. data/_sass/block/form/checkbox.scss +42 -0
  103. data/_sass/block/form/header.scss +78 -0
  104. data/_sass/block/form/input.scss +51 -0
  105. data/_sass/block/form/item.scss +22 -0
  106. data/_sass/block/form/label.scss +15 -0
  107. data/_sass/block/form/legend.scss +70 -0
  108. data/_sass/block/form/login.scss +70 -0
  109. data/_sass/block/form/message.scss +9 -0
  110. data/_sass/block/form/password.scss +19 -0
  111. data/_sass/block/form/radio.scss +12 -0
  112. data/_sass/block/form/screen.scss +89 -0
  113. data/_sass/block/form/scroller.scss +8 -0
  114. data/_sass/block/form/search.scss +39 -0
  115. data/_sass/block/form/select.scss +49 -0
  116. data/_sass/block/form/subheader.scss +60 -0
  117. data/_sass/block/form/text.scss +20 -0
  118. data/_sass/block/form/title.scss +12 -0
  119. data/_sass/block/form.scss +17 -0
  120. data/_sass/block/navigation.scss +3 -3
  121. data/_sass/block/number.scss +9 -0
  122. data/_sass/block/pie.scss +14 -0
  123. data/_sass/block/results.scss +9 -5
  124. data/_sass/block/scroller.scss +12 -0
  125. data/_sass/block/stop.scss +0 -1
  126. data/_sass/block/util.scss +19 -17
  127. data/_sass/futuro.core.scss +74 -27
  128. data/_sass/helpers/extends/grid.scss +24 -0
  129. data/_sass/helpers/extends/layout.scss +27 -0
  130. data/_sass/helpers/extends.scss +22 -115
  131. data/_sass/helpers/mixins/layout.scss +11 -0
  132. data/_sass/helpers/mixins/mindsets.scss +0 -6
  133. data/_sass/helpers/mixins/patterns.scss +4 -4
  134. data/_sass/helpers/mixins/theme.scss +292 -210
  135. data/_sass/helpers/mixins.scss +1 -12
  136. data/_sass/helpers/themes.scss +10 -0
  137. data/_sass/helpers/variables.scss +55 -42
  138. data/_sass/title/overlay.scss +16 -17
  139. data/_sass/wrap/book.scss +1 -1
  140. data/_sass/wrap/browse.scss +26 -0
  141. data/_sass/wrap/chapter.scss +11 -1
  142. data/_sass/wrap/overlay.scss +54 -1
  143. data/_sass/wrap/page.scss +18 -1
  144. data/_sass/wrap/scroller.scss +1 -1
  145. data/assets/js/footer/custom/ActiveBook.js +10 -12
  146. data/assets/js/footer/custom/AnimateScroller.js +11 -0
  147. data/assets/js/footer/custom/Overlays.js +21 -21
  148. data/assets/js/footer/custom/RespondBrowse.js +80 -0
  149. data/assets/js/footer/custom/Settings.js +9 -5
  150. data/assets/js/footer/custom/SetupBrowse.js +115 -0
  151. data/assets/js/footer/custom/SetupHome.js +23 -6
  152. data/assets/js/footer/custom/SiteFunc.js +17 -11
  153. data/assets/js/footer/custom/StartBrowse.js +95 -59
  154. data/assets/js/footer/custom/SwitchFocus.js +6 -6
  155. data/assets/js/footer/custom/UtilShare.js +14 -8
  156. data/assets/js/footer/vendor/gsap-scramble.js +11 -0
  157. data/assets/js/futuro.footer.custom.js +1 -1
  158. data/assets/js/futuro.footer.vendor.js +12 -0
  159. data/assets/js/futuro.header.custom.js +1 -1
  160. data/assets/js/header/custom/Color.js +39 -27
  161. data/assets/js/header/custom/Config.js +16 -0
  162. data/assets/js/header/custom/Overlay.js +21 -34
  163. data/assets/js/header/custom/Site.js +5 -0
  164. metadata +100 -38
  165. data/_includes/html/assign.liquid +0 -7
  166. data/_includes/html/filter/loop.liquid +0 -31
  167. data/_includes/html/filter/type.liquid +0 -31
  168. data/_includes/html/loop/artwork/book/number.liquid +0 -7
  169. data/_includes/html/loop/artwork/book/pies.liquid +0 -41
  170. data/_includes/html/loop/artwork/book/textbox.liquid +0 -16
  171. data/_includes/html/loop/artwork/book/video.liquid +0 -4
  172. data/_includes/html/loop/artwork/book.liquid +0 -38
  173. data/_includes/html/loop/artwork/docs.liquid +0 -31
  174. data/_includes/html/loop/search.liquid +0 -16
  175. data/_includes/html/overlay.liquid +0 -23
  176. data/_includes/html/page/artwork.liquid +0 -27
  177. data/_includes/html/page/layout/chapter.liquid +0 -32
  178. data/_includes/html/page/layout/custom.liquid +0 -79
  179. data/_includes/html/page/layout/panel.liquid +0 -15
  180. data/_includes/html/page/layout/tree.liquid +0 -15
  181. data/_includes/html/page/utils/share.liquid +0 -18
  182. data/_includes/svg/site/btn/search.svg +0 -1
  183. data/_sass/_area.scss +0 -52
  184. data/_sass/_lnk.scss +0 -32
  185. data/_sass/area/overlay/about.scss +0 -10
  186. data/_sass/area/overlay/browse.scss +0 -6
  187. data/_sass/area/overlay/load.scss +0 -10
  188. data/_sass/area/overlay/mobile.scss +0 -9
  189. data/_sass/area/overlay/search.scss +0 -6
  190. data/_sass/block/browse.scss +0 -35
  191. data/_sass/helpers/variables/patterns.scss +0 -10
  192. data/_sass/wrap/overlay/legacy.scss +0 -18
  193. data/_sass/wrap/overlay/load.scss +0 -4
  194. data/_sass/wrap/overlay/mobile.scss +0 -8
  195. data/_sass/wrap/overlay/search.scss +0 -4
  196. data/assets/js/footer/custom/ExpandBlock.js +0 -21
  197. data/assets/js/footer/custom/ScrollFunc.js +0 -41
  198. data/assets/js/footer/custom/SplitCode.js +0 -14
@@ -1,46 +1,59 @@
1
1
 
2
- $system : #6e46a0;
3
- $brand : #ff8200;
4
- $supply : #f00a0a;
5
- $demo : #005a9b;
6
- $generic : #fe5900;
7
- $theatre : #019fc6;
8
- $talks : #ff9000;
9
- $music : #dc3636;
10
- $classical : #bf8f3a;
11
- $cinema : #259d31;
12
- $tours : #718ab2;
13
- $hire : #412f79;
14
- $membership : #5d91e5;
15
- $art : #f90082;
16
- $shop : #23D5B0;
17
- $addicts : #e6433a;
18
- $family : #029ddf;
19
- $receptive : #b25400;
20
- $value : #5fb641;
21
- $next : #ffa905;
22
- $maybe : #974597;
23
- $earthlyparadise : #e8396c;
24
- $artforall : #f9ae00;
25
- $aroundthepark : #009640;
26
- $newsfromnowhere : #009fe3;
27
- $dodgers : #0092FF;
28
- $green : #259d31;
2
+ $color : (
3
+ system : #6e46a0,
4
+ brand : #ff8200,
5
+ supply : #f00a0a,
6
+ demo : #005a9b,
7
+ generic : #fe5900,
8
+ theatre : #019fc6,
9
+ talks : #ff9000,
10
+ music : #dc3636,
11
+ classical : #bf8f3a,
12
+ cinema : #259d31,
13
+ tours : #718ab2,
14
+ hire : #412f79,
15
+ members : #5d91e5,
16
+ art : #f90082,
17
+ shop : #23D5B0,
18
+ addicts : #e6433a,
19
+ family : #029ddf,
20
+ receptive : #b25400,
21
+ value : #5fb641,
22
+ next : #ffa905,
23
+ maybe : #974597,
24
+ paradise : #e8396c,
25
+ artforall : #f9ae00,
26
+ park : #009640,
27
+ news : #009fe3,
28
+ dodgers : #0092FF,
29
+ green : #259d31,
30
+ smoke : darken(white,7%),
31
+ gray : darken(white,25%),
32
+ gun : darken(white,60%),
33
+ slate : lighten(black,20%),
34
+ carbon : lighten(black,10%),
35
+ coal : lighten(black,5%)
36
+ );
29
37
 
30
- $smoke : darken(white,7%);
31
- $gray : darken(white,25%);
32
- $gun : darken(white,60%);
33
- $carbon : lighten(black,10%);
34
- $coal : lighten(black,5%);
38
+ // map-get($color,system)
35
39
 
36
- $animate : lighten(black,20%);
37
- $forms : lighten(black,20%);
38
- $blocks : lighten(black,20%);
40
+ $query : (
41
+ max599 : 'only screen and (max-width: 599px)',
42
+ min600 : 'only screen and (min-width: 600px)',
43
+ max639 : 'only screen and (max-width: 639px)',
44
+ min640 : 'only screen and (min-width: 640px)',
45
+ min700 : 'only screen and (min-width: 700px)',
46
+ max767 : 'only screen and (max-width: 767px)',
47
+ min768 : 'only screen and (min-width: 768px)',
48
+ max839 : 'only screen and (max-width: 839px)',
49
+ min840 : 'only screen and (min-width: 840px)',
50
+ min1024 : 'only screen and (min-width: 1024px)'
51
+ );
39
52
 
40
- $max599 : "only screen and (max-width: 599px)";
41
- $min600 : "only screen and (min-width: 600px)";
42
- $min640 : "only screen and (min-width: 640px)";
43
- $min700 : "only screen and (min-width: 700px)";
44
- $max767 : "only screen and (max-width: 767px)";
45
- $min768 : "only screen and (min-width: 768px)";
46
- $min1024 : "only screen and (min-width: 1024px)";
53
+ $radius : 4px;
54
+ $line : ($radius * 6);
55
+ $input : 14px;
56
+
57
+ // map-get($query,max599)
58
+
59
+ $NavBorder: 1px solid darken(map-get($color,smoke),10%);
@@ -1,22 +1,21 @@
1
1
 
2
- .title.overlay {
3
-
4
- &.about {
5
- border-bottom: 2px solid $gun;
6
- }
2
+ %TitleOverlay {
3
+ border-bottom: 2px solid map-get($color,gun);
4
+ }
7
5
 
8
- &.browse {
9
- border-bottom: 2px solid $gun;
10
- }
6
+ .title.overlay-about {
7
+ @extend %TitleOverlay;
8
+ }
11
9
 
12
- &.search {
13
- border-bottom: 2px solid $gun;
14
- }
10
+ .title.overlay-browse {
11
+ @extend %TitleOverlay;
12
+ }
15
13
 
16
- &.load {
17
- @extend %bold;
18
- text-transform: uppercase;
19
- font-size: 4.8rem;
20
- color: red;
21
- }
14
+ .title.overlay-search {
15
+ @extend %TitleOverlay;
16
+ grid-template-columns: auto 54px;
17
+ fill: map-get($color,gun);
18
+ grid-column-gap: 8px;
19
+ align-self: center;
20
+ display: grid;
22
21
  }
data/_sass/wrap/book.scss CHANGED
@@ -6,6 +6,6 @@
6
6
  }
7
7
 
8
8
  svg {
9
- fill: $smoke;
9
+ fill: map-get($color,smoke);
10
10
  }
11
11
  }
@@ -0,0 +1,26 @@
1
+
2
+ .wrap.browse-block {
3
+ grid-template-columns: 280px 280px;
4
+ min-height: 264px;
5
+ display: grid;
6
+ }
7
+
8
+ .wrap.browse-block a {
9
+ text-decoration: none;
10
+ }
11
+
12
+ .wrap.browse-block.install-library {
13
+ grid-template-columns: 160px 200px 200px;
14
+ }
15
+
16
+ %WrapBrowse {
17
+ border-right: 2px solid map-get($color,gun);
18
+ }
19
+
20
+ .wrap.browse-book {
21
+ @extend %WrapBrowse;
22
+ }
23
+
24
+ .wrap.browse-chapter {
25
+ @extend %WrapBrowse;
26
+ }
@@ -1,10 +1,20 @@
1
1
 
2
2
  .wrap.type-chapter {
3
- @extend %wrap_grid;
3
+ @extend %PagePosition;
4
+ padding: 112px 0 56px 556px;
4
5
  background-color: black;
5
6
  color: white;
6
7
 
8
+ .block.stop {
9
+ top: -192px;
10
+ }
11
+
7
12
  + .wrap.type-page {
8
13
  margin-top: 20px;
9
14
  }
10
15
  }
16
+
17
+ .wrap.type-chapter.style-docs {
18
+ padding: 20px;
19
+ height: auto;
20
+ }
@@ -1,5 +1,58 @@
1
1
 
2
- .wrap.overlay {
2
+ %WrapOverlay {
3
+ padding-bottom: 100px;
4
+ padding-top: 100px;
3
5
  position: relative;
4
6
  z-index: 2;
7
+
8
+ &.legacy {
9
+ @include ib;
10
+ width: 80%;
11
+ }
12
+
13
+ &:not(.legacy) {
14
+ grid-column: 2 / 3;
15
+ align-self: center;
16
+ }
17
+ }
18
+
19
+ .wrap.overlay-load {
20
+ @extend %WrapOverlay;
21
+ max-width: 320px;
22
+
23
+ svg {
24
+ display: none;
25
+ }
26
+ }
27
+
28
+ .wrap.overlay-mobile {
29
+ @extend %WrapOverlay;
30
+ font-size: 2.0rem;
31
+ max-width: 320px;
32
+
33
+ p + .box.mobile {
34
+ margin-top: 20px;
35
+ }
36
+ }
37
+
38
+ .wrap.overlay-about {
39
+ @extend %WrapOverlay;
40
+
41
+ h4 + p, p + p {
42
+ margin-top: 20px;
43
+ }
44
+ }
45
+
46
+ .wrap.overlay-browse {
47
+ @extend %WrapOverlay;
48
+
49
+ &:not(.legacy) {
50
+ @extend %GridOverlay;
51
+ }
52
+ }
53
+
54
+ .wrap.overlay-search {
55
+ @extend %WrapOverlay;
56
+ align-content: center;
57
+ display: grid;
5
58
  }
data/_sass/wrap/page.scss CHANGED
@@ -1,6 +1,12 @@
1
1
 
2
2
  .wrap.type-page {
3
- @extend %wrap_grid;
3
+ @extend %PagePosition;
4
+ padding: 56px 120px 56px 160px;
5
+ background-color: white;
6
+
7
+ .block.stop {
8
+ top: -136px;
9
+ }
4
10
 
5
11
  + .wrap.type-page {
6
12
  margin-top: 20px;
@@ -10,3 +16,14 @@
10
16
  margin-top: 100px;
11
17
  }
12
18
  }
19
+
20
+ .wrap.type-page.style-docs {
21
+ padding: 20px;
22
+ height: auto;
23
+ }
24
+
25
+ .wrap.type-page.in-topic {
26
+ align-content: center;
27
+ padding-left: 120px;
28
+ display: grid;
29
+ }
@@ -1,5 +1,5 @@
1
1
 
2
2
  .wrap.scroller {
3
- @extend %wrap_grid;
3
+ grid-column: 2 / 3;
4
4
  grid-gap: 10px;
5
5
  }
@@ -1,21 +1,19 @@
1
1
 
2
2
  const ActiveBook = () => {
3
3
 
4
- if (!$(body).hasClass("type-home")) {
5
- let list = $(body)[0].classList,
6
- active = "";
4
+ if (!BodyIsHome) {
5
+ let active = '';
7
6
 
8
- $(list).each(function(i,val) {
9
- if (val.startsWith("book-")) {
10
- active = val.slice(5);
11
- gsap.set(Site.topbar.lnk + "." + active,{ borderBottom : "3px solid" });
7
+ $(BodyClasses).each(function(index,value) {
8
+ if (value.startsWith("book-")) {
9
+ active = value.slice(5);
10
+ let target = $("button", Site.topbar.lnk + "." + active);
11
+ gsap.set(target,{ borderBottom : "3px solid" });
12
12
  }
13
13
  });
14
14
  }
15
15
  }
16
16
 
17
- $(function() {
18
- if(Config.install != "theme") {
19
- $(ActiveBook);
20
- }
21
- });
17
+ if(!SiteIsTheme) {
18
+ $(ActiveBook);
19
+ }
@@ -0,0 +1,11 @@
1
+
2
+ $('.item.scroller').each(function(index,value){
3
+ let label = $(value)[0].classList[2],
4
+ trigger = `#${label}-${label}`,
5
+ tween = `.item.scroller.${label}`,
6
+ scene = new ScrollMagic
7
+ .Scene({ triggerElement : trigger })
8
+ .setTween(tween,0.1,{ opacity : 1 })
9
+ .addTo(controller);
10
+ return scene;
11
+ });
@@ -1,69 +1,69 @@
1
1
 
2
- const ChangeScreen = (i,val,state) => {
2
+ const ChangeScreen = (index,value,state) => {
3
3
 
4
4
  if (state == "close") {
5
5
  gsap.set(body,{ clearProps : "overflow" });
6
- gsap.set(".overlay." + Overlay.custom[i].name, { clearProps : "display" });
7
- Overlay.custom[i].open = false;
6
+ gsap.set(".area.overlay-" + Overlay.custom[index].name, { clearProps : "display" });
7
+ Overlay.custom[index].open = false;
8
8
  } else {
9
9
  gsap.set(body, { overflow : "hidden" });
10
- gsap.set(".overlay." + Overlay.custom[i].name, { display : Config.display });
11
- Overlay.custom[i].open = true;
10
+ gsap.set(".area.overlay-" + Overlay.custom[index].name, { display : Config.display });
11
+ Overlay.custom[index].open = true;
12
12
  }
13
13
  }
14
14
 
15
- const BuildScreens = (i,val) => {
16
- let button = Overlay.button + "." + val.name,
17
- exit = Overlay.exit + "." + val.name;
15
+ const BuildScreens = (index,value) => {
16
+ let button = Overlay.button + "." + value.name,
17
+ exit = Overlay.exit + "." + value.name;
18
18
 
19
19
  $(button).click(function() {
20
- ChangeScreen(i,val,"open");
20
+ ChangeScreen(index,value,"open");
21
21
  });
22
22
 
23
23
  $(exit).click(function() {
24
- ChangeScreen(i,val,"close");
24
+ ChangeScreen(index,value,"close");
25
25
  });
26
26
  }
27
27
 
28
28
  const KeyUp = e => {
29
29
 
30
30
  if (e.keyCode == 27) {
31
- $(Overlay.custom).each(function(i,val) {
32
- if (Overlay.custom[i].open) {
33
- ChangeScreen(i,val,"close");
31
+ $(Overlay.custom).each(function(index,value) {
32
+ if (Overlay.custom[index].open) {
33
+ ChangeScreen(index,value,"close");
34
34
  }
35
35
  });
36
36
  }
37
37
 
38
38
  if (e.keyCode == 65) {
39
- $(Overlay.custom).each(function(i,val) {
39
+ $(Overlay.custom).each(function(index,value) {
40
40
  if (!Overlay.custom[0].open) {
41
- ChangeScreen(0,val,"open");
41
+ ChangeScreen(0,value,"open");
42
42
  console.log(e.keyCode);
43
43
  }
44
44
  });
45
45
  }
46
46
 
47
47
  if (e.keyCode == 66) {
48
- $(Overlay.custom).each(function(i,val) {
48
+ $(Overlay.custom).each(function(index,value) {
49
49
  if (!Overlay.custom[1].open) {
50
- ChangeScreen(1,val,"open");
50
+ ChangeScreen(1,value,"open");
51
51
  }
52
52
  });
53
53
  }
54
54
 
55
55
  if (e.keyCode == 83) {
56
- $(Overlay.custom).each(function(i,val) {
56
+ $(Overlay.custom).each(function(index,value) {
57
57
  if (!Overlay.custom[2].open) {
58
- ChangeScreen(2,val,"open");
58
+ ChangeScreen(2,value,"open");
59
59
  }
60
60
  });
61
61
  }
62
62
  }
63
63
 
64
64
  $(function(){
65
- $(Overlay.custom).each(function(i,val) {
66
- BuildScreens(i,val);
65
+ $(Overlay.custom).each(function(index,value) {
66
+ BuildScreens(index,value);
67
67
  });
68
68
  });
69
69
 
@@ -0,0 +1,80 @@
1
+
2
+ const RespondBrowse = () => {
3
+
4
+ BookLinks.hover(function(e) {
5
+
6
+ CreateMatch(this);
7
+
8
+ gsap.set(BookLinks,ClearBackground);
9
+
10
+ gsap.set(this,BackgroundShade);
11
+
12
+ CheckBookClass(this);
13
+
14
+ ChapterBooks.each(function(index,value) {
15
+
16
+ CheckBookClass(value);
17
+
18
+ IfFound(value);
19
+
20
+ gsap.set(value.children,ClearBackground);
21
+
22
+ gsap.set(value.children[0],BackgroundShade);
23
+
24
+ });
25
+
26
+ PageBooks.each(function(index,value) {
27
+
28
+ CheckBookClass(value);
29
+
30
+ IfFound(value);
31
+
32
+ gsap.set(value.children,DisplayNone);
33
+
34
+ gsap.set(value.children[0],ClearDisplay);
35
+
36
+ gsap.set(value.children[0].children,ClearBackground);
37
+
38
+ gsap.set(value.children[0].children[0],BackgroundShade);
39
+
40
+ });
41
+
42
+ });
43
+
44
+ ChapterLinks.hover(function(e) {
45
+
46
+ let parent = this.parentElement;
47
+
48
+ CreateMatch(parent,"book");
49
+
50
+ CreateMatch(this,"chapter");
51
+
52
+ gsap.set(ChapterLinks,ClearBackground);
53
+
54
+ gsap.set(this,BackgroundShade);
55
+
56
+ PageChapters.each(function(index,value) {
57
+
58
+ CheckChapterClass(value);
59
+
60
+ IfFound(value);
61
+
62
+ gsap.set(value.children,ClearBackground);
63
+
64
+ gsap.set(value.children[0],BackgroundShade);
65
+
66
+ });
67
+
68
+ });
69
+
70
+ PageLinks.hover(function(e) {
71
+
72
+ gsap.set(PageLinks,ClearBackground);
73
+
74
+ gsap.set(this,BackgroundShade);
75
+
76
+ });
77
+
78
+ }
79
+
80
+ if (!SiteIsTheme) { if (!BodyIsHome) { if (Browseable) { RespondBrowse(); } } }
@@ -3,11 +3,15 @@ let body = "body",
3
3
  site = ".site",
4
4
  shade = "rgba(0,0,0,0.05)",
5
5
  controller = new ScrollMagic.Controller(),
6
- BrowseScreen;
6
+ Browseable,
7
+ BodyIsHome;
7
8
 
8
- if (Config.install != "theme") {
9
- BrowseScreen = Overlay.custom[1];
10
- BrowseScreen.data = $(BrowseScreen.chapter.col).children(BrowseScreen.chunk).children().length;
9
+ const BodyClasses = $(body)[0].classList;
10
+
11
+ if ($(body).hasClass("type-home")) {
12
+ BodyIsHome = true;
11
13
  }
12
14
 
13
- console.log('ready?');
15
+ if (!SiteIsTheme) {
16
+ Browseable = $(".wrap.type-page").length;
17
+ }
@@ -0,0 +1,115 @@
1
+
2
+ let SplitPath = window.location.pathname.split('/'),
3
+ BookLinks = $(".link.browse-book",".wrap.browse-book"),
4
+ ChapterBooks = $(".block.browse-book",".wrap.browse-chapter"),
5
+ ChapterLinks = $(".link.browse-chapter",".wrap.browse-chapter"),
6
+ PageBooks = $(".block.browse-book",".wrap.browse-page"),
7
+ PageChapters = $(".block.browse-chapter",".wrap.browse-page"),
8
+ PageLinks = $(".link.browse-page",".wrap.browse-page"),
9
+ BackgroundShade = { background : shade },
10
+ ClearDisplay = { clearProps : "display" },
11
+ ClearBackground = { clearProps : "background" },
12
+ DisplayNone = { display : "none" },
13
+ BookClass = "",
14
+ BookNotFound = true,
15
+ ChapterClass = "",
16
+ ChapterNotFound = true,
17
+ PageClass = "",
18
+ PageNotFound = true,
19
+ Found = "";
20
+
21
+ $(SplitPath).each(function(index,value) {
22
+
23
+ if (index == 1) {
24
+
25
+ let BookUrl = value; BookClass = 'book-' + BookUrl;
26
+
27
+ } else if (index == 2) {
28
+
29
+ let ChapterUrl = value; ChapterClass = 'chapter-' + ChapterUrl;
30
+
31
+ } else if (index == 3) {
32
+
33
+ let PageUrl = value; PageClass = 'title-' + PageUrl;
34
+
35
+ }
36
+
37
+ });
38
+
39
+ const StartsWith = (value,starts) => {
40
+
41
+ if (starts == "book") {
42
+
43
+ if (value.startsWith('book-')) { BookClass = value; }
44
+
45
+ } else {
46
+
47
+ if (value.startsWith('chapter-')) { ChapterClass = value; }
48
+
49
+ }
50
+
51
+ }
52
+
53
+ const CreateMatch = (value, starts = "book") => {
54
+
55
+ $(value.classList).each(function(index,value) {
56
+
57
+ StartsWith(value,starts);
58
+
59
+ });
60
+
61
+ }
62
+
63
+ const CheckBookClass = (value) => {
64
+
65
+ Found = false;
66
+
67
+ $(value.classList).each(function(index,value) {
68
+
69
+ if (value.startsWith('book-')) {
70
+
71
+ if (BookClass == value) { Found = true; BookNotFound = false; }
72
+
73
+ }
74
+
75
+ });
76
+
77
+ }
78
+
79
+ const CheckChapterClass = (value) => {
80
+
81
+ Found = false;
82
+
83
+ $(value.classList).each(function(index,value) {
84
+
85
+ if (value.startsWith('chapter-')) { if (ChapterClass == value) { Found = true; ChapterNotFound = false; } }
86
+
87
+ });
88
+
89
+ }
90
+
91
+ const CheckPageClass = (value) => {
92
+
93
+ Found = false;
94
+
95
+ $(value.classList).each(function(index,value) {
96
+
97
+ if (value.startsWith('title-')) { if (PageClass == value) { Found = true; PageNotFound = false; } }
98
+
99
+ });
100
+
101
+ }
102
+
103
+ const IfFound = (value) => {
104
+
105
+ if(Found) {
106
+
107
+ gsap.set(value,ClearDisplay);
108
+
109
+ } else {
110
+
111
+ gsap.set(value,DisplayNone);
112
+
113
+ }
114
+
115
+ }