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){"use strict";t.component("tab",{defaults:{target:">li:not(.uk-tab-responsive, .uk-disabled)",connect:!1,active:0,animation:!1,duration:200},boot:function(){t.ready(function(i){t.$("[data-uk-tab]",i).each(function(){var i=t.$(this);if(!i.data("tab")){t.tab(i,t.Utils.options(i.attr("data-uk-tab")))}})})},init:function(){var i=this;this.current=!1,this.on("click.uikit.tab",this.options.target,function(e){if(e.preventDefault(),!i.switcher||!i.switcher.animating){var s=i.find(i.options.target).not(this);s.removeClass("uk-active").blur(),i.trigger("change.uk.tab",[t.$(this).addClass("uk-active"),i.current]),i.current=t.$(this),i.options.connect||(s.attr("aria-expanded","false"),t.$(this).attr("aria-expanded","true"))}}),this.options.connect&&(this.connect=t.$(this.options.connect)),this.responsivetab=t.$('<li class="uk-tab-responsive uk-active"><a></a></li>').append('<div class="uk-dropdown uk-dropdown-small"><ul class="uk-nav uk-nav-dropdown"></ul><div>'),this.responsivetab.dropdown=this.responsivetab.find(".uk-dropdown"),this.responsivetab.lst=this.responsivetab.dropdown.find("ul"),this.responsivetab.caption=this.responsivetab.find("a:first"),this.element.hasClass("uk-tab-bottom")&&this.responsivetab.dropdown.addClass("uk-dropdown-up"),this.responsivetab.lst.on("click.uikit.tab","a",function(e){e.preventDefault(),e.stopPropagation();var s=t.$(this);i.element.children("li:not(.uk-tab-responsive)").eq(s.data("index")).trigger("click")}),this.on("show.uk.switcher change.uk.tab",function(t,e){i.responsivetab.caption.html(e.text())}),this.element.append(this.responsivetab),this.options.connect&&(this.switcher=t.switcher(this.element,{toggle:">li:not(.uk-tab-responsive)",connect:this.options.connect,active:this.options.active,animation:this.options.animation,duration:this.options.duration})),t.dropdown(this.responsivetab,{mode:"click"}),i.trigger("change.uk.tab",[this.element.find(this.options.target).not(".uk-tab-responsive").filter(".uk-active")]),this.check(),t.$win.on("resize orientationchange",t.Utils.debounce(function(){i.element.is(":visible")&&i.check()},100)),this.on("display.uk.check",function(){i.element.is(":visible")&&i.check()})},check:function(){var i=this.element.children("li:not(.uk-tab-responsive)").removeClass("uk-hidden");if(!i.length)return this.responsivetab.addClass("uk-hidden"),void 0;var e,s,n,a=i.eq(0).offset().top+Math.ceil(i.eq(0).height()/2),o=!1;if(this.responsivetab.lst.empty(),i.each(function(){t.$(this).offset().top>a&&(o=!0)}),o)for(var r=0;r<i.length;r++)e=t.$(i.eq(r)),s=e.find("a"),"none"==e.css("float")||e.attr("uk-dropdown")||(e.hasClass("uk-disabled")||(n=e[0].outerHTML.replace("<a ",'<a data-index="'+r+'" '),this.responsivetab.lst.append(n)),e.addClass("uk-hidden"));this.responsivetab[this.responsivetab.lst.children("li").length?"removeClass":"addClass"]("uk-hidden")}})}(UIkit);
@@ -0,0 +1,120 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(UI){
3
+
4
+ "use strict";
5
+
6
+ var toggles = [];
7
+
8
+ UI.component('toggle', {
9
+
10
+ defaults: {
11
+ target : false,
12
+ cls : 'uk-hidden',
13
+ animation : false,
14
+ duration : 200
15
+ },
16
+
17
+ boot: function(){
18
+
19
+ // init code
20
+ UI.ready(function(context) {
21
+
22
+ UI.$("[data-uk-toggle]", context).each(function() {
23
+ var ele = UI.$(this);
24
+
25
+ if (!ele.data("toggle")) {
26
+ var obj = UI.toggle(ele, UI.Utils.options(ele.attr("data-uk-toggle")));
27
+ }
28
+ });
29
+
30
+ setTimeout(function(){
31
+
32
+ toggles.forEach(function(toggle){
33
+ toggle.getToggles();
34
+ });
35
+
36
+ }, 0);
37
+ });
38
+ },
39
+
40
+ init: function() {
41
+
42
+ var $this = this;
43
+
44
+ this.aria = (this.options.cls.indexOf('uk-hidden') !== -1);
45
+
46
+ this.getToggles();
47
+
48
+ this.on("click", function(e) {
49
+ if ($this.element.is('a[href="#"]')) e.preventDefault();
50
+ $this.toggle();
51
+ });
52
+
53
+ toggles.push(this);
54
+ },
55
+
56
+ toggle: function() {
57
+
58
+ if(!this.totoggle.length) return;
59
+
60
+ if (this.options.animation && UI.support.animation) {
61
+
62
+ var $this = this, animations = this.options.animation.split(',');
63
+
64
+ if (animations.length == 1) {
65
+ animations[1] = animations[0];
66
+ }
67
+
68
+ animations[0] = animations[0].trim();
69
+ animations[1] = animations[1].trim();
70
+
71
+ this.totoggle.css('animation-duration', this.options.duration+'ms');
72
+
73
+ this.totoggle.each(function(){
74
+
75
+ var ele = UI.$(this);
76
+
77
+ if (ele.hasClass($this.options.cls)) {
78
+
79
+ ele.toggleClass($this.options.cls);
80
+
81
+ UI.Utils.animate(ele, animations[0]).then(function(){
82
+ ele.css('animation-duration', '');
83
+ UI.Utils.checkDisplay(ele);
84
+ });
85
+
86
+ } else {
87
+
88
+ UI.Utils.animate(this, animations[1]+' uk-animation-reverse').then(function(){
89
+ ele.toggleClass($this.options.cls).css('animation-duration', '');
90
+ UI.Utils.checkDisplay(ele);
91
+ });
92
+
93
+ }
94
+
95
+ });
96
+
97
+ } else {
98
+ this.totoggle.toggleClass(this.options.cls);
99
+ UI.Utils.checkDisplay(this.totoggle);
100
+ }
101
+
102
+ this.updateAria();
103
+
104
+ },
105
+
106
+ getToggles: function() {
107
+ this.totoggle = this.options.target ? UI.$(this.options.target):[];
108
+ this.updateAria();
109
+ },
110
+
111
+ updateAria: function() {
112
+ if (this.aria && this.totoggle.length) {
113
+ this.totoggle.each(function(){
114
+ UI.$(this).attr('aria-hidden', UI.$(this).hasClass('uk-hidden'));
115
+ });
116
+ }
117
+ }
118
+ });
119
+
120
+ })(UIkit);
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){"use strict";var i=[];t.component("toggle",{defaults:{target:!1,cls:"uk-hidden",animation:!1,duration:200},boot:function(){t.ready(function(o){t.$("[data-uk-toggle]",o).each(function(){var i=t.$(this);if(!i.data("toggle")){t.toggle(i,t.Utils.options(i.attr("data-uk-toggle")))}}),setTimeout(function(){i.forEach(function(t){t.getToggles()})},0)})},init:function(){var t=this;this.aria=-1!==this.options.cls.indexOf("uk-hidden"),this.getToggles(),this.on("click",function(i){t.element.is('a[href="#"]')&&i.preventDefault(),t.toggle()}),i.push(this)},toggle:function(){if(this.totoggle.length){if(this.options.animation&&t.support.animation){var i=this,o=this.options.animation.split(",");1==o.length&&(o[1]=o[0]),o[0]=o[0].trim(),o[1]=o[1].trim(),this.totoggle.css("animation-duration",this.options.duration+"ms"),this.totoggle.each(function(){var s=t.$(this);s.hasClass(i.options.cls)?(s.toggleClass(i.options.cls),t.Utils.animate(s,o[0]).then(function(){s.css("animation-duration",""),t.Utils.checkDisplay(s)})):t.Utils.animate(this,o[1]+" uk-animation-reverse").then(function(){s.toggleClass(i.options.cls).css("animation-duration",""),t.Utils.checkDisplay(s)})})}else this.totoggle.toggleClass(this.options.cls),t.Utils.checkDisplay(this.totoggle);this.updateAria()}},getToggles:function(){this.totoggle=this.options.target?t.$(this.options.target):[],this.updateAria()},updateAria:function(){this.aria&&this.totoggle.length&&this.totoggle.each(function(){t.$(this).attr("aria-hidden",t.$(this).hasClass("uk-hidden"))})}})}(UIkit);
@@ -0,0 +1,173 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ // Based on Zeptos touch.js
3
+ // https://raw.github.com/madrobby/zepto/master/src/touch.js
4
+ // Zepto.js may be freely distributed under the MIT license.
5
+
6
+ ;(function($){
7
+
8
+ if ($.fn.swipeLeft) {
9
+ return;
10
+ }
11
+
12
+
13
+ var touch = {}, touchTimeout, tapTimeout, swipeTimeout, longTapTimeout, longTapDelay = 750, gesture;
14
+
15
+ function swipeDirection(x1, x2, y1, y2) {
16
+ return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down');
17
+ }
18
+
19
+ function longTap() {
20
+ longTapTimeout = null;
21
+ if (touch.last) {
22
+ touch.el.trigger('longTap');
23
+ touch = {};
24
+ }
25
+ }
26
+
27
+ function cancelLongTap() {
28
+ if (longTapTimeout) clearTimeout(longTapTimeout);
29
+ longTapTimeout = null;
30
+ }
31
+
32
+ function cancelAll() {
33
+ if (touchTimeout) clearTimeout(touchTimeout);
34
+ if (tapTimeout) clearTimeout(tapTimeout);
35
+ if (swipeTimeout) clearTimeout(swipeTimeout);
36
+ if (longTapTimeout) clearTimeout(longTapTimeout);
37
+ touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null;
38
+ touch = {};
39
+ }
40
+
41
+ function isPrimaryTouch(event){
42
+ return event.pointerType == event.MSPOINTER_TYPE_TOUCH && event.isPrimary;
43
+ }
44
+
45
+ $(function(){
46
+ var now, delta, deltaX = 0, deltaY = 0, firstTouch;
47
+
48
+ if ('MSGesture' in window) {
49
+ gesture = new MSGesture();
50
+ gesture.target = document.body;
51
+ }
52
+
53
+ $(document)
54
+ .on('MSGestureEnd gestureend', function(e){
55
+
56
+ var swipeDirectionFromVelocity = e.originalEvent.velocityX > 1 ? 'Right' : e.originalEvent.velocityX < -1 ? 'Left' : e.originalEvent.velocityY > 1 ? 'Down' : e.originalEvent.velocityY < -1 ? 'Up' : null;
57
+
58
+ if (swipeDirectionFromVelocity) {
59
+ touch.el.trigger('swipe');
60
+ touch.el.trigger('swipe'+ swipeDirectionFromVelocity);
61
+ }
62
+ })
63
+ // MSPointerDown: for IE10
64
+ // pointerdown: for IE11
65
+ .on('touchstart MSPointerDown pointerdown', function(e){
66
+
67
+ if(e.type == 'MSPointerDown' && !isPrimaryTouch(e.originalEvent)) return;
68
+
69
+ firstTouch = (e.type == 'MSPointerDown' || e.type == 'pointerdown') ? e : e.originalEvent.touches[0];
70
+
71
+ now = Date.now();
72
+ delta = now - (touch.last || now);
73
+ touch.el = $('tagName' in firstTouch.target ? firstTouch.target : firstTouch.target.parentNode);
74
+
75
+ if(touchTimeout) clearTimeout(touchTimeout);
76
+
77
+ touch.x1 = firstTouch.pageX;
78
+ touch.y1 = firstTouch.pageY;
79
+
80
+ if (delta > 0 && delta <= 250) touch.isDoubleTap = true;
81
+
82
+ touch.last = now;
83
+ longTapTimeout = setTimeout(longTap, longTapDelay);
84
+
85
+ // adds the current touch contact for IE gesture recognition
86
+ if (gesture && ( e.type == 'MSPointerDown' || e.type == 'pointerdown' || e.type == 'touchstart' ) ) {
87
+ gesture.addPointer(e.originalEvent.pointerId);
88
+ }
89
+
90
+ })
91
+ // MSPointerMove: for IE10
92
+ // pointermove: for IE11
93
+ .on('touchmove MSPointerMove pointermove', function(e){
94
+
95
+ if (e.type == 'MSPointerMove' && !isPrimaryTouch(e.originalEvent)) return;
96
+
97
+ firstTouch = (e.type == 'MSPointerMove' || e.type == 'pointermove') ? e : e.originalEvent.touches[0];
98
+
99
+ cancelLongTap();
100
+ touch.x2 = firstTouch.pageX;
101
+ touch.y2 = firstTouch.pageY;
102
+
103
+ deltaX += Math.abs(touch.x1 - touch.x2);
104
+ deltaY += Math.abs(touch.y1 - touch.y2);
105
+ })
106
+ // MSPointerUp: for IE10
107
+ // pointerup: for IE11
108
+ .on('touchend MSPointerUp pointerup', function(e){
109
+
110
+ if (e.type == 'MSPointerUp' && !isPrimaryTouch(e.originalEvent)) return;
111
+
112
+ cancelLongTap();
113
+
114
+ // swipe
115
+ if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)){
116
+
117
+ swipeTimeout = setTimeout(function() {
118
+ touch.el.trigger('swipe');
119
+ touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2)));
120
+ touch = {};
121
+ }, 0);
122
+
123
+ // normal tap
124
+ } else if ('last' in touch) {
125
+
126
+ // don't fire tap when delta position changed by more than 30 pixels,
127
+ // for instance when moving to a point and back to origin
128
+ if (isNaN(deltaX) || (deltaX < 30 && deltaY < 30)) {
129
+ // delay by one tick so we can cancel the 'tap' event if 'scroll' fires
130
+ // ('tap' fires before 'scroll')
131
+ tapTimeout = setTimeout(function() {
132
+
133
+ // trigger universal 'tap' with the option to cancelTouch()
134
+ // (cancelTouch cancels processing of single vs double taps for faster 'tap' response)
135
+ var event = $.Event('tap');
136
+ event.cancelTouch = cancelAll;
137
+ touch.el.trigger(event);
138
+
139
+ // trigger double tap immediately
140
+ if (touch.isDoubleTap) {
141
+ touch.el.trigger('doubleTap');
142
+ touch = {};
143
+ }
144
+
145
+ // trigger single tap after 250ms of inactivity
146
+ else {
147
+ touchTimeout = setTimeout(function(){
148
+ touchTimeout = null;
149
+ touch.el.trigger('singleTap');
150
+ touch = {};
151
+ }, 250);
152
+ }
153
+ }, 0);
154
+ } else {
155
+ touch = {};
156
+ }
157
+ deltaX = deltaY = 0;
158
+ }
159
+ })
160
+ // when the browser window loses focus,
161
+ // for example when a modal dialog is shown,
162
+ // cancel all ongoing events
163
+ .on('touchcancel MSPointerCancel', cancelAll);
164
+
165
+ // scrolling the window indicates intention of the user
166
+ // to scroll, not tap or swipe, so cancel all ongoing events
167
+ $(window).on('scroll', cancelAll);
168
+ });
169
+
170
+ ['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(eventName){
171
+ $.fn[eventName] = function(callback){ return $(this).on(eventName, callback); };
172
+ });
173
+ })(jQuery);
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(e){function t(e,t,n,o){return Math.abs(e-t)>=Math.abs(n-o)?e-t>0?"Left":"Right":n-o>0?"Up":"Down"}function n(){p=null,g.last&&(g.el.trigger("longTap"),g={})}function o(){p&&clearTimeout(p),p=null}function i(){a&&clearTimeout(a),l&&clearTimeout(l),u&&clearTimeout(u),p&&clearTimeout(p),a=l=u=p=null,g={}}function r(e){return e.pointerType==e.MSPOINTER_TYPE_TOUCH&&e.isPrimary}if(!e.fn.swipeLeft){var a,l,u,p,c,g={},s=750;e(function(){var y,w,v,f=0,M=0;"MSGesture"in window&&(c=new MSGesture,c.target=document.body),e(document).on("MSGestureEnd gestureend",function(e){var t=e.originalEvent.velocityX>1?"Right":e.originalEvent.velocityX<-1?"Left":e.originalEvent.velocityY>1?"Down":e.originalEvent.velocityY<-1?"Up":null;t&&(g.el.trigger("swipe"),g.el.trigger("swipe"+t))}).on("touchstart MSPointerDown pointerdown",function(t){("MSPointerDown"!=t.type||r(t.originalEvent))&&(v="MSPointerDown"==t.type||"pointerdown"==t.type?t:t.originalEvent.touches[0],y=Date.now(),w=y-(g.last||y),g.el=e("tagName"in v.target?v.target:v.target.parentNode),a&&clearTimeout(a),g.x1=v.pageX,g.y1=v.pageY,w>0&&250>=w&&(g.isDoubleTap=!0),g.last=y,p=setTimeout(n,s),!c||"MSPointerDown"!=t.type&&"pointerdown"!=t.type&&"touchstart"!=t.type||c.addPointer(t.originalEvent.pointerId))}).on("touchmove MSPointerMove pointermove",function(e){("MSPointerMove"!=e.type||r(e.originalEvent))&&(v="MSPointerMove"==e.type||"pointermove"==e.type?e:e.originalEvent.touches[0],o(),g.x2=v.pageX,g.y2=v.pageY,f+=Math.abs(g.x1-g.x2),M+=Math.abs(g.y1-g.y2))}).on("touchend MSPointerUp pointerup",function(n){("MSPointerUp"!=n.type||r(n.originalEvent))&&(o(),g.x2&&Math.abs(g.x1-g.x2)>30||g.y2&&Math.abs(g.y1-g.y2)>30?u=setTimeout(function(){g.el.trigger("swipe"),g.el.trigger("swipe"+t(g.x1,g.x2,g.y1,g.y2)),g={}},0):"last"in g&&(isNaN(f)||30>f&&30>M?l=setTimeout(function(){var t=e.Event("tap");t.cancelTouch=i,g.el.trigger(t),g.isDoubleTap?(g.el.trigger("doubleTap"),g={}):a=setTimeout(function(){a=null,g.el.trigger("singleTap"),g={}},250)},0):g={},f=M=0))}).on("touchcancel MSPointerCancel",i),e(window).on("scroll",i)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(t){e.fn[t]=function(n){return e(this).on(t,n)}})}}(jQuery);
@@ -0,0 +1,239 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(UI) {
3
+
4
+ "use strict";
5
+
6
+ var stacks = [];
7
+
8
+ UI.component('stackMargin', {
9
+
10
+ defaults: {
11
+ 'cls': 'uk-margin-small-top'
12
+ },
13
+
14
+ boot: function() {
15
+
16
+ // init code
17
+ UI.ready(function(context) {
18
+
19
+ UI.$("[data-uk-margin]", context).each(function() {
20
+
21
+ var ele = UI.$(this), obj;
22
+
23
+ if (!ele.data("stackMargin")) {
24
+ obj = UI.stackMargin(ele, UI.Utils.options(ele.attr("data-uk-margin")));
25
+ }
26
+ });
27
+ });
28
+ },
29
+
30
+ init: function() {
31
+
32
+ var $this = this;
33
+
34
+ this.columns = [];
35
+
36
+ UI.$win.on('resize orientationchange', (function() {
37
+
38
+ var fn = function() {
39
+ $this.process();
40
+ };
41
+
42
+ UI.$(function() {
43
+ fn();
44
+ UI.$win.on("load", fn);
45
+ });
46
+
47
+ return UI.Utils.debounce(fn, 20);
48
+ })());
49
+
50
+ UI.$html.on("changed.uk.dom", function(e) {
51
+ $this.process();
52
+ });
53
+
54
+ this.on("display.uk.check", function(e) {
55
+ if (this.element.is(":visible")) this.process();
56
+ }.bind(this));
57
+
58
+ stacks.push(this);
59
+ },
60
+
61
+ process: function() {
62
+
63
+ this.columns = this.element.children();
64
+
65
+ UI.Utils.stackMargin(this.columns, this.options);
66
+
67
+ return this;
68
+ },
69
+
70
+ revert: function() {
71
+ this.columns.removeClass(this.options.cls);
72
+ return this;
73
+ }
74
+ });
75
+
76
+
77
+ // responsive element e.g. iframes
78
+
79
+ (function(){
80
+
81
+ var elements = [], check = function(ele) {
82
+
83
+ if (!ele.is(':visible')) return;
84
+
85
+ var width = ele.parent().width(),
86
+ iwidth = ele.data('width'),
87
+ ratio = (width / iwidth),
88
+ height = Math.floor(ratio * ele.data('height'));
89
+
90
+ ele.css({'height': (width < iwidth) ? height : ele.data('height')});
91
+ };
92
+
93
+ UI.component('responsiveElement', {
94
+
95
+ defaults: {},
96
+
97
+ boot: function() {
98
+
99
+ // init code
100
+ UI.ready(function(context) {
101
+
102
+ UI.$("iframe.uk-responsive-width, [data-uk-responsive]", context).each(function() {
103
+
104
+ var ele = UI.$(this), obj;
105
+
106
+ if (!ele.data("responsiveIframe")) {
107
+ obj = UI.responsiveElement(ele, {});
108
+ }
109
+ });
110
+ });
111
+ },
112
+
113
+ init: function() {
114
+
115
+ var ele = this.element;
116
+
117
+ if (ele.attr('width') && ele.attr('height')) {
118
+
119
+ ele.data({
120
+
121
+ 'width' : ele.attr('width'),
122
+ 'height': ele.attr('height')
123
+
124
+ }).on('display.uk.check', function(){
125
+ check(ele);
126
+ });
127
+
128
+ check(ele);
129
+
130
+ elements.push(ele);
131
+ }
132
+ }
133
+ });
134
+
135
+ UI.$win.on('resize load', UI.Utils.debounce(function(){
136
+
137
+ elements.forEach(function(ele){
138
+ check(ele);
139
+ });
140
+
141
+ }, 15));
142
+
143
+ })();
144
+
145
+
146
+
147
+ // helper
148
+
149
+ UI.Utils.stackMargin = function(elements, options) {
150
+
151
+ options = UI.$.extend({
152
+ 'cls': 'uk-margin-small-top'
153
+ }, options);
154
+
155
+ options.cls = options.cls;
156
+
157
+ elements = UI.$(elements).removeClass(options.cls);
158
+
159
+ var skip = false,
160
+ firstvisible = elements.filter(":visible:first"),
161
+ offset = firstvisible.length ? (firstvisible.position().top + firstvisible.outerHeight()) - 1 : false; // (-1): weird firefox bug when parent container is display:flex
162
+
163
+ if (offset === false) return;
164
+
165
+ elements.each(function() {
166
+
167
+ var column = UI.$(this);
168
+
169
+ if (column.is(":visible")) {
170
+
171
+ if (skip) {
172
+ column.addClass(options.cls);
173
+ } else {
174
+
175
+ if (column.position().top >= offset) {
176
+ skip = column.addClass(options.cls);
177
+ }
178
+ }
179
+ }
180
+ });
181
+ };
182
+
183
+ UI.Utils.matchHeights = function(elements, options) {
184
+
185
+ elements = UI.$(elements).css('min-height', '');
186
+ options = UI.$.extend({ row : true }, options);
187
+
188
+ var matchHeights = function(group){
189
+
190
+ if (group.length < 2) return;
191
+
192
+ var max = 0;
193
+
194
+ group.each(function() {
195
+ max = Math.max(max, UI.$(this).outerHeight());
196
+ }).each(function() {
197
+
198
+ var element = UI.$(this),
199
+ height = max - (element.css('box-sizing') == 'border-box' ? 0 : (element.outerHeight() - element.height()));
200
+
201
+ element.css('min-height', height + 'px');
202
+ });
203
+ };
204
+
205
+ if (options.row) {
206
+
207
+ elements.first().width(); // force redraw
208
+
209
+ setTimeout(function(){
210
+
211
+ var lastoffset = false, group = [];
212
+
213
+ elements.each(function() {
214
+
215
+ var ele = UI.$(this), offset = ele.offset().top;
216
+
217
+ if (offset != lastoffset && group.length) {
218
+
219
+ matchHeights(UI.$(group));
220
+ group = [];
221
+ offset = ele.offset().top;
222
+ }
223
+
224
+ group.push(ele);
225
+ lastoffset = offset;
226
+ });
227
+
228
+ if (group.length) {
229
+ matchHeights(UI.$(group));
230
+ }
231
+
232
+ }, 0);
233
+
234
+ } else {
235
+ matchHeights(elements);
236
+ }
237
+ };
238
+
239
+ })(UIkit);