uikit2-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.travis.yml +4 -0
  4. data/Gemfile +4 -0
  5. data/README.md +66 -0
  6. data/Rakefile +1 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +7 -0
  9. data/lib/uikit2/rails.rb +8 -0
  10. data/lib/uikit2/rails/version.rb +5 -0
  11. data/uikit2-rails.gemspec +25 -0
  12. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  13. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  14. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  15. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  16. data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
  17. data/vendor/assets/javascripts/uikit.js +3537 -0
  18. data/vendor/assets/javascripts/uikit/components/accordion.js +172 -0
  19. data/vendor/assets/javascripts/uikit/components/accordion.min.js +2 -0
  20. data/vendor/assets/javascripts/uikit/components/autocomplete.js +334 -0
  21. data/vendor/assets/javascripts/uikit/components/autocomplete.min.js +2 -0
  22. data/vendor/assets/javascripts/uikit/components/datepicker.js +3166 -0
  23. data/vendor/assets/javascripts/uikit/components/datepicker.min.js +3 -0
  24. data/vendor/assets/javascripts/uikit/components/form-password.js +67 -0
  25. data/vendor/assets/javascripts/uikit/components/form-password.min.js +2 -0
  26. data/vendor/assets/javascripts/uikit/components/form-select.js +70 -0
  27. data/vendor/assets/javascripts/uikit/components/form-select.min.js +2 -0
  28. data/vendor/assets/javascripts/uikit/components/grid.js +523 -0
  29. data/vendor/assets/javascripts/uikit/components/grid.min.js +2 -0
  30. data/vendor/assets/javascripts/uikit/components/htmleditor.js +623 -0
  31. data/vendor/assets/javascripts/uikit/components/htmleditor.min.js +2 -0
  32. data/vendor/assets/javascripts/uikit/components/lightbox.js +555 -0
  33. data/vendor/assets/javascripts/uikit/components/lightbox.min.js +2 -0
  34. data/vendor/assets/javascripts/uikit/components/nestable.js +638 -0
  35. data/vendor/assets/javascripts/uikit/components/nestable.min.js +2 -0
  36. data/vendor/assets/javascripts/uikit/components/notify.js +189 -0
  37. data/vendor/assets/javascripts/uikit/components/notify.min.js +2 -0
  38. data/vendor/assets/javascripts/uikit/components/pagination.js +147 -0
  39. data/vendor/assets/javascripts/uikit/components/pagination.min.js +2 -0
  40. data/vendor/assets/javascripts/uikit/components/parallax.js +417 -0
  41. data/vendor/assets/javascripts/uikit/components/parallax.min.js +2 -0
  42. data/vendor/assets/javascripts/uikit/components/search.js +92 -0
  43. data/vendor/assets/javascripts/uikit/components/search.min.js +2 -0
  44. data/vendor/assets/javascripts/uikit/components/slider.js +520 -0
  45. data/vendor/assets/javascripts/uikit/components/slider.min.js +2 -0
  46. data/vendor/assets/javascripts/uikit/components/slideset.js +502 -0
  47. data/vendor/assets/javascripts/uikit/components/slideset.min.js +2 -0
  48. data/vendor/assets/javascripts/uikit/components/slideshow-fx.js +375 -0
  49. data/vendor/assets/javascripts/uikit/components/slideshow-fx.min.js +2 -0
  50. data/vendor/assets/javascripts/uikit/components/slideshow.js +545 -0
  51. data/vendor/assets/javascripts/uikit/components/slideshow.min.js +2 -0
  52. data/vendor/assets/javascripts/uikit/components/sortable.js +664 -0
  53. data/vendor/assets/javascripts/uikit/components/sortable.min.js +2 -0
  54. data/vendor/assets/javascripts/uikit/components/sticky.js +349 -0
  55. data/vendor/assets/javascripts/uikit/components/sticky.min.js +2 -0
  56. data/vendor/assets/javascripts/uikit/components/timepicker.js +192 -0
  57. data/vendor/assets/javascripts/uikit/components/timepicker.min.js +2 -0
  58. data/vendor/assets/javascripts/uikit/components/tooltip.js +234 -0
  59. data/vendor/assets/javascripts/uikit/components/tooltip.min.js +2 -0
  60. data/vendor/assets/javascripts/uikit/components/upload.js +260 -0
  61. data/vendor/assets/javascripts/uikit/components/upload.min.js +2 -0
  62. data/vendor/assets/javascripts/uikit/core/alert.js +66 -0
  63. data/vendor/assets/javascripts/uikit/core/alert.min.js +2 -0
  64. data/vendor/assets/javascripts/uikit/core/button.js +157 -0
  65. data/vendor/assets/javascripts/uikit/core/button.min.js +2 -0
  66. data/vendor/assets/javascripts/uikit/core/core.js +725 -0
  67. data/vendor/assets/javascripts/uikit/core/core.min.js +2 -0
  68. data/vendor/assets/javascripts/uikit/core/cover.js +95 -0
  69. data/vendor/assets/javascripts/uikit/core/cover.min.js +2 -0
  70. data/vendor/assets/javascripts/uikit/core/dropdown.js +421 -0
  71. data/vendor/assets/javascripts/uikit/core/dropdown.min.js +2 -0
  72. data/vendor/assets/javascripts/uikit/core/grid.js +114 -0
  73. data/vendor/assets/javascripts/uikit/core/grid.min.js +2 -0
  74. data/vendor/assets/javascripts/uikit/core/modal.js +372 -0
  75. data/vendor/assets/javascripts/uikit/core/modal.min.js +2 -0
  76. data/vendor/assets/javascripts/uikit/core/nav.js +136 -0
  77. data/vendor/assets/javascripts/uikit/core/nav.min.js +2 -0
  78. data/vendor/assets/javascripts/uikit/core/offcanvas.js +180 -0
  79. data/vendor/assets/javascripts/uikit/core/offcanvas.min.js +2 -0
  80. data/vendor/assets/javascripts/uikit/core/scrollspy.js +208 -0
  81. data/vendor/assets/javascripts/uikit/core/scrollspy.min.js +2 -0
  82. data/vendor/assets/javascripts/uikit/core/smooth-scroll.js +62 -0
  83. data/vendor/assets/javascripts/uikit/core/smooth-scroll.min.js +2 -0
  84. data/vendor/assets/javascripts/uikit/core/switcher.js +304 -0
  85. data/vendor/assets/javascripts/uikit/core/switcher.min.js +2 -0
  86. data/vendor/assets/javascripts/uikit/core/tab.js +165 -0
  87. data/vendor/assets/javascripts/uikit/core/tab.min.js +2 -0
  88. data/vendor/assets/javascripts/uikit/core/toggle.js +120 -0
  89. data/vendor/assets/javascripts/uikit/core/toggle.min.js +2 -0
  90. data/vendor/assets/javascripts/uikit/core/touch.js +173 -0
  91. data/vendor/assets/javascripts/uikit/core/touch.min.js +2 -0
  92. data/vendor/assets/javascripts/uikit/core/utility.js +239 -0
  93. data/vendor/assets/javascripts/uikit/core/utility.min.js +2 -0
  94. data/vendor/assets/stylesheets/uikit.almost-flat.css +8551 -0
  95. data/vendor/assets/stylesheets/uikit.css +8252 -0
  96. data/vendor/assets/stylesheets/uikit.gradient.css +8614 -0
  97. data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.css +39 -0
  98. data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.min.css +2 -0
  99. data/vendor/assets/stylesheets/uikit/components/accordion.css +37 -0
  100. data/vendor/assets/stylesheets/uikit/components/accordion.gradient.css +39 -0
  101. data/vendor/assets/stylesheets/uikit/components/accordion.gradient.min.css +2 -0
  102. data/vendor/assets/stylesheets/uikit/components/accordion.min.css +2 -0
  103. data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.css +52 -0
  104. data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.min.css +2 -0
  105. data/vendor/assets/stylesheets/uikit/components/autocomplete.css +50 -0
  106. data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.css +52 -0
  107. data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.min.css +2 -0
  108. data/vendor/assets/stylesheets/uikit/components/autocomplete.min.css +2 -0
  109. data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.css +129 -0
  110. data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.min.css +2 -0
  111. data/vendor/assets/stylesheets/uikit/components/datepicker.css +123 -0
  112. data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.css +139 -0
  113. data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.min.css +2 -0
  114. data/vendor/assets/stylesheets/uikit/components/datepicker.min.css +2 -0
  115. data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.css +128 -0
  116. data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.min.css +2 -0
  117. data/vendor/assets/stylesheets/uikit/components/dotnav.css +124 -0
  118. data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.css +128 -0
  119. data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.min.css +2 -0
  120. data/vendor/assets/stylesheets/uikit/components/dotnav.min.css +2 -0
  121. data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.css +78 -0
  122. data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.min.css +2 -0
  123. data/vendor/assets/stylesheets/uikit/components/form-advanced.css +78 -0
  124. data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.css +78 -0
  125. data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.min.css +2 -0
  126. data/vendor/assets/stylesheets/uikit/components/form-advanced.min.css +2 -0
  127. data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.css +34 -0
  128. data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.min.css +2 -0
  129. data/vendor/assets/stylesheets/uikit/components/form-file.css +34 -0
  130. data/vendor/assets/stylesheets/uikit/components/form-file.gradient.css +34 -0
  131. data/vendor/assets/stylesheets/uikit/components/form-file.gradient.min.css +2 -0
  132. data/vendor/assets/stylesheets/uikit/components/form-file.min.css +2 -0
  133. data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.css +34 -0
  134. data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.min.css +2 -0
  135. data/vendor/assets/stylesheets/uikit/components/form-password.css +34 -0
  136. data/vendor/assets/stylesheets/uikit/components/form-password.gradient.css +34 -0
  137. data/vendor/assets/stylesheets/uikit/components/form-password.gradient.min.css +2 -0
  138. data/vendor/assets/stylesheets/uikit/components/form-password.min.css +2 -0
  139. data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.css +35 -0
  140. data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.min.css +2 -0
  141. data/vendor/assets/stylesheets/uikit/components/form-select.css +35 -0
  142. data/vendor/assets/stylesheets/uikit/components/form-select.gradient.css +35 -0
  143. data/vendor/assets/stylesheets/uikit/components/form-select.gradient.min.css +2 -0
  144. data/vendor/assets/stylesheets/uikit/components/form-select.min.css +2 -0
  145. data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.css +222 -0
  146. data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.min.css +2 -0
  147. data/vendor/assets/stylesheets/uikit/components/htmleditor.css +164 -0
  148. data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.css +229 -0
  149. data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.min.css +2 -0
  150. data/vendor/assets/stylesheets/uikit/components/htmleditor.min.css +2 -0
  151. data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.css +135 -0
  152. data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.min.css +2 -0
  153. data/vendor/assets/stylesheets/uikit/components/nestable.css +132 -0
  154. data/vendor/assets/stylesheets/uikit/components/nestable.gradient.css +139 -0
  155. data/vendor/assets/stylesheets/uikit/components/nestable.gradient.min.css +2 -0
  156. data/vendor/assets/stylesheets/uikit/components/nestable.min.css +2 -0
  157. data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.css +98 -0
  158. data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.min.css +2 -0
  159. data/vendor/assets/stylesheets/uikit/components/notify.css +92 -0
  160. data/vendor/assets/stylesheets/uikit/components/notify.gradient.css +98 -0
  161. data/vendor/assets/stylesheets/uikit/components/notify.gradient.min.css +2 -0
  162. data/vendor/assets/stylesheets/uikit/components/notify.min.css +2 -0
  163. data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.css +29 -0
  164. data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.min.css +2 -0
  165. data/vendor/assets/stylesheets/uikit/components/placeholder.css +29 -0
  166. data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.css +29 -0
  167. data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.min.css +2 -0
  168. data/vendor/assets/stylesheets/uikit/components/placeholder.min.css +2 -0
  169. data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.css +104 -0
  170. data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.min.css +2 -0
  171. data/vendor/assets/stylesheets/uikit/components/progress.css +94 -0
  172. data/vendor/assets/stylesheets/uikit/components/progress.gradient.css +112 -0
  173. data/vendor/assets/stylesheets/uikit/components/progress.gradient.min.css +2 -0
  174. data/vendor/assets/stylesheets/uikit/components/progress.min.css +2 -0
  175. data/vendor/assets/stylesheets/uikit/components/search.almost-flat.css +191 -0
  176. data/vendor/assets/stylesheets/uikit/components/search.almost-flat.min.css +2 -0
  177. data/vendor/assets/stylesheets/uikit/components/search.css +189 -0
  178. data/vendor/assets/stylesheets/uikit/components/search.gradient.css +191 -0
  179. data/vendor/assets/stylesheets/uikit/components/search.gradient.min.css +2 -0
  180. data/vendor/assets/stylesheets/uikit/components/search.min.css +2 -0
  181. data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.css +98 -0
  182. data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.min.css +2 -0
  183. data/vendor/assets/stylesheets/uikit/components/slidenav.css +98 -0
  184. data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.css +98 -0
  185. data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.min.css +2 -0
  186. data/vendor/assets/stylesheets/uikit/components/slidenav.min.css +2 -0
  187. data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.css +85 -0
  188. data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.min.css +2 -0
  189. data/vendor/assets/stylesheets/uikit/components/slider.css +85 -0
  190. data/vendor/assets/stylesheets/uikit/components/slider.gradient.css +85 -0
  191. data/vendor/assets/stylesheets/uikit/components/slider.gradient.min.css +2 -0
  192. data/vendor/assets/stylesheets/uikit/components/slider.min.css +2 -0
  193. data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.css +140 -0
  194. data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.min.css +2 -0
  195. data/vendor/assets/stylesheets/uikit/components/slideshow.css +140 -0
  196. data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.css +140 -0
  197. data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.min.css +2 -0
  198. data/vendor/assets/stylesheets/uikit/components/slideshow.min.css +2 -0
  199. data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.css +62 -0
  200. data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.min.css +2 -0
  201. data/vendor/assets/stylesheets/uikit/components/sortable.css +62 -0
  202. data/vendor/assets/stylesheets/uikit/components/sortable.gradient.css +62 -0
  203. data/vendor/assets/stylesheets/uikit/components/sortable.gradient.min.css +2 -0
  204. data/vendor/assets/stylesheets/uikit/components/sortable.min.css +2 -0
  205. data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.css +31 -0
  206. data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.min.css +2 -0
  207. data/vendor/assets/stylesheets/uikit/components/sticky.css +31 -0
  208. data/vendor/assets/stylesheets/uikit/components/sticky.gradient.css +31 -0
  209. data/vendor/assets/stylesheets/uikit/components/sticky.gradient.min.css +2 -0
  210. data/vendor/assets/stylesheets/uikit/components/sticky.min.css +2 -0
  211. data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.css +118 -0
  212. data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.min.css +2 -0
  213. data/vendor/assets/stylesheets/uikit/components/tooltip.css +116 -0
  214. data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.css +118 -0
  215. data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.min.css +2 -0
  216. data/vendor/assets/stylesheets/uikit/components/tooltip.min.css +2 -0
  217. data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.css +10 -0
  218. data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.min.css +2 -0
  219. data/vendor/assets/stylesheets/uikit/components/upload.css +10 -0
  220. data/vendor/assets/stylesheets/uikit/components/upload.gradient.css +10 -0
  221. data/vendor/assets/stylesheets/uikit/components/upload.gradient.min.css +2 -0
  222. data/vendor/assets/stylesheets/uikit/components/upload.min.css +2 -0
  223. metadata +295 -0
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-slider",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";var i,e,s,n,a={};return t.component("slider",{defaults:{center:!1,threshold:10,infinite:!0,autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0,activecls:"uk-active"},boot:function(){t.ready(function(i){setTimeout(function(){t.$("[data-uk-slider]",i).each(function(){var i=t.$(this);i.data("slider")||t.slider(i,t.Utils.options(i.attr("data-uk-slider")))})},0)})},init:function(){var o=this;this.container=this.element.find(".uk-slider"),this.focus=0,t.$win.on("resize load",t.Utils.debounce(function(){o.resize(!0)},100)),this.on("click.uikit.slider","[data-uk-slider-item]",function(i){i.preventDefault();var e=t.$(this).attr("data-uk-slider-item");if(o.focus!=e)switch(o.stop(),e){case"next":case"previous":o["next"==e?"next":"previous"]();break;default:o.updateFocus(parseInt(e,10))}}),this.container.on({"touchstart mousedown":function(r){r.originalEvent&&r.originalEvent.touches&&(r=r.originalEvent.touches[0]),r.button&&2==r.button||!o.active||(o.stop(),s=t.$(r.target).is("a")?t.$(r.target):t.$(r.target).parents("a:first"),n=!1,s.length&&s.one("click",function(t){n&&t.preventDefault()}),e=function(t){n=!0,i=o,a={touchx:parseInt(t.pageX,10),dir:1,focus:o.focus,base:o.options.center?"center":"area"},t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),i.element.data({"pointer-start":{x:parseInt(t.pageX,10),y:parseInt(t.pageY,10)},"pointer-pos-start":o.pos}),o.container.addClass("uk-drag"),e=!1},e.x=parseInt(r.pageX,10),e.threshold=o.options.threshold)},mouseenter:function(){o.options.pauseOnHover&&(o.hovering=!0)},mouseleave:function(){o.hovering=!1}}),this.resize(!0),this.on("display.uk.check",function(){o.element.is(":visible")&&o.resize(!0)}),this.element.find("a,img").attr("draggable","false"),this.options.autoplay&&this.start()},resize:function(i){var e,s,n,a,o=this,r=0,h=0;return this.items=this.container.children().filter(":visible"),this.vp=this.element[0].getBoundingClientRect().width,this.container.css({"min-width":"","min-height":""}),this.items.each(function(i){e=t.$(this),a=e.css({left:"",width:""})[0].getBoundingClientRect(),s=a.width,n=e.width(),h=Math.max(h,a.height),e.css({left:r,width:s}).data({idx:i,left:r,width:s,cwidth:n,area:r+s,center:r-(o.vp/2-n/2)}),r+=s}),this.container.css({"min-width":r,"min-height":h}),this.options.infinite&&r<=2*this.vp&&!this.itemsResized?(this.container.children().each(function(t){o.container.append(o.items.eq(t).clone(!0).attr("id",""))}).each(function(t){o.container.append(o.items.eq(t).clone(!0).attr("id",""))}),this.itemsResized=!0,this.resize()):(this.cw=r,this.pos=0,this.active=r>=this.vp,this.container.css({"-ms-transform":"","-webkit-transform":"",transform:""}),i&&this.updateFocus(this.focus),void 0)},updatePos:function(t){this.pos=t,this.container.css({"-ms-transform":"translateX("+t+"px)","-webkit-transform":"translateX("+t+"px)",transform:"translateX("+t+"px)"})},updateFocus:function(t,i){if(this.active){i=i||(t>this.focus?1:-1);var e,s,n=this.items.eq(t);if(this.options.infinite&&this.infinite(t,i),this.options.center)this.updatePos(-1*n.data("center")),this.items.filter("."+this.options.activecls).removeClass(this.options.activecls),n.addClass(this.options.activecls);else if(this.options.infinite)this.updatePos(-1*n.data("left"));else{for(e=0,s=t;s<this.items.length;s++)e+=this.items.eq(s).data("width");if(e>this.vp)this.updatePos(-1*n.data("left"));else if(1==i){for(e=0,s=this.items.length-1;s>=0;s--)if(e+=this.items.eq(s).data("width"),e>=this.vp){t=s;break}this.updatePos(-1*this.items.eq(t).data("left"))}}this.focus=t,this.trigger("focusitem.uk.slider",[t,this.items.eq(t),this])}},next:function(){var t=this.items[this.focus+1]?this.focus+1:this.options.infinite?0:this.focus;this.updateFocus(t,1)},previous:function(){var t=this.items[this.focus-1]?this.focus-1:this.options.infinite?this.items[this.focus-1]?this.items-1:this.items.length-1:this.focus;this.updateFocus(t,-1)},start:function(){this.stop();var t=this;this.interval=setInterval(function(){t.hovering||t.next()},this.options.autoplayInterval)},stop:function(){this.interval&&clearInterval(this.interval)},infinite:function(t,i){var e,s=this,n=this.items.eq(t),a=t,o=[],r=0;if(1==i){for(e=0;e<this.items.length&&(a!=t&&(r+=this.items.eq(a).data("width"),o.push(this.items.eq(a))),!(r>this.vp));e++)a=a+1==this.items.length?0:a+1;o.length&&o.forEach(function(t){var i=n.data("area");t.css({left:i}).data({left:i,area:i+t.data("width"),center:i-(s.vp/2-t.data("cwidth")/2)}),n=t})}else{for(e=this.items.length-1;e>-1&&(r+=this.items.eq(a).data("width"),a!=t&&o.push(this.items.eq(a)),!(r>this.vp));e--)a=a-1==-1?this.items.length-1:a-1;o.length&&o.forEach(function(t){var i=n.data("left")-t.data("width");t.css({left:i}).data({left:i,area:i+t.data("width"),center:i-(s.vp/2-t.data("cwidth")/2)}),n=t})}}}),t.$doc.on("mousemove.uikit.slider touchmove.uikit.slider",function(t){if(t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),e&&Math.abs(t.pageX-e.x)>e.threshold&&(window.getSelection().toString()?i=e=!1:e(t)),i){var s,n,o,r,h,c,f,u,d,l;if(t.clientX||t.clientY?s=t.clientX:(t.pageX||t.pageY)&&(s=t.pageX-document.body.scrollLeft-document.documentElement.scrollLeft),h=a.focus,n=s-i.element.data("pointer-start").x,o=i.element.data("pointer-pos-start")+n,r=s>i.element.data("pointer-start").x?-1:1,c=i.items.eq(a.focus),1==r)for(f=c.data("left")+Math.abs(n),u=0,d=a.focus;u<i.items.length;u++){if(l=i.items.eq(d),d!=a.focus&&l.data("left")<f&&l.data("area")>f){h=d;break}d=d+1==i.items.length?0:d+1}else for(f=c.data("left")-Math.abs(n),u=0,d=a.focus;u<i.items.length;u++){if(l=i.items.eq(d),d!=a.focus&&l.data("area")<=c.data("left")&&l.data("center")<f){h=d;break}d=d-1==-1?i.items.length-1:d-1}i.options.infinite&&h!=a._focus&&i.infinite(h,r),i.updatePos(o),a.dir=r,a._focus=h,a.touchx=parseInt(t.pageX,10),a.diff=f}}),t.$doc.on("mouseup.uikit.slider touchend.uikit.slider",function(){if(i){i.container.removeClass("uk-drag"),i.items.eq(a.focus);var t,s,n,o=!1;if(1==a.dir)for(s=0,n=a.focus;s<i.items.length;s++){if(t=i.items.eq(n),n!=a.focus&&t.data("left")>a.diff){o=n;break}n=n+1==i.items.length?0:n+1}else for(s=0,n=a.focus;s<i.items.length;s++){if(t=i.items.eq(n),n!=a.focus&&t.data("left")<a.diff){o=n;break}n=n-1==-1?i.items.length-1:n-1}i.updateFocus(o!==!1?o:a._focus)}i=e=!1}),t.slider});
@@ -0,0 +1,502 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(addon) {
3
+
4
+ var component;
5
+
6
+ if (window.UIkit) {
7
+ component = addon(UIkit);
8
+ }
9
+
10
+ if (typeof define == "function" && define.amd) {
11
+ define("uikit-slideset", ["uikit"], function(){
12
+ return component || addon(UIkit);
13
+ });
14
+ }
15
+
16
+ })(function(UI){
17
+
18
+ "use strict";
19
+
20
+ var Animations;
21
+
22
+ UI.component('slideset', {
23
+
24
+ defaults: {
25
+ default : 1,
26
+ animation : 'fade',
27
+ duration : 200,
28
+ filter : '',
29
+ delay : false,
30
+ controls : false,
31
+ autoplay : false,
32
+ autoplayInterval : 7000,
33
+ pauseOnHover : true
34
+ },
35
+
36
+ sets: [],
37
+
38
+ boot: function() {
39
+
40
+ // auto init
41
+ UI.ready(function(context) {
42
+
43
+ UI.$("[data-uk-slideset]", context).each(function(){
44
+
45
+ var ele = UI.$(this);
46
+
47
+ if(!ele.data("slideset")) {
48
+ UI.slideset(ele, UI.Utils.options(ele.attr("data-uk-slideset")));
49
+ }
50
+ });
51
+ });
52
+ },
53
+
54
+ init: function() {
55
+
56
+ var $this = this;
57
+
58
+ this.activeSet = false;
59
+ this.list = this.element.find('.uk-slideset');
60
+ this.nav = this.element.find('.uk-slideset-nav');
61
+ this.controls = this.options.controls ? UI.$(this.options.controls) : this.element;
62
+
63
+ UI.$win.on("resize load", UI.Utils.debounce(function() {
64
+ $this.updateSets();
65
+ }, 100));
66
+
67
+ $this.list.addClass('uk-grid-width-1-'+$this.options.default);
68
+
69
+ ['xlarge', 'large', 'medium', 'small'].forEach(function(bp) {
70
+
71
+ if (!$this.options[bp]) {
72
+ return;
73
+ }
74
+
75
+ $this.list.addClass('uk-grid-width-'+bp+'-1-'+$this.options[bp]);
76
+ });
77
+
78
+ this.on("click.uikit.slideset", '[data-uk-slideset-item]', function(e) {
79
+
80
+ e.preventDefault();
81
+
82
+ if ($this.animating) {
83
+ return;
84
+ }
85
+
86
+ var set = UI.$(this).attr('data-uk-slideset-item');
87
+
88
+ if ($this.activeSet === set) return;
89
+
90
+ switch(set) {
91
+ case 'next':
92
+ case 'previous':
93
+ $this[set=='next' ? 'next':'previous']();
94
+ break;
95
+ default:
96
+ $this.show(parseInt(set, 10));
97
+ }
98
+
99
+ });
100
+
101
+ this.controls.on('click.uikit.slideset', '[data-uk-filter]', function(e) {
102
+
103
+ var ele = UI.$(this);
104
+
105
+ if (ele.parent().hasClass('uk-slideset')) {
106
+ return;
107
+ }
108
+
109
+ e.preventDefault();
110
+
111
+ if ($this.animating || $this.currentFilter == ele.attr('data-uk-filter')) {
112
+ return;
113
+ }
114
+
115
+ $this.updateFilter(ele.attr('data-uk-filter'));
116
+
117
+ $this._hide().then(function(){
118
+
119
+ $this.updateSets(true, true);
120
+ });
121
+ });
122
+
123
+ this.on('swipeRight swipeLeft', function(e) {
124
+ $this[e.type=='swipeLeft' ? 'next' : 'previous']();
125
+ });
126
+
127
+ this.updateFilter(this.options.filter);
128
+ this.updateSets();
129
+
130
+ this.element.on({
131
+ mouseenter: function() { if ($this.options.pauseOnHover) $this.hovering = true; },
132
+ mouseleave: function() { $this.hovering = false; }
133
+ });
134
+
135
+ // Set autoplay
136
+ if (this.options.autoplay) {
137
+ this.start();
138
+ }
139
+ },
140
+
141
+ updateSets: function(animate, force) {
142
+
143
+ var visible = this.visible, i;
144
+
145
+ this.visible = this.getVisibleOnCurrenBreakpoint();
146
+
147
+ if (visible == this.visible && !force) {
148
+ return;
149
+ }
150
+
151
+ this.children = this.list.children().hide();
152
+ this.items = this.getItems();
153
+ this.sets = array_chunk(this.items, this.visible);
154
+
155
+ for (i=0;i<this.sets.length;i++) {
156
+ this.sets[i].css({'display': 'none'});
157
+ }
158
+
159
+ // update nav
160
+ if (this.nav.length && this.nav.empty()) {
161
+
162
+ for (i=0;i<this.sets.length;i++) {
163
+ this.nav.append('<li data-uk-slideset-item="'+i+'"><a></a></li>');
164
+ }
165
+
166
+ this.nav[this.nav.children().length==1 ? 'addClass':'removeClass']('uk-invisible');
167
+ }
168
+
169
+ this.activeSet = false;
170
+ this.show(0, !animate);
171
+ },
172
+
173
+ updateFilter: function(currentfilter) {
174
+
175
+ var $this = this, filter;
176
+
177
+ this.currentFilter = currentfilter;
178
+
179
+ this.controls.find('[data-uk-filter]').each(function(){
180
+
181
+ filter = UI.$(this);
182
+
183
+ if (!filter.parent().hasClass('uk-slideset')) {
184
+
185
+ if (filter.attr('data-uk-filter') == $this.currentFilter) {
186
+ filter.addClass('uk-active');
187
+ } else {
188
+ filter.removeClass('uk-active');
189
+ }
190
+ }
191
+ });
192
+ },
193
+
194
+ getVisibleOnCurrenBreakpoint: function() {
195
+
196
+ var breakpoint = null,
197
+ tmp = UI.$('<div style="position:absolute;height:1px;top:-1000px;width:100px"><div></div></div>').appendTo('body'),
198
+ testdiv = tmp.children().eq(0),
199
+ breakpoints = this.options;
200
+
201
+ ['xlarge', 'large', 'medium', 'small'].forEach(function(bp) {
202
+
203
+ if (!breakpoints[bp] || breakpoint) {
204
+ return;
205
+ }
206
+
207
+ tmp.attr('class', 'uk-grid-width-'+bp+'-1-2').width();
208
+
209
+ if (testdiv.width() == 50) {
210
+ breakpoint = bp;
211
+ }
212
+ });
213
+
214
+ tmp.remove();
215
+
216
+ return this.options[breakpoint] || this.options['default'];
217
+ },
218
+
219
+ getItems: function() {
220
+
221
+ var items = [], filter;
222
+
223
+ if (this.currentFilter) {
224
+
225
+ filter = this.currentFilter || [];
226
+
227
+ if (typeof(filter) === 'string') {
228
+ filter = filter.split(/,/).map(function(item){ return item.trim(); });
229
+ }
230
+
231
+ this.children.each(function(index){
232
+
233
+ var ele = UI.$(this), f = ele.attr('data-uk-filter'), infilter = filter.length ? false : true;
234
+
235
+ if (f) {
236
+
237
+ f = f.split(/,/).map(function(item){ return item.trim(); });
238
+
239
+ filter.forEach(function(item){
240
+ if (f.indexOf(item) > -1) infilter = true;
241
+ });
242
+ }
243
+
244
+ if(infilter) items.push(ele[0]);
245
+ });
246
+
247
+ items = UI.$(items);
248
+
249
+ } else {
250
+ items = this.list.children();
251
+ }
252
+
253
+ return items;
254
+ },
255
+
256
+ show: function(setIndex, noanimate, dir) {
257
+
258
+ var $this = this;
259
+
260
+ if (this.activeSet === setIndex || this.animating) {
261
+ return;
262
+ }
263
+
264
+ dir = dir || (setIndex < this.activeSet ? -1:1);
265
+
266
+ var current = this.sets[this.activeSet] || [],
267
+ next = this.sets[setIndex],
268
+ animation = this._getAnimation();
269
+
270
+ if (noanimate || !UI.support.animation) {
271
+ animation = Animations.none;
272
+ }
273
+
274
+ this.animating = true;
275
+
276
+ if (this.nav.length) {
277
+ this.nav.children().removeClass('uk-active').eq(setIndex).addClass('uk-active');
278
+ }
279
+
280
+ animation.apply($this, [current, next, dir]).then(function(){
281
+
282
+ UI.Utils.checkDisplay(next, true);
283
+
284
+ $this.children.hide().removeClass('uk-active');
285
+ next.addClass('uk-active').css({'display': '', 'opacity':''});
286
+
287
+ $this.animating = false;
288
+ $this.activeSet = setIndex;
289
+
290
+ UI.Utils.checkDisplay(next, true);
291
+
292
+ $this.trigger('show.uk.slideset', [next]);
293
+ });
294
+
295
+ },
296
+
297
+ _getAnimation: function() {
298
+
299
+ var animation = Animations[this.options.animation] || Animations.none;
300
+
301
+ if (!UI.support.animation) {
302
+ animation = Animations.none;
303
+ }
304
+
305
+ return animation;
306
+ },
307
+
308
+ _hide: function() {
309
+
310
+ var $this = this,
311
+ current = this.sets[this.activeSet] || [],
312
+ animation = this._getAnimation();
313
+
314
+ this.animating = true;
315
+
316
+ return animation.apply($this, [current, [], 1]).then(function(){
317
+ $this.animating = false;
318
+ });
319
+ },
320
+
321
+ next: function() {
322
+ this.show(this.sets[this.activeSet + 1] ? (this.activeSet + 1) : 0, false, 1);
323
+ },
324
+
325
+ previous: function() {
326
+ this.show(this.sets[this.activeSet - 1] ? (this.activeSet - 1) : (this.sets.length - 1), false, -1);
327
+ },
328
+
329
+ start: function() {
330
+
331
+ this.stop();
332
+
333
+ var $this = this;
334
+
335
+ this.interval = setInterval(function() {
336
+ if (!$this.hovering && !$this.animating) $this.next();
337
+ }, this.options.autoplayInterval);
338
+
339
+ },
340
+
341
+ stop: function() {
342
+ if (this.interval) clearInterval(this.interval);
343
+ }
344
+ });
345
+
346
+ Animations = {
347
+
348
+ 'none': function() {
349
+ var d = UI.$.Deferred();
350
+ d.resolve();
351
+ return d.promise();
352
+ },
353
+
354
+ 'fade': function(current, next) {
355
+ return coreAnimation.apply(this, ['uk-animation-fade', current, next]);
356
+ },
357
+
358
+ 'slide-bottom': function(current, next) {
359
+ return coreAnimation.apply(this, ['uk-animation-slide-bottom', current, next]);
360
+ },
361
+
362
+ 'slide-top': function(current, next) {
363
+ return coreAnimation.apply(this, ['uk-animation-slide-top', current, next]);
364
+ },
365
+
366
+ 'slide-vertical': function(current, next, dir) {
367
+
368
+ var anim = ['uk-animation-slide-top', 'uk-animation-slide-bottom'];
369
+
370
+ if (dir == -1) {
371
+ anim.reverse();
372
+ }
373
+
374
+ return coreAnimation.apply(this, [anim, current, next]);
375
+ },
376
+
377
+ 'slide-horizontal': function(current, next, dir) {
378
+
379
+ var anim = ['uk-animation-slide-right', 'uk-animation-slide-left'];
380
+
381
+ if (dir == -1) {
382
+ anim.reverse();
383
+ }
384
+
385
+ return coreAnimation.apply(this, [anim, current, next, dir]);
386
+ },
387
+
388
+ 'scale': function(current, next) {
389
+ return coreAnimation.apply(this, ['uk-animation-scale-up', current, next]);
390
+ }
391
+ };
392
+
393
+ UI.slideset.animations = Animations;
394
+
395
+ // helpers
396
+
397
+ function coreAnimation(cls, current, next, dir) {
398
+
399
+ var d = UI.$.Deferred(),
400
+ delay = (this.options.delay === false) ? Math.floor(this.options.duration/2) : this.options.delay,
401
+ $this = this, clsIn, clsOut, release, i;
402
+
403
+ dir = dir || 1;
404
+
405
+ this.element.css('min-height', this.element.height());
406
+
407
+ if (next[0]===current[0]) {
408
+ d.resolve();
409
+ return d.promise();
410
+ }
411
+
412
+ if (typeof(cls) == 'object') {
413
+ clsIn = cls[0];
414
+ clsOut = cls[1] || cls[0];
415
+ } else {
416
+ clsIn = cls;
417
+ clsOut = clsIn;
418
+ }
419
+
420
+ release = function() {
421
+
422
+ if (current && current.length) {
423
+ current.hide().removeClass(clsOut+' uk-animation-reverse').css({'opacity':'', 'animation-delay': '', 'animation':''});
424
+ }
425
+
426
+ if (!next.length) {
427
+ d.resolve();
428
+ return;
429
+ }
430
+
431
+ for (i=0;i<next.length;i++) {
432
+ next.eq(dir == 1 ? i:(next.length - i)-1).css('animation-delay', (i*delay)+'ms');
433
+ }
434
+
435
+ next.addClass(clsIn)[dir==1 ? 'last':'first']().one(UI.support.animation.end, function() {
436
+
437
+ next.removeClass(''+clsIn+'').css({opacity:'', display:'', 'animation-delay':'', 'animation':''});
438
+ d.resolve();
439
+ $this.element.css('min-height', '');
440
+
441
+ }).end().css('display', '');
442
+ };
443
+
444
+ if (next.length) {
445
+ next.css('animation-duration', this.options.duration+'ms');
446
+ }
447
+
448
+ if (current && current.length) {
449
+
450
+ current.css('animation-duration', this.options.duration+'ms')[dir==1 ? 'last':'first']().one(UI.support.animation.end, function() {
451
+ release();
452
+ });
453
+
454
+ for (i=0;i<current.length;i++) {
455
+
456
+ (function (index, ele){
457
+
458
+ setTimeout(function(){
459
+ ele.css('display', 'none').css('display', '').css('opacity', 0).addClass(clsOut+' uk-animation-reverse');
460
+ }.bind(this), i * delay);
461
+
462
+ })(i, current.eq(dir == 1 ? i:(current.length - i)-1));
463
+ }
464
+
465
+ } else {
466
+ release();
467
+ }
468
+
469
+ return d.promise();
470
+ }
471
+
472
+ function array_chunk(input, size) {
473
+
474
+ var x, i = 0, c = -1, l = input.length || 0, n = [];
475
+
476
+ if (size < 1) return null;
477
+
478
+ while (i < l) {
479
+
480
+ x = i % size;
481
+
482
+ if(x) {
483
+ n[c][x] = input[i];
484
+ } else {
485
+ n[++c] = [input[i]];
486
+ }
487
+
488
+ i++;
489
+ }
490
+
491
+ i = 0;
492
+ l = n.length;
493
+
494
+ while (i < l) {
495
+ n[i] = jQuery(n[i]);
496
+ i++;
497
+ }
498
+
499
+ return n;
500
+ }
501
+
502
+ });