futuro 0.9.7 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 871ee4e24bab413c379b9a2e88a7349a119ff012c3950d7d29e29bb844a8f8b4
4
- data.tar.gz: 2301f18a8dd225e68e9732bef05fdd832f92a35e5c53609a29ff606773353479
3
+ metadata.gz: 7faef02b932cf458c8f7e9575242e399d52496e50d2ec54263d751ada95a9d59
4
+ data.tar.gz: 227abe50196205041e802f04e819fb6ae124e791ea760bce1435a8581e45022d
5
5
  SHA512:
6
- metadata.gz: 96d8b9de7f2e8d1ab0d4da3ad06cd9ec012c93b604a080e00de50b9bf1f75579422977ed3139bce706e879d7e8ae8ef751d0c64e5e659c88546cf018aab8e4ef
7
- data.tar.gz: 8530e6446ddd5814f92c4c24ac890eda60b404e0d9fbdc8c3c8ae374c5eef4cfd431b437990b37345ba46969ff43615f9a3ada8130d0ae0b5c7718f9ca95596b
6
+ metadata.gz: fe7eca043f83a4145bf4adf84fcb22387d89d88a3e2750e7fec813b6ca9784231ed46402d06b002c0358cc0279925939c06aa6b6919c7c8c7ec53124e561e79d
7
+ data.tar.gz: 31e2100d224dae603fba53b51ce3161dfbb75540f3efbae712415dedf9aa0946c62e15d4595389ed17cfaaa7d4f5dfbdf557e143b0885d87ba2e310341761521
@@ -1,5 +1,6 @@
1
1
 
2
2
  .block.access-wrap {
3
+ @extend %bold;
3
4
  align-items: center;
4
5
  text-align: center;
5
6
  font-size: 1.6rem;
@@ -21,7 +21,7 @@
21
21
  cursor: pointer;
22
22
  }
23
23
 
