futuro 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/artwork/animal/flob.html +2 -0
  3. data/_includes/artwork/animal/flob.scss +5 -0
  4. data/_includes/artwork/animal/waldo.html +2 -0
  5. data/_includes/artwork/animal/waldo.scss +45 -0
  6. data/_includes/artwork/orwell/animal/flob.html +2 -0
  7. data/_includes/artwork/orwell/animal/flob.scss +5 -0
  8. data/_includes/artwork/orwell/animal/waldo.html +2 -0
  9. data/_includes/artwork/orwell/animal/waldo.scss +45 -0
  10. data/_includes/html/filter/loop.liquid +31 -0
  11. data/_includes/html/filter/type.liquid +31 -0
  12. data/_includes/html/head.liquid +3 -3
  13. data/_includes/html/loop/artwork/book.liquid +28 -0
  14. data/_includes/html/loop/artwork/docs.liquid +38 -0
  15. data/_includes/html/loop/search.liquid +16 -0
  16. data/_includes/html/overlay/about.liquid +5 -0
  17. data/_includes/html/overlay/browse.liquid +138 -0
  18. data/_includes/html/overlay/search.liquid +4 -4
  19. data/_includes/html/page/artwork.liquid +25 -0
  20. data/_includes/html/page/header.liquid +16 -0
  21. data/_includes/html/page/info.liquid +29 -0
  22. data/_includes/html/page/layout/chapter.liquid +32 -0
  23. data/_includes/html/page/layout/custom.liquid +19 -0
  24. data/_includes/html/page/layout/home.liquid +27 -0
  25. data/_includes/html/page/layout/page.liquid +45 -0
  26. data/_includes/html/page/layout/panel.liquid +14 -0
  27. data/_includes/html/page/layout/tree.liquid +14 -0
  28. data/_includes/html/page/subtitle.liquid +6 -0
  29. data/_includes/html/page/title.liquid +41 -0
  30. data/_includes/html/page/topbar.liquid +38 -0
  31. data/_includes/html/page/util.liquid +20 -0
  32. data/_includes/html/page/utils/author.liquid +5 -0
  33. data/_includes/html/page/utils/share.liquid +18 -0
  34. data/_includes/html/page/utils/update.liquid +5 -0
  35. data/_includes/html/scripts.liquid +2 -0
  36. data/_includes/svg/orwell/animal/icon.svg +8 -0
  37. data/_includes/svg/site/book/orwell.svg +1 -0
  38. data/_includes/svg/site/book/woolf.svg +1 -0
  39. data/_includes/svg/site/btn/about.svg +1 -0
  40. data/_includes/svg/site/btn/add.svg +11 -0
  41. data/_includes/svg/site/btn/author.svg +9 -0
  42. data/_includes/svg/site/btn/browse.svg +1 -0
  43. data/_includes/svg/site/btn/cart.svg +1 -0
  44. data/_includes/svg/site/btn/expand.svg +1 -0
  45. data/_includes/svg/site/btn/search.svg +1 -0
  46. data/_includes/svg/site/btn/share/chapter.svg +1 -0
  47. data/_includes/svg/site/btn/share/page.svg +1 -0
  48. data/_includes/svg/site/btn/update.svg +15 -0
  49. data/_layouts/feed.html +63 -0
  50. data/_layouts/mini.html +10 -0
  51. data/_layouts/single.html +55 -0
  52. data/_sass/_area.scss +35 -13
  53. data/_sass/_artwork.scss +59 -0
  54. data/_sass/_base.scss +38 -11
  55. data/_sass/_block.scss +162 -0
  56. data/_sass/_col.scss +31 -0
  57. data/_sass/_copy.scss +10 -0
  58. data/_sass/_exit.scss +1 -2
  59. data/_sass/_helpers.scss +15 -9
  60. data/_sass/_lnk.scss +39 -0
  61. data/_sass/_nav.scss +36 -0
  62. data/_sass/_normalize.scss +349 -0
  63. data/_sass/_overlay.scss +1 -2
  64. data/_sass/_slick.scss +125 -0
  65. data/_sass/_split.scss +15 -0
  66. data/_sass/_title.scss +27 -16
  67. data/_sass/_wrap.scss +17 -22
  68. data/_sass/futuro.scss +55 -0
  69. data/assets/img/fallback.jpg +0 -0
  70. data/assets/img/search.svg +1 -0
  71. data/assets/js/custom/_CheckWidth.js +21 -0
  72. data/assets/js/custom/_OpenOverlay.js +87 -0
  73. data/assets/js/custom/_ScrollFunc.js +42 -0
  74. data/assets/js/custom/_SetupHome.js +23 -0
  75. data/assets/js/custom/_SiteFunc.js +13 -0
  76. data/assets/js/custom/_SmoothScroll.js +42 -0
  77. data/assets/js/custom/_SplitCode.js +33 -0
  78. data/assets/js/custom/_StartBrowse.js +82 -0
  79. data/assets/js/custom/_UtilShare.js +33 -0
  80. data/assets/js/custom/_let.js +20 -0
  81. data/assets/js/footer.min.js +1 -1
  82. data/assets/js/vendor/footer/gsap-draw.js +13 -0
  83. data/assets/js/vendor/footer/gsap-morph.js +13 -0
  84. data/assets/js/vendor/footer/gsap-text.js +12 -0
  85. data/assets/js/vendor/footer/jquery.min.js +5 -0
  86. data/assets/js/vendor/footer/scrollmagic-gsap.js +310 -0
  87. data/assets/js/vendor/footer/scrollmagic.js +3 -0
  88. data/assets/js/vendor/footer/slick.js +18 -0
  89. data/assets/js/vendor/footer/tweenmax.min.js +17 -0
  90. data/assets/js/vendor/header/enquire.custom.js +15 -0
  91. data/assets/js/vendor/header/enquire.min.js +7 -0
  92. data/assets/js/vendor/header/modernizr.min.js +3 -0
  93. data/assets/js/vendor/header/simple-jekyll-search.js +6 -0
  94. metadata +83 -3
  95. data/_layouts/demo.html +0 -38
