materialize-sass 0.97.0 → 1.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +5 -5
  2. data/.gitattributes +1 -0
  3. data/.gitignore +3 -0
  4. data/README.md +48 -10
  5. data/Rakefile +129 -1
  6. data/assets/javascripts/materialize/anime.min.js +417 -0
  7. data/assets/javascripts/materialize/autocomplete.js +504 -0
  8. data/assets/javascripts/materialize/buttons.js +409 -0
  9. data/assets/javascripts/materialize/cards.js +34 -0
  10. data/assets/javascripts/materialize/carousel.js +797 -0
  11. data/assets/javascripts/materialize/cash.js +990 -0
  12. data/assets/javascripts/materialize/characterCounter.js +180 -0
  13. data/assets/javascripts/materialize/chips.js +564 -0
  14. data/assets/javascripts/materialize/collapsible.js +337 -0
  15. data/assets/javascripts/materialize/component.js +57 -0
  16. data/assets/javascripts/materialize/datepicker.js +935 -0
  17. data/assets/javascripts/materialize/dropdown.js +659 -0
  18. data/assets/javascripts/materialize/extras/nouislider.js +2147 -0
  19. data/assets/javascripts/materialize/extras/nouislider.min.js +1 -0
  20. data/assets/javascripts/materialize/forms.js +244 -0
  21. data/assets/javascripts/materialize/global.js +408 -0
  22. data/assets/javascripts/materialize/materialbox.js +513 -0
  23. data/assets/javascripts/materialize/modal.js +449 -0
  24. data/assets/javascripts/materialize/parallax.js +173 -0
  25. data/assets/javascripts/materialize/pushpin.js +179 -0
  26. data/assets/javascripts/materialize/range.js +310 -0
  27. data/assets/javascripts/materialize/scrollspy.js +328 -0
  28. data/assets/javascripts/materialize/select.js +497 -0
  29. data/assets/javascripts/materialize/sidenav.js +655 -0
  30. data/assets/javascripts/materialize/slider.js +424 -0
  31. data/assets/javascripts/materialize/tabs.js +476 -0
  32. data/assets/javascripts/materialize/tapTarget.js +364 -0
  33. data/assets/javascripts/materialize/timepicker.js +647 -0
  34. data/assets/javascripts/materialize/toasts.js +355 -0
  35. data/assets/javascripts/materialize/tooltip.js +351 -0
  36. data/{app/assets → assets}/javascripts/materialize/waves.js +42 -47
  37. data/assets/javascripts/materialize-sprockets.js +29 -0
  38. data/assets/javascripts/materialize.js +12374 -0
  39. data/assets/stylesheets/materialize/components/_badges.scss +55 -0
  40. data/assets/stylesheets/materialize/components/_buttons.scss +322 -0
  41. data/{app/assets → assets}/stylesheets/materialize/components/_cards.scss +72 -29
  42. data/assets/stylesheets/materialize/components/_carousel.scss +90 -0
  43. data/assets/stylesheets/materialize/components/_chips.scss +90 -0
  44. data/{app/assets → assets}/stylesheets/materialize/components/_collapsible.scss +23 -17
  45. data/assets/stylesheets/materialize/components/_color-classes.scss +32 -0
  46. data/{app/assets/stylesheets/materialize/components/_color.scss → assets/stylesheets/materialize/components/_color-variables.scss} +22 -64
  47. data/assets/stylesheets/materialize/components/_datepicker.scss +191 -0
  48. data/assets/stylesheets/materialize/components/_dropdown.scss +85 -0
  49. data/{app/assets → assets}/stylesheets/materialize/components/_global.scss +197 -144
  50. data/{app/assets → assets}/stylesheets/materialize/components/_grid.scss +57 -18
  51. data/assets/stylesheets/materialize/components/_icons-material-design.scss +5 -0
  52. data/{app/assets → assets}/stylesheets/materialize/components/_materialbox.scss +15 -13
  53. data/{app/assets → assets}/stylesheets/materialize/components/_modal.scss +18 -14
  54. data/{app/assets → assets}/stylesheets/materialize/components/_navbar.scss +89 -25
  55. data/assets/stylesheets/materialize/components/_normalize.scss +447 -0
  56. data/{app/assets → assets}/stylesheets/materialize/components/_preloader.scss +5 -3
  57. data/assets/stylesheets/materialize/components/_pulse.scss +34 -0
  58. data/assets/stylesheets/materialize/components/_sidenav.scss +208 -0
  59. data/{app/assets → assets}/stylesheets/materialize/components/_slider.scss +2 -2
  60. data/{app/assets → assets}/stylesheets/materialize/components/_table_of_contents.scss +5 -5
  61. data/assets/stylesheets/materialize/components/_tabs.scss +99 -0
  62. data/assets/stylesheets/materialize/components/_tapTarget.scss +103 -0
  63. data/assets/stylesheets/materialize/components/_timepicker.scss +183 -0
  64. data/{app/assets → assets}/stylesheets/materialize/components/_toast.scss +17 -22
  65. data/assets/stylesheets/materialize/components/_tooltip.scss +32 -0
  66. data/assets/stylesheets/materialize/components/_transitions.scss +13 -0
  67. data/{app/assets → assets}/stylesheets/materialize/components/_typography.scss +11 -9
  68. data/assets/stylesheets/materialize/components/_variables.scss +349 -0
  69. data/assets/stylesheets/materialize/components/_waves.scss +114 -0
  70. data/assets/stylesheets/materialize/components/forms/_checkboxes.scss +200 -0
  71. data/assets/stylesheets/materialize/components/forms/_file-input.scss +44 -0
  72. data/assets/stylesheets/materialize/components/forms/_forms.scss +22 -0
  73. data/assets/stylesheets/materialize/components/forms/_input-fields.scss +354 -0
  74. data/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +115 -0
  75. data/assets/stylesheets/materialize/components/forms/_range.scss +161 -0
  76. data/assets/stylesheets/materialize/components/forms/_select.scss +190 -0
  77. data/assets/stylesheets/materialize/components/forms/_switches.scss +89 -0
  78. data/assets/stylesheets/materialize/extras/nouislider.css +406 -0
  79. data/{app/assets → assets}/stylesheets/materialize.scss +13 -10
  80. data/lib/materialize-sass/engine.rb +11 -6
  81. data/lib/materialize-sass/helpers.rb +38 -0
  82. data/lib/materialize-sass/version.rb +1 -1
  83. data/lib/materialize-sass.rb +13 -28
  84. data/materialize-sass.gemspec +5 -5
  85. metadata +97 -105
  86. data/app/assets/fonts/material-design-icons/LICENSE.txt +0 -428
  87. data/app/assets/fonts/material-design-icons/Material-Design-Icons.eot +0 -0
  88. data/app/assets/fonts/material-design-icons/Material-Design-Icons.svg +0 -769
  89. data/app/assets/fonts/material-design-icons/Material-Design-Icons.ttf +0 -0
  90. data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff +0 -0
  91. data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff2 +0 -0
  92. data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
  93. data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
  94. data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
  95. data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
  96. data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
  97. data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
  98. data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
  99. data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
  100. data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
  101. data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
  102. data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
  103. data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
  104. data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
  105. data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
  106. data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
  107. data/app/assets/javascripts/materialize/animation.js +0 -9
  108. data/app/assets/javascripts/materialize/buttons.js +0 -61
  109. data/app/assets/javascripts/materialize/cards.js +0 -27
  110. data/app/assets/javascripts/materialize/character_counter.js +0 -59
  111. data/app/assets/javascripts/materialize/collapsible.js +0 -139
  112. data/app/assets/javascripts/materialize/date_picker/picker.date.js +0 -1430
  113. data/app/assets/javascripts/materialize/date_picker/picker.js +0 -1123
  114. data/app/assets/javascripts/materialize/dropdown.js +0 -178
  115. data/app/assets/javascripts/materialize/forms.js +0 -456
  116. data/app/assets/javascripts/materialize/global.js +0 -36
  117. data/app/assets/javascripts/materialize/hammer.min.js +0 -1
  118. data/app/assets/javascripts/materialize/init.js +0 -136
  119. data/app/assets/javascripts/materialize/jquery.easing.1.3.js +0 -205
  120. data/app/assets/javascripts/materialize/jquery.hammer.js +0 -33
  121. data/app/assets/javascripts/materialize/jquery.timeago.min.js +0 -1
  122. data/app/assets/javascripts/materialize/leanModal.js +0 -178
  123. data/app/assets/javascripts/materialize/materialbox.js +0 -249
  124. data/app/assets/javascripts/materialize/parallax.js +0 -58
  125. data/app/assets/javascripts/materialize/prism.js +0 -8
  126. data/app/assets/javascripts/materialize/pushpin.js +0 -62
  127. data/app/assets/javascripts/materialize/scrollFire.js +0 -44
  128. data/app/assets/javascripts/materialize/scrollspy.js +0 -284
  129. data/app/assets/javascripts/materialize/sideNav.js +0 -312
  130. data/app/assets/javascripts/materialize/slider.js +0 -301
  131. data/app/assets/javascripts/materialize/tabs.js +0 -136
  132. data/app/assets/javascripts/materialize/toasts.js +0 -125
  133. data/app/assets/javascripts/materialize/tooltip.js +0 -166
  134. data/app/assets/javascripts/materialize/transitions.js +0 -154
  135. data/app/assets/javascripts/materialize/velocity.min.js +0 -4
  136. data/app/assets/javascripts/materialize-sprockets.js +0 -27
  137. data/app/assets/javascripts/materialize.js +0 -6159
  138. data/app/assets/stylesheets/materialize/components/_buttons.scss +0 -157
  139. data/app/assets/stylesheets/materialize/components/_dropdown.scss +0 -40
  140. data/app/assets/stylesheets/materialize/components/_form.scss +0 -886
  141. data/app/assets/stylesheets/materialize/components/_icons-material-design.scss +0 -3257
  142. data/app/assets/stylesheets/materialize/components/_mixins.scss +0 -5
  143. data/app/assets/stylesheets/materialize/components/_normalize.scss +0 -427
  144. data/app/assets/stylesheets/materialize/components/_prefixer.scss +0 -376
  145. data/app/assets/stylesheets/materialize/components/_roboto.scss +0 -38
  146. data/app/assets/stylesheets/materialize/components/_sideNav.scss +0 -111
  147. data/app/assets/stylesheets/materialize/components/_tabs.scss +0 -47
  148. data/app/assets/stylesheets/materialize/components/_tooltip.scss +0 -34
  149. data/app/assets/stylesheets/materialize/components/_variables.scss +0 -152
  150. data/app/assets/stylesheets/materialize/components/_waves.scss +0 -167
  151. data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +0 -435
  152. data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +0 -201
  153. data/app/assets/stylesheets/materialize/components/date_picker/_default.time.scss +0 -125