24
- .block.util-share.type-chapter {
24
+ .block.util-share.type-chapter.style-page {
25
25
  justify-content: flex-end;
26
26
  direction: rtl;
27
27
  }
@@ -0,0 +1,42 @@
1
+
2
+ Artform.list = ["theatre","talks","music","classical","cinema","tours","hire","art"];
3
+
4
+ Artform.clear = parent => {
5
+ $(parent).attr("class","block header title-artform");
6
+
7
+ $(Page + ".title-artform").map((index,value) => {
8
+ Contrast.reset(value);
9
+ });
10
+ }
11
+
12
+ Artform.update = (parent, value) => {
13
+ $(parent).addClass("tag-" + value);
14
+
15
+ $(Page + ".title-artform").map((index,value) => {
16
+ Contrast.check(value,".block.header",".block.header");
17
+ });
18
+ }
19
+
20
+ Artform.header = () => {
21
+ let parent = ".header.title-artform",
22
+ tl = gsap.timeline({ repeat : -1 }),
23
+ speed = 1.5;
24
+
25
+ Artform.list.map((value) => {
26
+
27
+ tl
28
+ .set(parent,{
29
+ opacity : 1,
30
+ onComplete : () => {
31
+ Artform.update(parent,value);
32
+ }
33
+ })
34
+ .set(parent,{
35
+ clearProps : "all",
36
+ delay : speed,
37
+ onComplete : () => {
38
+ Artform.clear(parent);
39
+ }
40
+ });
41
+ });
42
+ }
@@ -8,7 +8,7 @@ const PrintWidth = () => {
8
8
  gsap.set(Overlay.mobile.bar,{width:percent});
9
9
  }
10
10
 
11
- const CheckWidth = () => {
11
+ Check.width = () => {
12
12
  if (!Site.desktop.active) {
13
13
  gsap.set(site,{ clearProps : "display" });
14
14
  gsap.set(Overlay.mobile.screen,{ display : Config.display });
@@ -20,6 +20,6 @@ const CheckWidth = () => {
20
20
  }
21
21
 
22
22
  if (!Config.respond) {
23
- $(CheckWidth);
24
- $(window).resize(CheckWidth);
23
+ $(Check.width());
24
+ $(window).resize(Check.width());
25
25
  }
@@ -1,22 +1,33 @@
1
1
 
2
- const Round = number => {
2
+ Contrast.reset = value => {
3
+
4
+ let Target = {
5
+ ratio : $(value).find(Site.access.ratio)
6
+ };
7
+
8
+ $(Target.ratio).attr("class","block access-ratio");
9
+ }
10
+
11
+ Contrast.round = number => {
3
12
  return Math.round(number * 100) / 100
4
13
  }
5
14
 
6
- const Ratio = (color,backg) => {
7
- return Round(tinycolor.readability(color,backg));
15
+ Contrast.ratio = (color,backg) => {
16
+ return Contrast.round(tinycolor.readability(color,backg));
8
17
  }
9
18
 
10
- const CheckContrast = (value,color,backg) => {
19
+ Contrast.check = (value,color,backg) => {
11
20
 
12
21
  let Target = {
13
22
  ratio : $(value).find(Site.access.ratio),
14
23
  color : tinycolor($(color,value).css('color')).toHexString(),
15
24
  backg : tinycolor($(backg,value).css('background-color')).toHexString()
25
+ },
26
+
27
+ Result = {
28
+ ratio : Contrast.ratio(Target.color,Target.backg)
16
29
  };
17
30
 
18
- let Result = { ratio : Ratio(Target.color,Target.backg) };
19
-
20
31
  $(Target.ratio).text(Result.ratio);
21
32
 
22
33
  if (Result.ratio >= 4.5) {
@@ -32,12 +43,4 @@ const CheckContrast = (value,color,backg) => {
32
43
  $(Target.ratio).addClass(Site.access.poor);
33
44
 
34
45
  }
35
- }
36
-
37
- const ResetContrast = value => {
38
-
39
- let Target = { ratio : $(value).find(Site.access.ratio) };
40
-
41
- $(Target.ratio).attr("class","block access-ratio");
42
-
43
- }
46
+ }
@@ -1,5 +1,5 @@
1
1
 
2
- const RespondBrowse = () => {
2
+ Respond.browse = () => {
3
3
 
4
4
  BookLinks.hover(function(e) {
5
5
 
@@ -9,11 +9,11 @@ const RespondBrowse = () => {
9
9
 
10
10
  gsap.set(this,BackgroundShade);
11
11
 
12
- CheckBookClass(this);
12
+ Check.book.class(this);
13
13
 
14
14
  ChapterBooks.each(function(index,value) {
15
15
 
16
- CheckBookClass(value);
16
+ Check.book.class(value);
17
17
 
18
18
  IfFound(value);
19
19
 
@@ -25,7 +25,7 @@ const RespondBrowse = () => {
25
25
 
26
26
  PageBooks.each(function(index,value) {
27
27
 
28
- CheckBookClass(value);
28
+ Check.book.class(value);
29
29
 
30
30
  IfFound(value);
31
31
 
@@ -55,7 +55,7 @@ const RespondBrowse = () => {
55
55
 
56
56
  PageChapters.each(function(index,value) {
57
57
 
58
- CheckChapterClass(value);
58
+ Check.chapter.class(value);
59
59
 
60
60
  IfFound(value);
61
61
 
@@ -77,4 +77,4 @@ const RespondBrowse = () => {
77
77
 
78
78
  }
79
79
 
80
- if (!SiteIsTheme) { if (!BodyIsHome) { if (Browseable) { RespondBrowse(); } } }
80
+ if (!SiteIsTheme) { if (!BodyIsHome) { if (Browseable) { Respond.browse(); } } }
@@ -6,6 +6,19 @@ let body = "body",
6
6
  Browseable,
7
7
  BodyIsHome;
8
8
 
9
+ let Start = {},
10
+ Setup = {},
11
+ Share = {},
12
+ Check = {},
13
+ Artform = {},
14
+ Contrast = {},
15
+ Respond = {},
16
+ Util = {};
17
+
18
+ Check.book = {};
19
+ Check.chapter = {};
20
+ Check.page = {};
21
+
9
22
  const BodyClasses = $(body)[0].classList;
10
23
 
11
24
  if ($(body).hasClass("type-home")) {
@@ -60,7 +60,7 @@ const CreateMatch = (value, starts = "book") => {
60
60
 
61
61
  }
62
62
 
63
- const CheckBookClass = (value) => {
63
+ Check.book.class = value => {
64
64
 
65
65
  Found = false;
66
66
 
@@ -76,7 +76,7 @@ const CheckBookClass = (value) => {
76
76
 
77
77
  }
78
78
 
79
- const CheckChapterClass = (value) => {
79
+ Check.chapter.class = value => {
80
80
 
81
81
  Found = false;
82
82
 
@@ -88,7 +88,7 @@ const CheckChapterClass = (value) => {
88
88
 
89
89
  }
90
90
 
91
- const CheckPageClass = (value) => {
91
+ Check.page.class = value => {
92
92
 
93
93
  Found = false;
94
94
 
@@ -1,5 +1,5 @@
1
1
 
2
- const SetupHome = () => {
2
+ Setup.home = () => {
3
3
 
4
4
  let tl = gsap.timeline({
5
5
  repeat : -1,
@@ -32,4 +32,4 @@ const SetupHome = () => {
32
32
 
33
33
  }
34
34
 
35
- if (SiteIsLibrary) { if (BodyIsHome) { $(SetupHome); } }
35
+ if (SiteIsLibrary) { if (BodyIsHome) { $(Setup.home()); } }
@@ -1,9 +1,9 @@
1
1
 
2
- const StartBrowse = () => {
2
+ Start.browse = () => {
3
3
 
4
4
  BookLinks.each(function(index,value) {
5
5
 
6
- CheckBookClass(value);
6
+ Check.book.class(value);
7
7
 
8
8
  if (Found) {
9
9
 
@@ -15,7 +15,7 @@ const StartBrowse = () => {
15
15
 
16
16
  ChapterBooks.each(function(index,value) {
17
17
 
18
- CheckBookClass(value);
18
+ Check.book.class(value);
19
19
 
20
20
  if (Found) {
21
21
 
@@ -23,7 +23,7 @@ const StartBrowse = () => {
23
23
 
24
24
  $(value.children).each(function(index,value) {
25
25
 
26
- CheckChapterClass(value);
26
+ Check.chapter.class(value);
27
27
 
28
28
  if (Found) {
29
29
 
@@ -49,7 +49,7 @@ const StartBrowse = () => {
49
49
 
50
50
  PageBooks.each(function(index,value) {
51
51
 
52
- CheckBookClass(value);
52
+ Check.book.class(value);
53
53
 
54
54
  if(Found) {
55
55
 
@@ -57,7 +57,7 @@ const StartBrowse = () => {
57
57
 
58
58
  $(value.children).each(function(index,value) {
59
59
 
60
- CheckChapterClass(value);
60
+ Check.chapter.class(value);
61
61
 
62
62
  if (Found) {
63
63
 
@@ -65,7 +65,7 @@ const StartBrowse = () => {
65
65
 
66
66
  $(value.children).each(function(index,value) {
67
67
 
68
- CheckPageClass(value);
68
+ Check.page.class(value);
69
69
 
70
70
  if (Found) {
71
71
 
@@ -107,4 +107,4 @@ const StartBrowse = () => {
107
107
 
108
108
  }
109
109
 
110
- if (!SiteIsTheme) { if (!BodyIsHome) { if (Browseable) { StartBrowse(); } } }
110
+ if (!SiteIsTheme) { if (!BodyIsHome) { if (Browseable) { Start.browse(); } } }
@@ -1,50 +1,19 @@
1
1
 
2
- const UtilCopy = str => {
2
+ Util.copy = string => {
3
3
  const el = document.createElement('textarea');
4
- el.value = str;
4
+ el.value = string;
5
5
  document.body.appendChild(el);
6
6
  el.select();
7
7
  document.execCommand('copy');
8
8
  document.body.removeChild(el);
9
9
  }
10
10
 
11
- // const UtilShare = e => {
12
- // let ting = $(e.target).parents(Site.page.share),
13
- // type = $(ting)[0].classList[2],
14
- // url = $(ting).children(Site.page.url).text().replace('index',''),
15
- // title = $(ting)[0].children[1],
16
- // tl = gsap.timeline(),
17
- // reset = '';
18
-
19
- // console.log(e);
20
-
21
-
22
- // if (type == 'page') {
23
- // reset = 'Copy page';
24
- // }
25
-
26
- // UtilCopy(url);
27
-
28
- // tl
29
- // .set(title,{
30
- // text : 'Copied!'
31
- // })
32
- // .to(title,{
33
- // duration : 0.3,
34
- // opacity : 0
35
- // },'+=0.6')
36
- // .set(title,{
37
- // text : reset,
38
- // clearProps : 'all'
39
- // },'+=0.3');
40
- // }
41
-
42
- function UtilShare() {
43
- let target = $(this).parents(Site.page.share),
11
+ Util.share = function(ting) {
12
+ let target = $(ting).parents(Site.page.share),
44
13
  getUrl = $(target.context).find(Site.page.url).text(),
45
14
  tl = gsap.timeline(),
46
15
  type = "";
47
- getUrl = getUrl.replace("waldo","");
16
+ getUrl = getUrl.replace("index","");
48
17
 
49
18
  $(target.context.classList).map((index,value)=>{
50
19
  if (value.includes("type-")) {
@@ -52,21 +21,80 @@ function UtilShare() {
52
21
  }
53
22
  });
54
23
 
55
- UtilCopy(getUrl);
24
+ Util.copy(getUrl);
25
+ }
26
+
27
+ // const UtilCopy = str => {
28
+ // const el = document.createElement('textarea');
29
+ // el.value = str;
30
+ // document.body.appendChild(el);
31
+ // el.select();
32
+ // document.execCommand('copy');
33
+ // document.body.removeChild(el);
34
+ // }
35
+
36
+ // // const UtilShare = e => {
37
+ // // let ting = $(e.target).parents(Site.page.share),
38
+ // // type = $(ting)[0].classList[2],
39
+ // // url = $(ting).children(Site.page.url).text().replace('index',''),
40
+ // // title = $(ting)[0].children[1],
41
+ // // tl = gsap.timeline(),
42
+ // // reset = '';
56
43
 
57
- // tl
58
- // .set(title,{
59
- // text : 'Copied!'
60
- // })
61
- // .to(title,{
62
- // duration : 0.3,
63
- // opacity : 0
64
- // },'+=0.6')
65
- // .set(title,{
66
- // text : reset,
67
- // clearProps : 'all'
68
- // },'+=0.3');
44
+ // // console.log(e);
45
+
46
+
47
+ // // if (type == 'page') {
48
+ // // reset = 'Copy page';
49
+ // // }
50
+
51
+ // // UtilCopy(url);
52
+
53
+ // // tl
54
+ // // .set(title,{
55
+ // // text : 'Copied!'
56
+ // // })
57
+ // // .to(title,{
58
+ // // duration : 0.3,
59
+ // // opacity : 0
60
+ // // },'+=0.6')
61
+ // // .set(title,{
62
+ // // text : reset,
63
+ // // clearProps : 'all'
64
+ // // },'+=0.3');
65
+ // // }
66
+
67
+ // function UtilShare() {
68
+ // let target = $(this).parents(Site.page.share),
69
+ // getUrl = $(target.context).find(Site.page.url).text(),
70
+ // tl = gsap.timeline(),
71
+ // type = "";
72
+ // getUrl = getUrl.replace("index","");
73
+
74
+ // console.log("Util runs!");
75
+
76
+
77
+ // $(target.context.classList).map((index,value)=>{
78
+ // if (value.includes("type-")) {
79
+ // type = value;
80
+ // }
81
+ // });
82
+
83
+ // UtilCopy(getUrl);
84
+
85
+ // // tl
86
+ // // .set(title,{
87
+ // // text : 'Copied!'
88
+ // // })
89
+ // // .to(title,{
90
+ // // duration : 0.3,
91
+ // // opacity : 0
92
+ // // },'+=0.6')
93
+ // // .set(title,{
94
+ // // text : reset,
95
+ // // clearProps : 'all'
96
+ // // },'+=0.3');
69
97
 
70
- }
98
+ // }
71
99
 
72
- if (!SiteIsTheme) { if (SiteIsShareable) { $(Site.page.share).click(UtilShare); }}
100
+ // // if (!SiteIsTheme) { if (SiteIsShareable) { $(Site.page.share).click(UtilShare); }}
@@ -1 +1 @@
1
- "use strict";var Browseable,BodyIsHome,body="body",site=".site",shade="rgba(0,0,0,0.05)",controller=new ScrollMagic.Controller,BodyClasses=$(body)[0].classList;$(body).hasClass("type-home")&&(BodyIsHome=!0),SiteIsTheme||(Browseable=$(".wrap.type-page").length);var PrintWidth=function(){var e=$(document)[0].documentElement.clientWidth,o=Site.desktop.width-e+"px",a=100/Site.desktop.width*e+"%";$(".width").html(o),gsap.set(Overlay.mobile.bar,{width:a})},CheckWidth=function(){Site.desktop.active?(gsap.set(Overlay.mobile.screen,{clearProps:"display"}),gsap.set(site,{display:Config.display})):(gsap.set(site,{clearProps:"display"}),gsap.set(Overlay.mobile.screen,{display:Config.display}),PrintWidth())};Config.respond||($(CheckWidth),$(window).resize(CheckWidth));var SplitPath=window.location.pathname.split("/"),BookLinks=$(".link.browse-book",".wrap.browse-book"),ChapterBooks=$(".block.browse-book",".wrap.browse-chapter"),ChapterLinks=$(".link.browse-chapter",".wrap.browse-chapter"),PageBooks=$(".block.browse-book",".wrap.browse-page"),PageChapters=$(".block.browse-chapter",".wrap.browse-page"),PageLinks=$(".link.browse-page",".wrap.browse-page"),BackgroundShade={background:shade},ClearDisplay={clearProps:"display"},ClearBackground={clearProps:"background"},DisplayNone={display:"none"},BookClass="",BookNotFound=!0,ChapterClass="",ChapterNotFound=!0,PageClass="",PageNotFound=!0,Found="";$(SplitPath).each(function(e,o){if(1==e)BookClass="book-"+o;else if(2==e){ChapterClass="chapter-"+o}else if(3==e){PageClass="title-"+o}});var StartsWith=function(e,o){"book"==o?e.startsWith("book-")&&(BookClass=e):e.startsWith("chapter-")&&(ChapterClass=e)},CreateMatch=function(e,o){var a=1<arguments.length&&void 0!==o?o:"book";$(e.classList).each(function(e,o){StartsWith(o,a)})},CheckBookClass=function(e){Found=!1,$(e.classList).each(function(e,o){o.startsWith("book-")&&BookClass==o&&(BookNotFound=!(Found=!0))})},CheckChapterClass=function(e){Found=!1,$(e.classList).each(function(e,o){o.startsWith("chapter-")&&ChapterClass==o&&(ChapterNotFound=!(Found=!0))})},CheckPageClass=function(e){Found=!1,$(e.classList).each(function(e,o){o.startsWith("title-")&&PageClass==o&&(PageNotFound=!(Found=!0))})},IfFound=function(e){Found?gsap.set(e,ClearDisplay):gsap.set(e,DisplayNone)},Round=function(e){return Math.round(100*e)/100},Ratio=function(e,o){return Round(tinycolor.readability(e,o))},CheckContrast=function(e,o,a){var t={ratio:$(e).find(Site.access.ratio),color:tinycolor($(o,e).css("color")).toHexString(),backg:tinycolor($(a,e).css("background-color")).toHexString()},s={ratio:Ratio(t.color,t.backg)};$(t.ratio).text(s.ratio),4.5<=s.ratio?$(t.ratio).addClass(Site.access.best):3<=s.ratio?$(t.ratio).addClass(Site.access.good):$(t.ratio).addClass(Site.access.poor)},ResetContrast=function(e){var o={ratio:$(e).find(Site.access.ratio)};$(o.ratio).attr("class","block access-ratio")},ActiveBook=function(){if(!BodyIsHome){var t="";$(BodyClasses).map(function(e,o){if(o.startsWith("book-")){t=o.slice(5);var a=$("button",Site.topbar.lnk+"."+t);gsap.set(a,{borderBottom:"3px solid"})}})}};SiteIsTheme||$(ActiveBook),$(".item.scroller").each(function(e,o){var a=$(o)[0].classList[2],t="#".concat(a,"-").concat(a),s=".item.scroller.".concat(a);return new ScrollMagic.Scene({triggerElement:t}).setTween(s,.1,{opacity:1}).addTo(controller)});var ArtformHeader=function(){var o=".header.title-artform",a=gsap.timeline({repeat:-1});["theatre","talks","music","classical","cinema","tours","hire","art"].map(function(e){a.set(o,{opacity:1,onComplete:function(){$(o).addClass("tag-"+e),$(Page+".title-artform").map(function(e,o){CheckContrast(o,".block.header",".block.header")})}}).set(o,{clearProps:"all",delay:1.5,onComplete:function(){$(o).attr("class","block header title-artform"),$(Page+".title-artform").map(function(e,o){ResetContrast(e,o,".block.header",".block.header")})}})})},ChangeScreen=function(e,o,a){var t=Overlay.custom[e],s=".area.overlay-"+t.name,n=$(".input.text-search"),r=$(".wrap.results");"close"==a?(gsap.set(body,{clearProps:"overflow"}),gsap.set(s,{clearProps:"display"}),t.open=!1,"search"==o.name&&(n.val(""),r.empty())):(gsap.set(body,{overflow:"hidden"}),gsap.set(s,{display:Config.display}),t.open=!0,"search"==o.name&&n.focus())},BuildScreens=function(e,o){var a=Overlay.button+"."+o.name,t=Overlay.exit+"."+o.name;$(a).click(function(){ChangeScreen(e,o,"open")}),$(t).click(function(){ChangeScreen(e,o,"close")})},KeyUp=function(a){$(Overlay.custom).map(function(e,o){o.open&&27==a.keyCode&&ChangeScreen(e,o,"close"),o.open||SiteInFocus||(65==a.keyCode&&"about"==o.name&&ChangeScreen(e,o,"open"),66==a.keyCode&&"browse"==o.name&&ChangeScreen(e,o,"open"),83==a.keyCode&&"search"==o.name&&ChangeScreen(e,o,"open"))})};$(Overlay.custom).map(function(e,o){BuildScreens(e,o)}),$(document).keyup(function(e){KeyUp(e)});var RespondBrowse=function(){BookLinks.hover(function(e){CreateMatch(this),gsap.set(BookLinks,ClearBackground),gsap.set(this,BackgroundShade),CheckBookClass(this),ChapterBooks.each(function(e,o){CheckBookClass(o),IfFound(o),gsap.set(o.children,ClearBackground),gsap.set(o.children[0],BackgroundShade)}),PageBooks.each(function(e,o){CheckBookClass(o),IfFound(o),gsap.set(o.children,DisplayNone),gsap.set(o.children[0],ClearDisplay),gsap.set(o.children[0].children,ClearBackground),gsap.set(o.children[0].children[0],BackgroundShade)})}),ChapterLinks.hover(function(e){var o=this.parentElement;CreateMatch(o,"book"),CreateMatch(this,"chapter"),gsap.set(ChapterLinks,ClearBackground),gsap.set(this,BackgroundShade),PageChapters.each(function(e,o){CheckChapterClass(o),IfFound(o),gsap.set(o.children,ClearBackground),gsap.set(o.children[0],BackgroundShade)})}),PageLinks.hover(function(e){gsap.set(PageLinks,ClearBackground),gsap.set(this,BackgroundShade)})};SiteIsTheme||BodyIsHome||Browseable&&RespondBrowse();var SetupHome=function(){gsap.timeline({repeat:-1,yoyo:!0,defaults:{ease:"sine.inOut"}}).fromTo(".link.book",{y:-5},{duration:1,y:5}),$(".wrap.book").hover(function(){gsap.to(this,{duration:.1,y:-20})},function(){gsap.to(this,{duration:.1,y:0})})};SiteIsLibrary&&BodyIsHome&&$(SetupHome);var SiteFunc=function(){Config.respond?gsap.set(site,{display:Config.display}):Site.mobile.active||gsap.set(site,{display:Config.display}),setTimeout(function(){gsap.set(Overlay.load.screen,{clearProps:"display"}),SiteTl.pause()},1e3)};$(SiteFunc),$(window).resize(SiteFunc);var SmoothScroll=function(){$('a[href*="#"]').not('[href="#"]').not('[href="#0"]').click(function(e){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var o=$(this.hash);(o=o.length?o:$("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),$("html, body").animate({scrollTop:o.offset().top},500,function(){var e=$(o);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()}))}})};$(SmoothScroll);var StartBrowse=function(){BookLinks.each(function(e,o){CheckBookClass(o),Found&&gsap.set(o,BackgroundShade)}),ChapterBooks.each(function(e,o){CheckBookClass(o),Found?(gsap.set(o,ClearDisplay),$(o.children).each(function(e,o){CheckChapterClass(o),Found&&gsap.set(o,BackgroundShade)}),ChapterNotFound&&gsap.set(o.children[0],BackgroundShade)):gsap.set(o,DisplayNone)}),PageBooks.each(function(e,o){CheckBookClass(o),Found?(gsap.set(o,ClearDisplay),$(o.children).each(function(e,o){CheckChapterClass(o),Found?(gsap.set(o,ClearDisplay),$(o.children).each(function(e,o){CheckPageClass(o),Found&&gsap.set(o,BackgroundShade)}),PageNotFound&&gsap.set(o.children[0],BackgroundShade)):gsap.set(o,DisplayNone)}),ChapterNotFound&&(gsap.set(o.children[0],ClearDisplay),gsap.set(o.children[0].children[0],BackgroundShade))):gsap.set(o,DisplayNone)})};SiteIsTheme||BodyIsHome||Browseable&&StartBrowse();var Button={target:".button-wrap.switch-button"},ButtonSwitch=function(e,o){var a=$(e.target),t=a.siblings(".button-bg"),s=a.parent(),n={dis:{before:$(s).siblings(".before"),after:$(s).siblings(".after")},dat:{before:$(s).parent().siblings().children(".before"),after:$(s).parent().siblings().children(".after")}},r=[n.dis.before,n.dat.before],i=[n.dis.after,n.dat.after];if(s.hasClass("undo"))"down"===o?gsap.set([s,t],{clearProps:"all"}):"up"===o&&($(s).removeClass("undo"),gsap.set([r,i],{clearProps:"all"}),gsap.set(a,{text:"Next"}));else if("down"===o)gsap.set([s,t],{scale:.95});else if("up"===o){gsap.timeline().to(r,{duration:.2,opacity:0}).set([s,t],{backgroundColor:Color.green}).set(a,{text:"Undo"}).set(r,{display:"none"}).set(i,{display:"block"}).to(t,{duration:.5,scaleX:1.2,scaleY:1.3,opacity:0}).call(function(){$(s).addClass("undo")})}};$(Button.target).mousedown(function(e){ButtonSwitch(e,"down")}).mouseup(function(e){ButtonSwitch(e,"up")});var FocusInputs=["input","textarea"],SetFocus=function(e){SiteInFocus=e};FocusInputs.map(function(e){$(e).focusin(function(){SetFocus(!0)}).focusout(function(){SetFocus(!1)})});var UtilCopy=function(e){var o=document.createElement("textarea");o.value=e,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)};function UtilShare(){var e=$(this).parents(Site.page.share),o=$(e.context).find(Site.page.url).text();gsap.timeline();o=o.replace("waldo",""),$(e.context.classList).map(function(e,o){o.includes("type-")&&0}),UtilCopy(o)}SiteIsTheme||SiteIsShareable&&$(Site.page.share).click(UtilShare);var WhatsOn={speed:function(e){return.03*e},slide:function(e){var o=$(".block.alert-content",e),a=$(".alert-feed",e),t=$(a).width()+100,s=$(".alert-clone",e);$(o).addClass("modify-grid");var n=gsap.timeline({defaults:{ease:"none"}}),r=gsap.timeline({repeat:-1,paused:!0,defaults:{ease:"none"}});r.to([a,s],{duration:WhatsOn.speed(t),x:-t}),n.to(o,{duration:WhatsOn.speed(20),paddingLeft:0}).call(function(){r.play()})},scroll:function(e){var o=$(".feed",e),a=$(o).height(),t=$(".clone",e);gsap.timeline({repeat:-1,defaults:{ease:"none"}}).to([o,t],{duration:WhatsOn.speed(a),y:-a})}},YouSaved=function(e){var o=$(".block.form-alert",e),a=tinycolor($(o).css("border-color")).toHexString(),t=tinycolor($(o).css("background-color")).toHexString();gsap.timeline({repeat:-1,repeatDelay:1.6}).set(o,{backgroundColor:tinycolor(t).darken(5),borderColor:tinycolor(a).darken(10)}).set(o,{clearProps:"all",delay:.2}).set(o,{backgroundColor:tinycolor(t).darken(5),borderColor:tinycolor(a).darken(10),delay:.2}).to(o,{backgroundColor:t,borderColor:a,duration:.8,delay:.2})};
1
+ "use strict";var Browseable,BodyIsHome,body="body",site=".site",shade="rgba(0,0,0,0.05)",controller=new ScrollMagic.Controller,Start={},Setup={},Share={},Check={},Artform={},Contrast={},Respond={},Util={};Check.book={},Check.chapter={},Check.page={};var BodyClasses=$(body)[0].classList;$(body).hasClass("type-home")&&(BodyIsHome=!0),SiteIsTheme||(Browseable=$(".wrap.type-page").length);var PrintWidth=function(){var e=$(document)[0].documentElement.clientWidth,o=Site.desktop.width-e+"px",t=100/Site.desktop.width*e+"%";$(".width").html(o),gsap.set(Overlay.mobile.bar,{width:t})};Check.width=function(){Site.desktop.active?(gsap.set(Overlay.mobile.screen,{clearProps:"display"}),gsap.set(site,{display:Config.display})):(gsap.set(site,{clearProps:"display"}),gsap.set(Overlay.mobile.screen,{display:Config.display}),PrintWidth())},Config.respond||($(Check.width()),$(window).resize(Check.width()));var SplitPath=window.location.pathname.split("/"),BookLinks=$(".link.browse-book",".wrap.browse-book"),ChapterBooks=$(".block.browse-book",".wrap.browse-chapter"),ChapterLinks=$(".link.browse-chapter",".wrap.browse-chapter"),PageBooks=$(".block.browse-book",".wrap.browse-page"),PageChapters=$(".block.browse-chapter",".wrap.browse-page"),PageLinks=$(".link.browse-page",".wrap.browse-page"),BackgroundShade={background:shade},ClearDisplay={clearProps:"display"},ClearBackground={clearProps:"background"},DisplayNone={display:"none"},BookClass="",BookNotFound=!0,ChapterClass="",ChapterNotFound=!0,PageClass="",PageNotFound=!0,Found="";$(SplitPath).each(function(e,o){if(1==e)BookClass="book-"+o;else if(2==e){ChapterClass="chapter-"+o}else if(3==e){PageClass="title-"+o}});var StartsWith=function(e,o){"book"==o?e.startsWith("book-")&&(BookClass=e):e.startsWith("chapter-")&&(ChapterClass=e)},CreateMatch=function(e,o){var t=1<arguments.length&&void 0!==o?o:"book";$(e.classList).each(function(e,o){StartsWith(o,t)})};Check.book.class=function(e){Found=!1,$(e.classList).each(function(e,o){o.startsWith("book-")&&BookClass==o&&(BookNotFound=!(Found=!0))})},Check.chapter.class=function(e){Found=!1,$(e.classList).each(function(e,o){o.startsWith("chapter-")&&ChapterClass==o&&(ChapterNotFound=!(Found=!0))})},Check.page.class=function(e){Found=!1,$(e.classList).each(function(e,o){o.startsWith("title-")&&PageClass==o&&(PageNotFound=!(Found=!0))})};var IfFound=function(e){Found?gsap.set(e,ClearDisplay):gsap.set(e,DisplayNone)},ActiveBook=function(){if(!BodyIsHome){var a="";$(BodyClasses).map(function(e,o){if(o.startsWith("book-")){a=o.slice(5);var t=$("button",Site.topbar.lnk+"."+a);gsap.set(t,{borderBottom:"3px solid"})}})}};SiteIsTheme||$(ActiveBook),$(".item.scroller").each(function(e,o){var t=$(o)[0].classList[2],a="#".concat(t,"-").concat(t),s=".item.scroller.".concat(t);return new ScrollMagic.Scene({triggerElement:a}).setTween(s,.1,{opacity:1}).addTo(controller)}),Artform.list=["theatre","talks","music","classical","cinema","tours","hire","art"],Artform.clear=function(e){$(e).attr("class","block header title-artform"),$(Page+".title-artform").map(function(e,o){Contrast.reset(o)})},Artform.update=function(e,o){$(e).addClass("tag-"+o),$(Page+".title-artform").map(function(e,o){Contrast.check(o,".block.header",".block.header")})},Artform.header=function(){var o=".header.title-artform",t=gsap.timeline({repeat:-1});Artform.list.map(function(e){t.set(o,{opacity:1,onComplete:function(){Artform.update(o,e)}}).set(o,{clearProps:"all",delay:1.5,onComplete:function(){Artform.clear(o)}})})},Contrast.reset=function(e){var o={ratio:$(e).find(Site.access.ratio)};$(o.ratio).attr("class","block access-ratio")},Contrast.round=function(e){return Math.round(100*e)/100},Contrast.ratio=function(e,o){return Contrast.round(tinycolor.readability(e,o))},Contrast.check=function(e,o,t){var a={ratio:$(e).find(Site.access.ratio),color:tinycolor($(o,e).css("color")).toHexString(),backg:tinycolor($(t,e).css("background-color")).toHexString()},s={ratio:Contrast.ratio(a.color,a.backg)};$(a.ratio).text(s.ratio),4.5<=s.ratio?$(a.ratio).addClass(Site.access.best):3<=s.ratio?$(a.ratio).addClass(Site.access.good):$(a.ratio).addClass(Site.access.poor)};var ChangeScreen=function(e,o,t){var a=Overlay.custom[e],s=".area.overlay-"+a.name,n=$(".input.text-search"),r=$(".wrap.results");"close"==t?(gsap.set(body,{clearProps:"overflow"}),gsap.set(s,{clearProps:"display"}),a.open=!1,"search"==o.name&&(n.val(""),r.empty())):(gsap.set(body,{overflow:"hidden"}),gsap.set(s,{display:Config.display}),a.open=!0,"search"==o.name&&n.focus())},BuildScreens=function(e,o){var t=Overlay.button+"."+o.name,a=Overlay.exit+"."+o.name;$(t).click(function(){ChangeScreen(e,o,"open")}),$(a).click(function(){ChangeScreen(e,o,"close")})},KeyUp=function(t){$(Overlay.custom).map(function(e,o){o.open&&27==t.keyCode&&ChangeScreen(e,o,"close"),o.open||SiteInFocus||(65==t.keyCode&&"about"==o.name&&ChangeScreen(e,o,"open"),66==t.keyCode&&"browse"==o.name&&ChangeScreen(e,o,"open"),83==t.keyCode&&"search"==o.name&&ChangeScreen(e,o,"open"))})};$(Overlay.custom).map(function(e,o){BuildScreens(e,o)}),$(document).keyup(function(e){KeyUp(e)}),Respond.browse=function(){BookLinks.hover(function(e){CreateMatch(this),gsap.set(BookLinks,ClearBackground),gsap.set(this,BackgroundShade),Check.book.class(this),ChapterBooks.each(function(e,o){Check.book.class(o),IfFound(o),gsap.set(o.children,ClearBackground),gsap.set(o.children[0],BackgroundShade)}),PageBooks.each(function(e,o){Check.book.class(o),IfFound(o),gsap.set(o.children,DisplayNone),gsap.set(o.children[0],ClearDisplay),gsap.set(o.children[0].children,ClearBackground),gsap.set(o.children[0].children[0],BackgroundShade)})}),ChapterLinks.hover(function(e){var o=this.parentElement;CreateMatch(o,"book"),CreateMatch(this,"chapter"),gsap.set(ChapterLinks,ClearBackground),gsap.set(this,BackgroundShade),PageChapters.each(function(e,o){Check.chapter.class(o),IfFound(o),gsap.set(o.children,ClearBackground),gsap.set(o.children[0],BackgroundShade)})}),PageLinks.hover(function(e){gsap.set(PageLinks,ClearBackground),gsap.set(this,BackgroundShade)})},SiteIsTheme||BodyIsHome||Browseable&&Respond.browse(),Setup.home=function(){gsap.timeline({repeat:-1,yoyo:!0,defaults:{ease:"sine.inOut"}}).fromTo(".link.book",{y:-5},{duration:1,y:5}),$(".wrap.book").hover(function(){gsap.to(this,{duration:.1,y:-20})},function(){gsap.to(this,{duration:.1,y:0})})},SiteIsLibrary&&BodyIsHome&&$(Setup.home());var SiteFunc=function(){Config.respond?gsap.set(site,{display:Config.display}):Site.mobile.active||gsap.set(site,{display:Config.display}),setTimeout(function(){gsap.set(Overlay.load.screen,{clearProps:"display"}),SiteTl.pause()},1e3)};$(SiteFunc),$(window).resize(SiteFunc);var SmoothScroll=function(){$('a[href*="#"]').not('[href="#"]').not('[href="#0"]').click(function(e){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var o=$(this.hash);(o=o.length?o:$("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),$("html, body").animate({scrollTop:o.offset().top},500,function(){var e=$(o);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()}))}})};$(SmoothScroll),Start.browse=function(){BookLinks.each(function(e,o){Check.book.class(o),Found&&gsap.set(o,BackgroundShade)}),ChapterBooks.each(function(e,o){Check.book.class(o),Found?(gsap.set(o,ClearDisplay),$(o.children).each(function(e,o){Check.chapter.class(o),Found&&gsap.set(o,BackgroundShade)}),ChapterNotFound&&gsap.set(o.children[0],BackgroundShade)):gsap.set(o,DisplayNone)}),PageBooks.each(function(e,o){Check.book.class(o),Found?(gsap.set(o,ClearDisplay),$(o.children).each(function(e,o){Check.chapter.class(o),Found?(gsap.set(o,ClearDisplay),$(o.children).each(function(e,o){Check.page.class(o),Found&&gsap.set(o,BackgroundShade)}),PageNotFound&&gsap.set(o.children[0],BackgroundShade)):gsap.set(o,DisplayNone)}),ChapterNotFound&&(gsap.set(o.children[0],ClearDisplay),gsap.set(o.children[0].children[0],BackgroundShade))):gsap.set(o,DisplayNone)})},SiteIsTheme||BodyIsHome||Browseable&&Start.browse();var Button={target:".button-wrap.switch-button"},ButtonSwitch=function(e,o){var t=$(e.target),a=t.siblings(".button-bg"),s=t.parent(),n={dis:{before:$(s).siblings(".before"),after:$(s).siblings(".after")},dat:{before:$(s).parent().siblings().children(".before"),after:$(s).parent().siblings().children(".after")}},r=[n.dis.before,n.dat.before],i=[n.dis.after,n.dat.after];if(s.hasClass("undo"))"down"===o?gsap.set([s,a],{clearProps:"all"}):"up"===o&&($(s).removeClass("undo"),gsap.set([r,i],{clearProps:"all"}),gsap.set(t,{text:"Next"}));else if("down"===o)gsap.set([s,a],{scale:.95});else if("up"===o){gsap.timeline().to(r,{duration:.2,opacity:0}).set([s,a],{backgroundColor:Color.green}).set(t,{text:"Undo"}).set(r,{display:"none"}).set(i,{display:"block"}).to(a,{duration:.5,scaleX:1.2,scaleY:1.3,opacity:0}).call(function(){$(s).addClass("undo")})}};$(Button.target).mousedown(function(e){ButtonSwitch(e,"down")}).mouseup(function(e){ButtonSwitch(e,"up")});var FocusInputs=["input","textarea"],SetFocus=function(e){SiteInFocus=e};FocusInputs.map(function(e){$(e).focusin(function(){SetFocus(!0)}).focusout(function(){SetFocus(!1)})}),Util.copy=function(e){var o=document.createElement("textarea");o.value=e,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)},Util.share=function(e){var o=$(e).parents(Site.page.share),t=$(o.context).find(Site.page.url).text();gsap.timeline();t=t.replace("index",""),$(o.context.classList).map(function(e,o){o.includes("type-")&&0}),Util.copy(t)};var WhatsOn={speed:function(e){return.03*e},slide:function(e){var o=$(".block.alert-content",e),t=$(".alert-feed",e),a=$(t).width()+100,s=$(".alert-clone",e);$(o).addClass("modify-grid");var n=gsap.timeline({defaults:{ease:"none"}}),r=gsap.timeline({repeat:-1,paused:!0,defaults:{ease:"none"}});r.to([t,s],{duration:WhatsOn.speed(a),x:-a}),n.to(o,{duration:WhatsOn.speed(20),paddingLeft:0}).call(function(){r.play()})},scroll:function(e){var o=$(".feed",e),t=$(o).height(),a=$(".clone",e);gsap.timeline({repeat:-1,defaults:{ease:"none"}}).to([o,a],{duration:WhatsOn.speed(t),y:-t})}},YouSaved=function(e){var o=$(".block.form-alert",e),t=tinycolor($(o).css("border-color")).toHexString(),a=tinycolor($(o).css("background-color")).toHexString();gsap.timeline({repeat:-1,repeatDelay:1.6}).set(o,{backgroundColor:tinycolor(a).darken(5),borderColor:tinycolor(t).darken(10)}).set(o,{clearProps:"all",delay:.2}).set(o,{backgroundColor:tinycolor(a).darken(5),borderColor:tinycolor(t).darken(10),delay:.2}).to(o,{backgroundColor:a,borderColor:t,duration:.8,delay:.2})};
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: futuro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Heading
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-04 00:00:00.000000000 Z
11
+ date: 2020-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -301,11 +301,11 @@ files:
301
301
  - assets/fonts/230883_3_0.eot
302
302
  - assets/fonts/230883_3_0.ttf
303
303
  - assets/fonts/230883_3_0.woff
304
- - assets/js/footer/custom/Accessibility.js
305
304
  - assets/js/footer/custom/ActiveBook.js
306
305
  - assets/js/footer/custom/AnimateScroller.js
307
- - assets/js/footer/custom/ArtformHeader.js
306
+ - assets/js/footer/custom/Artform.js
308
307
  - assets/js/footer/custom/CheckWidth.js
308
+ - assets/js/footer/custom/Contrast.js
309
309
  - assets/js/footer/custom/Overlays.js
310
310
  - assets/js/footer/custom/RespondBrowse.js
311
311
  - assets/js/footer/custom/Settings.js
@@ -1,39 +0,0 @@
1
-
2
- const ArtformHeader = () => {
3
- let parent = ".header.title-artform",
4
- artform = ["theatre","talks","music","classical","cinema","tours","hire","art"],
5
- tl = gsap.timeline({ repeat : -1 }),
6
- speed = 1.5;
7
-
8
- artform.map((value) => {
9
-
10
- let updateArtform = () => {
11
- $(parent).addClass("tag-" + value);
12
-
13
- $(Page + ".title-artform").map((index,value) => {
14
- CheckContrast(value,".block.header",".block.header");
15
- });
16
- }
17
-
18
- let clearArtform = () => {
19
- $(parent).attr("class","block header title-artform");
20
-
21
- $(Page + ".title-artform").map((index,value) => {
22
- ResetContrast(index,value,".block.header",".block.header");
23
- });
24
- }
25
-
26
- tl
27
- .set(parent,{
28
- opacity : 1,
29
- onComplete : () => {
30
- updateArtform();
31
- }
32
- })
33
- .set(parent,{
34
- clearProps : "all",
35
- delay : speed,
36
- onComplete : clearArtform
37
- });
38
- });
39
- }