data/_sass/_slick.scss ADDED
@@ -0,0 +1,125 @@
1
+
2
+ .slick {
3
+
4
+ &-slide {
5
+ margin-right: 10px;
6
+ margin-left: 10px;
7
+ height: 100%;
8
+ float: left;
9
+
10
+ > div {
11
+ height: 100%;
12
+ }
13
+ }
14
+
15
+ &-list {
16
+ position: relative;
17
+ overflow: hidden;
18
+ display: block;
19
+ margin: 0 auto;
20
+ width: 650px;
21
+ height: 100%;
22
+ z-index: 2;
23
+ padding: 0;
24
+ }
25
+
26
+ &-arrow {
27
+ transition: opacity 200ms ease;
28
+ background-color: transparent;
29
+ text-indent: -9999px;
30
+ position: absolute;
31
+ border-radius: 0;
32
+ height: 100%;
33
+ width: 50%;
34
+ z-index: 1;
35
+ padding: 0;
36
+ top: 0;
37
+ }
38
+
39
+ &-prev {
40
+ background: url('/assets/svg/arrow-left.svg') no-repeat center right 310px;
41
+ left: 0;
42
+ }
43
+
44
+ &-next {
45
+ background: url('/assets/svg/arrow-right.svg') no-repeat center left 310px;
46
+ right: 0;
47
+ }
48
+
49
+ &-slider {
50
+ -webkit-tap-highlight-color: transparent;
51
+ touch-action: pan-y;
52
+ position: relative;
53
+ user-select: none;
54
+ display: block;
55
+ }
56
+
57
+ &-slide {
58
+ min-height: 1px;
59
+ display: none;
60
+
61
+ &.slick-loading img {
62
+ display: none;
63
+ }
64
+
65
+ &.dragging img {
66
+ pointer-events: none;
67
+ }
68
+
69
+ img {
70
+ display: block;
71
+ }
72
+ }
73
+
74
+ &-list {
75
+
76
+ &:focus {
77
+ outline: none;
78
+ }
79
+
80
+ &.dragging {
81
+ cursor: pointer;
82
+ cursor: hand;
83
+ }
84
+ }
85
+
86
+ &-track {
87
+ position: relative;
88
+ margin-right: auto;
89
+ margin-left: auto;
90
+ display: block;
91
+ height: 100%;
92
+ @include cf;
93
+ left: 0;
94
+ top: 0;
95
+ }
96
+
97
+ &-slider &-track,
98
+ &-slider &-list {
99
+ transform: translate3d(0, 0, 0);
100
+ }
101
+
102
+ &-arrow {
103
+ &.slick-hidden {
104
+ display: none;
105
+ }
106
+ }
107
+
108
+ &-initialized &-slide {
109
+ display: block;
110
+ }
111
+
112
+ &-loading &-slide {
113
+ visibility: hidden;
114
+ }
115
+
116
+ [dir='rtl'] &-slide {
117
+ float: right;
118
+ }
119
+
120
+ &-vertical &-slide {
121
+ border: 1px solid transparent;
122
+ display: block;
123
+ height: auto;
124
+ }
125
+ }
data/_sass/_split.scss ADDED
@@ -0,0 +1,15 @@
1
+
2
+ .split {
3
+
4
+ &-chapter {
5
+ &.--right {
6
+ padding: 112px 0 0 56px;
7
+ }
8
+ }
9
+
10
+ &-page {
11
+ &.--left {
12
+ padding: 56px 0 0 180px;
13
+ }
14
+ }
15
+ }
data/_sass/_title.scss CHANGED
@@ -27,45 +27,56 @@
27
27
  }