@@ -1,249 +0,0 @@
1
- (function ($) {
2
-
3
- $.fn.materialbox = function () {
4
-
5
- return this.each(function() {
6
-
7
- if ($(this).hasClass('initialized')) {
8
- return;
9
- }
10
-
11
- $(this).addClass('initialized');
12
-
13
- var overlayActive = false;
14
- var doneAnimating = true;
15
- var inDuration = 275;
16
- var outDuration = 200;
17
- var origin = $(this);
18
- var placeholder = $('<div></div>').addClass('material-placeholder');
19
- var originalWidth = 0;
20
- var originalHeight = 0;
21
- origin.wrap(placeholder);
22
-
23
-
24
- origin.on('click', function(){
25
- var placeholder = origin.parent('.material-placeholder');
26
- var windowWidth = window.innerWidth;
27
- var windowHeight = window.innerHeight;
28
- var originalWidth = origin.width();
29
- var originalHeight = origin.height();
30
-
31
-
32
- // If already modal, return to original
33
- if (doneAnimating === false) {
34
- returnToOriginal();
35
- return false;
36
- }
37
- else if (overlayActive && doneAnimating===true) {
38
- returnToOriginal();
39
- return false;
40
- }
41
-
42
-
43
- // Set states
44
- doneAnimating = false;
45
- origin.addClass('active');
46
- overlayActive = true;
47
-
48
- // Set positioning for placeholder
49
-
50
- placeholder.css({
51
- width: placeholder[0].getBoundingClientRect().width,
52
- height: placeholder[0].getBoundingClientRect().height,
53
- position: 'relative',
54
- top: 0,
55
- left: 0
56
- });
57
-
58
-
59
-
60
- // Set css on origin
61
- origin.css({position: 'absolute', 'z-index': 1000})
62
- .data('width', originalWidth)
63
- .data('height', originalHeight);
64
-
65
- // Add overlay
66
- var overlay = $('<div id="materialbox-overlay"></div>')
67
- .css({
68
- opacity: 0
69
- })
70
- .click(function(){
71
- if (doneAnimating === true)
72
- returnToOriginal();
73
- });
74
- // Animate Overlay
75
- $('body').append(overlay);
76
- overlay.velocity({opacity: 1}, {duration: inDuration, queue: false, easing: 'easeOutQuad'}
77
- );
78
-
79
-
80
- // Add and animate caption if it exists
81
- if (origin.data('caption') !== "") {
82
- var $photo_caption = $('<div class="materialbox-caption"></div>');
83
- $photo_caption.text(origin.data('caption'));
84
- $('body').append($photo_caption);
85
- $photo_caption.css({ "display": "inline" });
86
- $photo_caption.velocity({opacity: 1}, {duration: inDuration, queue: false, easing: 'easeOutQuad'});
87
- }
88
-
89
-
90
-
91
- // Resize Image
92
- var ratio = 0;
93
- var widthPercent = originalWidth / windowWidth;
94
- var heightPercent = originalHeight / windowHeight;
95
- var newWidth = 0;
96
- var newHeight = 0;
97
-
98
- if (widthPercent > heightPercent) {
99
- ratio = originalHeight / originalWidth;
100
- newWidth = windowWidth * 0.9;
101
- newHeight = windowWidth * 0.9 * ratio;
102
- }
103
- else {
104
- ratio = originalWidth / originalHeight;
105
- newWidth = (windowHeight * 0.9) * ratio;
106
- newHeight = windowHeight * 0.9;
107
- }
108
-
109
- // Animate image + set z-index
110
- if(origin.hasClass('responsive-img')) {
111
- origin.velocity({'max-width': newWidth, 'width': originalWidth}, {duration: 0, queue: false,
112
- complete: function(){
113
- origin.css({left: 0, top: 0})
114
- .velocity(
115
- {
116
- height: newHeight,
117
- width: newWidth,
118
- left: $(document).scrollLeft() + windowWidth/2 - origin.parent('.material-placeholder').offset().left - newWidth/2,
119
- top: $(document).scrollTop() + windowHeight/2 - origin.parent('.material-placeholder').offset().top - newHeight/ 2
120
- },
121
- {
122
- duration: inDuration,
123
- queue: false,
124
- easing: 'easeOutQuad',
125
- complete: function(){doneAnimating = true;}
126
- }
127
- );
128
- } // End Complete
129
- }); // End Velocity
130
- }
131
- else {
132
- origin.css('left', 0)
133
- .css('top', 0)
134
- .velocity(
135
- {
136
- height: newHeight,
137
- width: newWidth,
138
- left: $(document).scrollLeft() + windowWidth/2 - origin.parent('.material-placeholder').offset().left - newWidth/2,
139
- top: $(document).scrollTop() + windowHeight/2 - origin.parent('.material-placeholder').offset().top - newHeight/ 2
140
- },
141
- {
142
- duration: inDuration,
143
- queue: false,
144
- easing: 'easeOutQuad',
145
- complete: function(){doneAnimating = true;}
146
- }
147
- ); // End Velocity
148
- }
149
-
150
- }); // End origin on click
151
-
152
-
153
- // Return on scroll
154
- $(window).scroll(function() {
155
- if (overlayActive ) {
156
- returnToOriginal();
157
- }
158
- });
159
-
160
- // Return on ESC
161
- $(document).keyup(function(e) {
162
-
163
- if (e.keyCode === 27 && doneAnimating === true) { // ESC key
164
- if (overlayActive) {
165
- returnToOriginal();
166
- }
167
- }
168
- });
169
-
170
-
171
- // This function returns the modaled image to the original spot
172
- function returnToOriginal() {
173
-
174
- doneAnimating = false;
175
-
176
- var placeholder = origin.parent('.material-placeholder');
177
- var windowWidth = window.innerWidth;
178
- var windowHeight = window.innerHeight;
179
- var originalWidth = origin.data('width');
180
- var originalHeight = origin.data('height');
181
-
182
- origin.velocity("stop", true);
183
- $('#materialbox-overlay').velocity("stop", true);
184
- $('.materialbox-caption').velocity("stop", true);
185
-
186
-
187
- $('#materialbox-overlay').velocity({opacity: 0}, {
188
- duration: outDuration, // Delay prevents animation overlapping
189
- queue: false, easing: 'easeOutQuad',
190
- complete: function(){
191
- // Remove Overlay
192
- overlayActive = false;
193
- $(this).remove();
194
- }
195
- });
196
-
197
- // Resize Image
198
- origin.velocity(
199
- {
200
- width: originalWidth,
201
- height: originalHeight,
202
- left: 0,
203
- top: 0
204
- },
205
- {
206
- duration: outDuration,
207
- queue: false, easing: 'easeOutQuad'
208
- }
209
- );
210
-
211
- // Remove Caption + reset css settings on image
212
- $('.materialbox-caption').velocity({opacity: 0}, {
213
- duration: outDuration, // Delay prevents animation overlapping
214
- queue: false, easing: 'easeOutQuad',
215
- complete: function(){
216
- placeholder.css({
217
- height: '',
218
- width: '',
219
- position: '',
220
- top: '',
221
- left: ''
222
- });
223
-
224
- origin.css({
225
- height: '',
226
- top: '',
227
- left: '',
228
- width: '',
229
- 'max-width': '',
230
- position: '',
231
- 'z-index': ''
232
- });
233
-
234
- // Remove class
235
- origin.removeClass('active');
236
- doneAnimating = true;
237
- $(this).remove();
238
- }
239
- });
240
-
241
- }
242
- });
243
- };
244
-
245
- $(document).ready(function(){
246
- $('.materialboxed').materialbox();
247
- });
248
-
249
- }( jQuery ));
@@ -1,58 +0,0 @@
1
- (function ($) {
2
-
3
- $.fn.parallax = function () {
4
- var window_width = $(window).width();
5
- // Parallax Scripts
6
- return this.each(function(i) {
7
- var $this = $(this);
8
- $this.addClass('parallax');
9
-
10
- function updateParallax(initial) {
11
- var container_height;
12
- if (window_width < 601) {
13
- container_height = ($this.height() > 0) ? $this.height() : $this.children("img").height();
14
- }
15
- else {
16
- container_height = ($this.height() > 0) ? $this.height() : 500;
17
- }
18
- var $img = $this.children("img").first();
19
- var img_height = $img.height();
20
- var parallax_dist = img_height - container_height;
21
- var bottom = $this.offset().top + container_height;
22
- var top = $this.offset().top;
23
- var scrollTop = $(window).scrollTop();
24
- var windowHeight = window.innerHeight;
25
- var windowBottom = scrollTop + windowHeight;
26
- var percentScrolled = (windowBottom - top) / (container_height + windowHeight);
27
- var parallax = Math.round((parallax_dist * percentScrolled));
28
-
29
- if (initial) {
30
- $img.css('display', 'block');
31
- }
32
- if ((bottom > scrollTop) && (top < (scrollTop + windowHeight))) {
33
- $img.css('transform', "translate3D(-50%," + parallax + "px, 0)");
34
- }
35
-
36
- }
37
-
38
- // Wait for image load
39
- $this.children("img").one("load", function() {
40
- updateParallax(true);
41
- }).each(function() {
42
- if(this.complete) $(this).load();
43
- });
44
-
45
- $(window).scroll(function() {
46
- window_width = $(window).width();
47
- updateParallax(false);
48
- });
49
-
50
- $(window).resize(function() {
51
- window_width = $(window).width();
52
- updateParallax(false);
53
- });
54
-
55
- });
56
-
57
- };
58
- }( jQuery ));
@@ -1,8 +0,0 @@
1
- /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+scss+bash */
2
- self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{};var Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=t.util.clone(e[r]));return a;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var a=t.util.clone(t.languages[e]);for(var r in n)a[r]=n[r];return a},insertBefore:function(e,n,a,r){r=r||t.languages;var i=r[e];if(2==arguments.length){a=arguments[1];for(var l in a)a.hasOwnProperty(l)&&(i[l]=a[l]);return i}var s={};for(var o in i)if(i.hasOwnProperty(o)){if(o==n)for(var l in a)a.hasOwnProperty(l)&&(s[l]=a[l]);s[o]=i[o]}return t.languages.DFS(t.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=s)}),r[e]=s},DFS:function(e,n,a){for(var r in e)e.hasOwnProperty(r)&&(n.call(e,r,e[r],a||r),"Object"===t.util.type(e[r])?t.languages.DFS(e[r],n):"Array"===t.util.type(e[r])&&t.languages.DFS(e[r],n,r))}},highlightAll:function(e,n){for(var a,r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),i=0;a=r[i++];)t.highlightElement(a,e===!0,n)},highlightElement:function(a,r,i){for(var l,s,o=a;o&&!e.test(o.className);)o=o.parentNode;if(o&&(l=(o.className.match(e)||[,""])[1],s=t.languages[l]),s){a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,o=a.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l);var g=a.textContent;if(g){var u={element:a,language:l,grammar:s,code:g};if(t.hooks.run("before-highlight",u),r&&self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){u.highlightedCode=n.stringify(JSON.parse(e.data),l),t.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,i&&i.call(u.element),t.hooks.run("after-highlight",u)},c.postMessage(JSON.stringify({language:u.language,code:u.code}))}else u.highlightedCode=t.highlight(u.code,u.grammar,u.language),t.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,i&&i.call(a),t.hooks.run("after-highlight",u)}}},highlight:function(e,a,r){var i=t.tokenize(e,a);return n.stringify(t.util.encode(i),r)},tokenize:function(e,n){var a=t.Token,r=[e],i=n.rest;if(i){for(var l in i)n[l]=i[l];delete n.rest}e:for(var l in n)if(n.hasOwnProperty(l)&&n[l]){var s=n[l];s="Array"===t.util.type(s)?s:[s];for(var o=0;o<s.length;++o){var g=s[o],u=g.inside,c=!!g.lookbehind,f=0,h=g.alias;g=g.pattern||g;for(var p=0;p<r.length;p++){var d=r[p];if(r.length>e.length)break e;if(!(d instanceof a)){g.lastIndex=0;var m=g.exec(d);if(m){c&&(f=m[1].length);var y=m.index-1+f,m=m[0].slice(f),v=m.length,k=y+v,b=d.slice(0,y+1),w=d.slice(k+1),O=[p,1];b&&O.push(b);var N=new a(l,u?t.tokenize(m,u):m,h);O.push(N),w&&O.push(w),Array.prototype.splice.apply(r,O)}}}}}return r},hooks:{all:{},add:function(e,n){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(n)},run:function(e,n){var a=t.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,a,r){if("string"==typeof e)return e;if("[object Array]"==Object.prototype.toString.call(e))return e.map(function(t){return n.stringify(t,a,e)}).join("");var i={type:e.type,content:n.stringify(e.content,a,r),tag:"span",classes:["token",e.type],attributes:{},language:a,parent:r};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var l="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}t.hooks.run("wrap",i);var s="";for(var o in i.attributes)s+=o+'="'+(i.attributes[o]||"")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'" '+s+">"+i.content+"</"+i.tag+">"},!self.document)return self.addEventListener?(self.addEventListener("message",function(e){var n=JSON.parse(e.data),a=n.language,r=n.code;self.postMessage(JSON.stringify(t.util.encode(t.tokenize(r,t.languages[a])))),self.close()},!1),self.Prism):self.Prism;var a=document.getElementsByTagName("script");return a=a[a.length-1],a&&(t.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)),self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism);;
3
- Prism.languages.markup={comment:/<!--[\w\W]*?-->/g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/\&#?[\da-z]{1,8};/gi},Prism.hooks.add("wrap",function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))});;
4
- Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/gi,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,punctuation:/[\{\};:]/g,"function":/[-a-z0-9]+(?=\()/gi},Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/gi,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/gi,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css},alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').+?\1/gi,inside:{"attr-name":{pattern:/^\s*style/gi,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/gi,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag));;
5
- Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//g,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*?(\r?\n|$)/g,lookbehind:!0}],string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/gi,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/gi,inside:{punctuation:/\(/}},number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
6
- Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|get|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|-?Infinity)\b/g,"function":/(?!\d)[a-z0-9_$]+(?=\()/gi}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/gi,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/gi,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript},alias:"language-javascript"}});;
7
- Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|\/\/.*?(\r?\n|$))/g,lookbehind:!0},atrule:/@[\w-]+(?=\s+(\(|\{|;))/gi,url:/([-a-z]+-)*url(?=\()/gi,selector:/([^@;\{\}\(\)]?([^@;\{\}\(\)]|&|\#\{\$[-_\w]+\})+)(?=\s*\{(\}|\s|[^\}]+(:|\{)[^\}]+))/gm}),Prism.languages.insertBefore("scss","atrule",{keyword:/@(if|else if|else|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)|(?=@for\s+\$[-_\w]+\s)+from/i}),Prism.languages.insertBefore("scss","property",{variable:/((\$[-_\w]+)|(#\{\$[-_\w]+\}))/i}),Prism.languages.insertBefore("scss","ignore",{placeholder:/%[-_\w]+/i,statement:/\B!(default|optional)\b/gi,"boolean":/\b(true|false)\b/g,"null":/\b(null)\b/g,operator:/\s+([-+]{1,2}|={1,2}|!=|\|?\||\?|\*|\/|\%)\s+/g});;
8
- Prism.languages.bash=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])(#.*?(\r?\n|$))/g,lookbehind:!0},string:{pattern:/("|')(\\?[\s\S])*?\1/g,inside:{property:/\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^\}]+\})/g}},keyword:/\b(if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)\b/g}),Prism.languages.insertBefore("bash","keyword",{property:/\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^}]+\})/g}),Prism.languages.insertBefore("bash","comment",{important:/(^#!\s*\/bin\/bash)|(^#!\s*\/bin\/sh)/g});;
@@ -1,62 +0,0 @@
1
- (function ($) {
2
- $(document).ready(function() {
3
-
4
- $.fn.pushpin = function (options) {
5
-
6
- var defaults = {
7
- top: 0,
8
- bottom: Infinity,
9
- offset: 0
10
- }
11
- options = $.extend(defaults, options);
12
-
13
- $index = 0;
14
- return this.each(function() {
15
- var $uniqueId = Materialize.guid(),
16
- $this = $(this),
17
- $original_offset = $(this).offset().top;
18
-
19
- function removePinClasses(object) {
20
- object.removeClass('pin-top');
21
- object.removeClass('pinned');
22
- object.removeClass('pin-bottom');
23
- }
24
-
25
- function updateElements(objects, scrolled) {
26
- objects.each(function () {
27
- // Add position fixed (because its between top and bottom)
28
- if (options.top <= scrolled && options.bottom >= scrolled && !$(this).hasClass('pinned')) {
29
- removePinClasses($(this));
30
- $(this).css('top', options.offset);
31
- $(this).addClass('pinned');
32
- }
33
-
34
- // Add pin-top (when scrolled position is above top)
35
- if (scrolled < options.top && !$(this).hasClass('pin-top')) {
36
- removePinClasses($(this));
37
- $(this).css('top', 0);
38
- $(this).addClass('pin-top');
39
- }
40
-
41
- // Add pin-bottom (when scrolled position is below bottom)
42
- if (scrolled > options.bottom && !$(this).hasClass('pin-bottom')) {
43
- removePinClasses($(this));
44
- $(this).addClass('pin-bottom');
45
- $(this).css('top', options.bottom - $original_offset);
46
- }
47
- });
48
- }
49
-
50
- updateElements($this, $(window).scrollTop());
51
- $(window).on('scroll.' + $uniqueId, function () {
52
- var $scrolled = $(window).scrollTop() + options.offset;
53
- updateElements($this, $scrolled);
54
- });
55
-
56
- });
57
-
58
- };
59
-
60
-
61
- });
62
- }( jQuery ));
@@ -1,44 +0,0 @@
1
- (function($) {
2
-
3
- // Input: Array of JSON objects {selector, offset, callback}
4
-
5
- Materialize.scrollFire = function(options) {
6
-
7
- var didScroll = false;
8
-
9
- window.addEventListener("scroll", function() {
10
- didScroll = true;
11
- });
12
-
13
- // Rate limit to 100ms
14
- setInterval(function() {
15
- if(didScroll) {
16
- didScroll = false;
17
-
18
- var windowScroll = window.pageYOffset + window.innerHeight;
19
-
20
- for (var i = 0 ; i < options.length; i++) {
21
- // Get options from each line
22
- var value = options[i];
23
- var selector = value.selector,
24
- offset = value.offset,
25
- callback = value.callback;
26
-
27
- var currentElement = document.querySelector(selector);
28
- if ( currentElement !== null) {
29
- var elementOffset = currentElement.getBoundingClientRect().top + document.body.scrollTop;
30
-
31
- if (windowScroll > (elementOffset + offset)) {
32
- if (value.done !== true) {
33
- var callbackFunc = new Function(callback);
34
- callbackFunc();
35
- value.done = true;
36
- }
37
- }
38
- }
39
- }
40
- }
41
- }, 100);
42
- };
43
-
44
- })(jQuery);