28
28
  }
29
29
 
30
- &._overlay {
31
-
32
-
33
- }
34
-
35
30
  &._mobile {
36
31
  text-align: center;
37
- font-size: 48px;
32
+ font-size: 4.8rem;
38
33
  line-height: 1;
39
34
  }
40
35
 
41
36
  &._chapter {
37
+
42
38
  &-title {
43
- @include RotateTitle();
44
- bottom: 56px;
45
- left: 128px;
39
+
40
+ &:not(.--docs) {
41
+ @include RotateTitle();
42
+ bottom: 5.6rem;
43
+ left: 12.8rem;
44
+ }
45
+
46
+ &.--docs {
47
+ color: $smoke;
48
+ }
46
49
  }
47
50
  }
48
51
 
49
52
  &._page {
53
+
50
54
  &-title {
51
- @include RotateTitle();
52
- bottom: 56px;
53
- left: 128px;
55
+
56
+ &:not(.--docs) {
57
+ @include RotateTitle();
58
+ bottom: 5.6rem;
59
+ left: 12.8rem;
60
+ }
61
+
62
+ &.--docs {
63
+ align-self: center;
64
+ }
54
65
  }
55
66
 
56
67
  &-chapter {
57
68
  @include RotateTitle( $origin : top right );
58
69
  text-transform: capitalize;
59
- right: 78px;
60
- top: 56px;
70
+ right: 7.8rem;
71
+ top: 5.6rem;
61
72
  }
62
73
 
63
74
  &-weight {
64
75
  @include RotateTitle();
65
76
  transform-origin: bottom left;
66
- left: calc(100% - 58px);
77
+ left: calc(100% - 5.8rem);
67
78
  text-align: right;
68
- bottom: 56px;
79
+ bottom: 5.6rem;
69
80
  }
70
81
  }
71
82
  }
data/_sass/_wrap.scss CHANGED
@@ -1,10 +1,4 @@
1
1
 
2
- %text {
3
- p + p, p + ul, ul + p, ul + form {
4
- margin-top: 20px;
5
- }
6
- }
7
-
8
2
  .wrap {
9
3
 
10
4
  &._book {
@@ -18,24 +12,34 @@
18
12
  width: 100%;
19
13
  }
20
14
 
15
+ &._scroller {
16
+ @extend %wrap_grid;
17
+ grid-gap: 10px;
18
+ }
19
+
21
20
  &.type {
22
21
 
23
22
  &-page {
24
23
  @extend %wrap_grid;
25
- @extend %text;
26
- grid-column: 2 / 3;
27
- display: grid;
28
24
 
29
25
  + .wrap.type-page {
30
- margin-top: 20px;
26
+
27
+ &:not(.setup-docs) {
28
+ margin-top: 20px;
29
+ }
30
+
31
+ &.setup-docs {
32
+ margin-top: 1px;
33
+ }
34
+ }
35
+
36
+ + .wrap.type-chapter {
37
+ margin-top: 100px;
31
38
  }
32
39
  }
33
40
 
34
41
  &-chapter {
35
42
  @extend %wrap_grid;
36
- @extend %text;
37
- grid-column: 2 / 3;
38
- display: grid;
39
43
 
40
44
  + .wrap.type-page {
41
45
  margin-top: 20px;
@@ -43,11 +47,6 @@
43
47
  }
44
48
  }
45
49
 
46
- &._hero.--demo {
47
- @extend %wrap_grid;
48
- @extend %text;
49
- }
50
-
51
50
  &._overlay {
52
51
  @extend %wrap_grid;
53
52
  align-self: center;
@@ -64,10 +63,6 @@
64
63
  grid-gap: 10px;
65
64
  }
66
65
 
67
- &.--demo {
68
- align-self: center;
69
- }
70
-
71
66
  &.--search {
72
67
  grid-gap: 5px;
73
68
  }
data/_sass/futuro.scss CHANGED
@@ -2,10 +2,12 @@
2
2
  @charset 'utf-8';
3
3
 
4
4
  @import
5
+ 'normalize',
5
6
  'fonts',
6
7
  'helpers',
7
8
  'base',
8
9
  'area',
10
+ 'artwork',
9
11
  'bar',
10
12
  'block',
11
13
  'box',
@@ -30,3 +32,56 @@
30
32
  position: relative;
31
33
  top: -80px;
32
34
  }
35
+
36
+ .code {
37
+
38
+ &-wrap {
39
+ grid-template-columns: repeat(2,1fr);
40
+ border-bottom: 1px solid $gun;
41
+ border-right: 1px solid $gun;
42
+ border-left: 1px solid $gun;
43
+ background-color: $smoke;
44
+ display: none;
45
+ color: $gun;
46
+
47
+ &.--open {
48
+ display: grid;
49
+ }
50
+
51
+ + .output-html {
52
+ margin-top: 20px;
53
+ }
54
+
55
+ span {
56
+ @include ib;
57
+ border-radius: 2px;
58
+ padding: 2px 4px 0;
59
+ font-size: 1.6rem;
60
+ color: white;
61
+ }
62
+
63
+ > div {
64
+ padding: 10px;
65
+
66
+ + div {
67
+ border-left: 1px solid $gun;
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ .new-rule {
74
+
75
+ .new-rule {
76
+ margin-left: 10px;
77
+ margin-top: 10px;
78
+ }
79
+
80
+ + .new-rule {
81
+ margin-top: 10px;
82
+ }
83
+ }
84
+
85
+ .indent {
86
+ margin-left: 10px;
87
+ }
Binary file
@@ -0,0 +1 @@
1
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="26" height="26" viewBox="0 0 26 26" xml:space="preserve" enable-background="new 0 0 26 26"><path d="M6,6.1c-1.3,1.3-2.1,3.2-2.1,5.1s0.8,3.7,2.1,5.1 c1.3,1.3,3.2,2.1,5.1,2.1s3.7-0.8,5.1-2.1c1.3-1.3,2.1-3.2,2.1-5.1s-0.8-3.8-2.1-5.1C14.8,4.6,13,4,11.1,4S7.3,4.7,6,6.1z M22.6,25.5L17,19.9c-1.7,1.2-3.7,1.8-5.9,1.8c-2.9,0-5.5-1.1-7.5-3.1S0.5,14,0.5,11.2s1.1-5.5,3.1-7.5s4.7-3.2,7.5-3.2 s5.5,1.1,7.5,3.1s3.2,4.6,3.2,7.5c0,2.1-0.6,4.2-1.8,6l5.6,5.6L22.6,25.5z" fill-rule="evenodd" clip-rule="evenodd" fill="#737373"/></svg>
@@ -0,0 +1,21 @@
1
+
2
+ const PrintWidth = () => {
3
+ var size = $(document)[0].documentElement.clientWidth,
4
+ more = width - size + 'px',
5
+ percent = (100/width) * size + '%';
6
+
7
+ $('.width').html(more);
8
+ TweenMax.set('.bar._mobile',{width:percent});
9
+ }
10
+
11
+ const CheckWidth = () => {
12
+ if (isMobile) {
13
+ TweenMax.set('.overlay._mobile',{className:'+=--open'});
14
+ PrintWidth();
15
+ } else {
16
+ TweenMax.set('.overlay._mobile',{className:'-=--open'});
17
+ }
18
+ }
19
+
20
+ $(CheckWidth);
21
+ $(window).resize(CheckWidth);
@@ -0,0 +1,87 @@
1
+
2
+ const SearchInput = $('.input.--search'),
3
+ SearchResults = $('.block._results');
4
+
5
+ const OpenOverlay = type => {
6
+ TweenMax.set(body,{className:'+=--overlay'});
7
+ TweenMax.set('.overlay._' + type,{className:'+=--open'});
8
+ }
9
+
10
+ const CloseOverlay = type => {
11
+ TweenMax.set(body,{className:'-=--overlay'});
12
+ TweenMax.set('.overlay._' + type,{className:'-=--open'});
13
+ }
14
+
15
+ function KeyFunc(e) {
16
+ let code = e.keyCode;
17
+
18
+ if (code == 27) {
19
+ if (AboutOpen) {
20
+ CloseOverlay('about');
21
+ AboutOpen = false;
22
+ }
23
+ if (BrowseOpen) {
24
+ CloseOverlay('browse');
25
+ BrowseOpen = false;
26
+ }
27
+ if (SearchOpen) {
28
+ CloseOverlay('search');
29
+ SearchInput.val('');
30
+ SearchResults.html('');
31
+ SearchOpen = false;
32
+ }
33
+ }
34
+
35
+ if (AboutOpen == false && BrowseOpen == false && SearchOpen == false) {
36
+ if (code == 65) {
37
+ OpenOverlay('about');
38
+ AboutOpen = true;
39
+ }
40
+ if (code == 66) {
41
+ OpenOverlay('browse');
42
+ BrowseOpen = true;
43
+ }
44
+ if (code == 83) {
45
+ OpenOverlay('search');
46
+ SearchInput.focus();
47
+ SearchOpen = true;
48
+ }
49
+ }
50
+ }
51
+
52
+ $('.btn._nav.--about').click(function() {
53
+ OpenOverlay('about');
54
+ AboutOpen = true;
55
+ });
56
+
57
+ $('.btn._nav.--browse').click(function() {
58
+ OpenOverlay('browse');
59
+ BrowseOpen = true;
60
+ });
61
+
62
+ $('.btn._nav.--search').click(function() {
63
+ OpenOverlay('search');
64
+ SearchInput.focus();
65
+ SearchOpen = true;
66
+ });
67
+
68
+ $('.exit._about').click(function() {
69
+ CloseOverlay('about');
70
+ AboutOpen = false;
71
+ });
72
+
73
+ $('.exit._browse').click(function() {
74
+ CloseOverlay('browse');
75
+ BrowseOpen = false;
76
+ });
77
+
78
+ $('.exit._search').click(function() {
79
+ CloseOverlay('search');
80
+ SearchInput.val('');
81
+ SearchResults.html('');
82
+ SearchOpen = false;
83
+ });
84
+
85
+ $(document).keyup(function(e){
86
+ KeyFunc(e);
87
+ });
@@ -0,0 +1,42 @@
1
+
2
+ const ScrollerUpdate = () => {
3
+ let set = $('.lnk._scroller'),
4
+ length = set.length;
5
+
6
+ if (length > 1) {
7
+ set.each(function() {
8
+ let ting = $(this)[0].classList[2],
9
+ tween = TweenMax.to('.lnk._scroller.' + ting,0.1,{className:'+=active'}),
10
+ scene = new ScrollMagic.Scene({triggerElement:'#' + ting}).setTween(tween).addTo(controller);
11
+ });
12
+ }
13
+ }
14
+
15
+ const ScrollFunc = chaps => {
16
+ let SiteFeed = $('.site._feed'),
17
+ Scroller = '<div class="area _scroller"><div class="wrap _scroller">';
18
+
19
+ chaps.each(function(i,val){
20
+ let id = $(val)[0].children[0].id;
21
+
22
+ if(i == 0) {
23
+ Scroller += `<a class="lnk _scroller ${id}" href="#${id}" style=""><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="26" height="26" viewBox="0 0 26 26" xml:space="preserve" enable-background="new 0 0 26 26"><path d="M13,5l9,14H4L13,5z"/></svg></a>`;
24
+ } else if(i == chaps.length - 1) {
25
+ Scroller += `<a class="lnk _scroller ${id}" href="#${id}"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="26" height="26" viewBox="0 0 26 26" xml:space="preserve" enable-background="new 0 0 26 26"><path d="M13,21L4,7h18L13,21z"/></svg></a>`;
26
+ } else {
27
+ Scroller += `<a class="lnk _scroller ${id}" href="#${id}"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="26" height="26" viewBox="0 0 26 26" xml:space="preserve" enable-background="new 0 0 26 26"><circle cx="13" cy="13" r="9"/></svg></a>`;
28
+ }
29
+ });
30
+
31
+ Scroller += '</div></div>';
32
+ SiteFeed.append(Scroller);
33
+ ScrollerUpdate();
34
+ SmoothScroll();
35
+ }
36
+
37
+ $(function() {
38
+ let chaps = $('.wrap.type-chapter');
39
+ if (chaps.length > 1) {
40
+ ScrollFunc(chaps);
41
+ }
42
+ });
@@ -0,0 +1,23 @@
1
+
2
+ const SetupHome = () => {
3
+
4
+ TweenMax.defaultEase = Sine.easeInOut;
5
+
6
+ let tl = new TimelineMax({repeat:-1,yoyo:true});
7
+
8
+ tl.fromTo('.area._book',1,{y:-5},{y:5});
9
+
10
+ $('.wrap._home').slick({
11
+ slidesToScroll : 1,
12
+ slidesToShow : 5,
13
+ infinite : true,
14
+ arrows : false
15
+ });
16
+
17
+ $('.wrap._book').hover(
18
+ function() { TweenMax.to(this,0.1,{ y : -20 }); },
19
+ function() { TweenMax.to(this,0.1,{ y : 0 }); }
20
+ );
21
+ }
22
+
23
+ $(SetupHome);
@@ -0,0 +1,13 @@
1
+
2
+ const SiteFunc = () => {
3
+
4
+ let open = '--open';
5
+
6
+ $('.site').addClass(open);
7
+
8
+ setTimeout(function() {
9
+ $('.overlay._load').removeClass(open);
10
+ },1000);
11
+ }
12
+
13
+ $(SiteFunc);
@@ -0,0 +1,42 @@
1
+
2
+ const SmoothScroll = () => {
3
+ // Select all links with hashes
4
+ $('a[href*="#"]')
5
+ // Remove links that don't actually link to anything
6
+ .not('[href="#"]')
7
+ .not('[href="#0"]')
8
+ .click(function(event) {
9
+ // On-page links
10
+ if (
11
+ location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
12
+ &&
13
+ location.hostname == this.hostname
14
+ ) {
15
+ // Figure out element to scroll to
16
+ var target = $(this.hash);
17
+ target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
18
+ // Does a scroll target exist?
19
+ if (target.length) {
20
+ // Only prevent default if animation is actually gonna happen
21
+ event.preventDefault();
22
+ $('html, body').animate({
23
+ scrollTop: target.offset().top
24
+ }, 500, function() {
25
+ // Callback after animation
26
+ // Must change focus!
27
+ var $target = $(target);
28
+ $target.focus();
29
+ if ($target.is(":focus")) { // Checking if the target was focused
30
+ return false;
31
+ } else {
32
+ $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
33
+ $target.focus(); // Set focus again
34
+ };
35
+ });
36
+ }
37
+ }
38
+ }
39
+ );
40
+ }
41
+
42
+ $(SmoothScroll);
@@ -0,0 +1,33 @@
1
+
2
+ const SplitCode = () => {
3
+
4
+ $('.code-scss').each(function(i,val) {
5
+ let string = $(this).text().split(' ');
6
+
7
+ $(string).each(function(i,val) {
8
+ let letters = val.length,
9
+ last = letters - 1;
10
+
11
+ if (val.indexOf('.') >= 0 || val.indexOf('&') >= 0) {
12
+ string.splice( i , 1 , val);
13
+ }
14
+
15
+ if ($(this)[last] == '}') {
16
+ string.splice( i , 1 , val);
17
+ }
18
+
19
+ });
20
+
21
+ let newString = string.join(' ');
22
+
23
+ $(this).text(newString);
24
+
25
+ });
26
+
27
+ let htmlstring = $('.code-html').html();
28
+
29
+ $('.code-html').text(htmlstring);
30
+
31
+ }
32
+
33
+ $(SplitCode);