uikit2-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +66 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/uikit2/rails.rb +8 -0
- data/lib/uikit2/rails/version.rb +5 -0
- data/uikit2-rails.gemspec +25 -0
- data/vendor/assets/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/javascripts/uikit.js +3537 -0
- data/vendor/assets/javascripts/uikit/components/accordion.js +172 -0
- data/vendor/assets/javascripts/uikit/components/accordion.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/autocomplete.js +334 -0
- data/vendor/assets/javascripts/uikit/components/autocomplete.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/datepicker.js +3166 -0
- data/vendor/assets/javascripts/uikit/components/datepicker.min.js +3 -0
- data/vendor/assets/javascripts/uikit/components/form-password.js +67 -0
- data/vendor/assets/javascripts/uikit/components/form-password.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/form-select.js +70 -0
- data/vendor/assets/javascripts/uikit/components/form-select.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/grid.js +523 -0
- data/vendor/assets/javascripts/uikit/components/grid.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/htmleditor.js +623 -0
- data/vendor/assets/javascripts/uikit/components/htmleditor.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/lightbox.js +555 -0
- data/vendor/assets/javascripts/uikit/components/lightbox.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/nestable.js +638 -0
- data/vendor/assets/javascripts/uikit/components/nestable.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/notify.js +189 -0
- data/vendor/assets/javascripts/uikit/components/notify.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/pagination.js +147 -0
- data/vendor/assets/javascripts/uikit/components/pagination.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/parallax.js +417 -0
- data/vendor/assets/javascripts/uikit/components/parallax.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/search.js +92 -0
- data/vendor/assets/javascripts/uikit/components/search.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/slider.js +520 -0
- data/vendor/assets/javascripts/uikit/components/slider.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/slideset.js +502 -0
- data/vendor/assets/javascripts/uikit/components/slideset.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/slideshow-fx.js +375 -0
- data/vendor/assets/javascripts/uikit/components/slideshow-fx.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/slideshow.js +545 -0
- data/vendor/assets/javascripts/uikit/components/slideshow.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/sortable.js +664 -0
- data/vendor/assets/javascripts/uikit/components/sortable.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/sticky.js +349 -0
- data/vendor/assets/javascripts/uikit/components/sticky.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/timepicker.js +192 -0
- data/vendor/assets/javascripts/uikit/components/timepicker.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/tooltip.js +234 -0
- data/vendor/assets/javascripts/uikit/components/tooltip.min.js +2 -0
- data/vendor/assets/javascripts/uikit/components/upload.js +260 -0
- data/vendor/assets/javascripts/uikit/components/upload.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/alert.js +66 -0
- data/vendor/assets/javascripts/uikit/core/alert.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/button.js +157 -0
- data/vendor/assets/javascripts/uikit/core/button.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/core.js +725 -0
- data/vendor/assets/javascripts/uikit/core/core.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/cover.js +95 -0
- data/vendor/assets/javascripts/uikit/core/cover.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/dropdown.js +421 -0
- data/vendor/assets/javascripts/uikit/core/dropdown.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/grid.js +114 -0
- data/vendor/assets/javascripts/uikit/core/grid.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/modal.js +372 -0
- data/vendor/assets/javascripts/uikit/core/modal.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/nav.js +136 -0
- data/vendor/assets/javascripts/uikit/core/nav.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/offcanvas.js +180 -0
- data/vendor/assets/javascripts/uikit/core/offcanvas.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/scrollspy.js +208 -0
- data/vendor/assets/javascripts/uikit/core/scrollspy.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/smooth-scroll.js +62 -0
- data/vendor/assets/javascripts/uikit/core/smooth-scroll.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/switcher.js +304 -0
- data/vendor/assets/javascripts/uikit/core/switcher.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/tab.js +165 -0
- data/vendor/assets/javascripts/uikit/core/tab.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/toggle.js +120 -0
- data/vendor/assets/javascripts/uikit/core/toggle.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/touch.js +173 -0
- data/vendor/assets/javascripts/uikit/core/touch.min.js +2 -0
- data/vendor/assets/javascripts/uikit/core/utility.js +239 -0
- data/vendor/assets/javascripts/uikit/core/utility.min.js +2 -0
- data/vendor/assets/stylesheets/uikit.almost-flat.css +8551 -0
- data/vendor/assets/stylesheets/uikit.css +8252 -0
- data/vendor/assets/stylesheets/uikit.gradient.css +8614 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.css +39 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.css +37 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.gradient.css +39 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/accordion.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.css +52 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.css +50 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.css +52 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/autocomplete.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.css +129 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.css +123 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.css +139 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/datepicker.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.css +128 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.css +124 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.css +128 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/dotnav.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.css +78 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.css +78 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.css +78 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-advanced.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.gradient.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-file.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.gradient.css +34 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-password.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.css +35 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.css +35 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.gradient.css +35 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/form-select.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.css +222 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.css +164 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.css +229 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/htmleditor.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.css +135 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.css +132 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.gradient.css +139 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/nestable.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/notify.css +92 -0
- data/vendor/assets/stylesheets/uikit/components/notify.gradient.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/notify.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/notify.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.css +29 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.css +29 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.css +29 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/placeholder.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.css +104 -0
- data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/progress.css +94 -0
- data/vendor/assets/stylesheets/uikit/components/progress.gradient.css +112 -0
- data/vendor/assets/stylesheets/uikit/components/progress.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/progress.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/search.almost-flat.css +191 -0
- data/vendor/assets/stylesheets/uikit/components/search.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/search.css +189 -0
- data/vendor/assets/stylesheets/uikit/components/search.gradient.css +191 -0
- data/vendor/assets/stylesheets/uikit/components/search.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/search.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.css +98 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slidenav.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.css +85 -0
- data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slider.css +85 -0
- data/vendor/assets/stylesheets/uikit/components/slider.gradient.css +85 -0
- data/vendor/assets/stylesheets/uikit/components/slider.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slider.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.css +140 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.css +140 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.css +140 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/slideshow.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.css +62 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.css +62 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.gradient.css +62 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sortable.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.css +31 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.css +31 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.gradient.css +31 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/sticky.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.css +118 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.css +116 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.css +118 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/tooltip.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.css +10 -0
- data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/upload.css +10 -0
- data/vendor/assets/stylesheets/uikit/components/upload.gradient.css +10 -0
- data/vendor/assets/stylesheets/uikit/components/upload.gradient.min.css +2 -0
- data/vendor/assets/stylesheets/uikit/components/upload.min.css +2 -0
- 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";var s=t.$win,o=t.$doc,i=[],e=function(){for(var t=0;t<i.length;t++)window.requestAnimationFrame.apply(window,[i[t].check])};t.component("scrollspy",{defaults:{target:!1,cls:"uk-scrollspy-inview",initcls:"uk-scrollspy-init-inview",topoffset:0,leftoffset:0,repeat:!1,delay:0},boot:function(){o.on("scrolling.uk.document",e),s.on("load resize orientationchange",t.Utils.debounce(e,50)),t.ready(function(s){t.$("[data-uk-scrollspy]",s).each(function(){var s=t.$(this);if(!s.data("scrollspy")){t.scrollspy(s,t.Utils.options(s.attr("data-uk-scrollspy")))}})})},init:function(){var s,o=this,e=this.options.cls.split(/,/),l=function(){var i=o.options.target?o.element.find(o.options.target):o.element,l=1===i.length?1:0,n=0;i.each(function(){var i=t.$(this),a=i.data("inviewstate"),r=t.Utils.isInView(i,o.options),c=i.data("ukScrollspyCls")||e[n].trim();!r||a||i.data("scrollspy-idle")||(s||(i.addClass(o.options.initcls),o.offset=i.offset(),s=!0,i.trigger("init.uk.scrollspy")),i.data("scrollspy-idle",setTimeout(function(){i.addClass("uk-scrollspy-inview").toggleClass(c).width(),i.trigger("inview.uk.scrollspy"),i.data("scrollspy-idle",!1),i.data("inviewstate",!0)},o.options.delay*l)),l++),!r&&a&&o.options.repeat&&(i.data("scrollspy-idle")&&clearTimeout(i.data("scrollspy-idle")),i.removeClass("uk-scrollspy-inview").toggleClass(c),i.data("inviewstate",!1),i.trigger("outview.uk.scrollspy")),n=e[n+1]?n+1:0})};l(),this.check=l,i.push(this)}});var l=[],n=function(){for(var t=0;t<l.length;t++)window.requestAnimationFrame.apply(window,[l[t].check])};t.component("scrollspynav",{defaults:{cls:"uk-active",closest:!1,topoffset:0,leftoffset:0,smoothscroll:!1},boot:function(){o.on("scrolling.uk.document",n),s.on("resize orientationchange",t.Utils.debounce(n,50)),t.ready(function(s){t.$("[data-uk-scrollspy-nav]",s).each(function(){var s=t.$(this);if(!s.data("scrollspynav")){t.scrollspynav(s,t.Utils.options(s.attr("data-uk-scrollspy-nav")))}})})},init:function(){var o,i=[],e=this.find("a[href^='#']").each(function(){i.push(t.$(this).attr("href"))}),n=t.$(i.join(",")),a=this.options.cls,r=this.options.closest||this.options.closest,c=this,p=function(){o=[];for(var i=0;i<n.length;i++)t.Utils.isInView(n.eq(i),c.options)&&o.push(n.eq(i));if(o.length){var l,p=s.scrollTop(),f=function(){for(var t=0;t<o.length;t++)if(o[t].offset().top>=p)return o[t]}();if(!f)return;c.options.closest?(e.closest(r).removeClass(a),l=e.filter("a[href='#"+f.attr("id")+"']").closest(r).addClass(a)):l=e.removeClass(a).filter("a[href='#"+f.attr("id")+"']").addClass(a),c.element.trigger("inview.uk.scrollspynav",[f,l])}};this.options.smoothscroll&&t.smoothScroll&&e.each(function(){t.smoothScroll(this,c.options.smoothscroll)}),p(),this.element.data("scrollspynav",this),this.check=p,l.push(this)}})}(UIkit);
|
@@ -0,0 +1,62 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(UI) {
|
3
|
+
|
4
|
+
"use strict";
|
5
|
+
|
6
|
+
UI.component('smoothScroll', {
|
7
|
+
|
8
|
+
boot: function() {
|
9
|
+
|
10
|
+
// init code
|
11
|
+
UI.$html.on("click.smooth-scroll.uikit", "[data-uk-smooth-scroll]", function(e) {
|
12
|
+
var ele = UI.$(this);
|
13
|
+
|
14
|
+
if (!ele.data("smoothScroll")) {
|
15
|
+
var obj = UI.smoothScroll(ele, UI.Utils.options(ele.attr("data-uk-smooth-scroll")));
|
16
|
+
ele.trigger("click");
|
17
|
+
}
|
18
|
+
|
19
|
+
return false;
|
20
|
+
});
|
21
|
+
},
|
22
|
+
|
23
|
+
init: function() {
|
24
|
+
|
25
|
+
var $this = this;
|
26
|
+
|
27
|
+
this.on("click", function(e) {
|
28
|
+
e.preventDefault();
|
29
|
+
scrollToElement(UI.$(this.hash).length ? UI.$(this.hash) : UI.$("body"), $this.options);
|
30
|
+
});
|
31
|
+
}
|
32
|
+
});
|
33
|
+
|
34
|
+
function scrollToElement(ele, options) {
|
35
|
+
|
36
|
+
options = UI.$.extend({
|
37
|
+
duration: 1000,
|
38
|
+
transition: 'easeOutExpo',
|
39
|
+
offset: 0,
|
40
|
+
complete: function(){}
|
41
|
+
}, options);
|
42
|
+
|
43
|
+
// get / set parameters
|
44
|
+
var target = ele.offset().top - options.offset,
|
45
|
+
docheight = UI.$doc.height(),
|
46
|
+
winheight = window.innerHeight;
|
47
|
+
|
48
|
+
if ((target + winheight) > docheight) {
|
49
|
+
target = docheight - winheight;
|
50
|
+
}
|
51
|
+
|
52
|
+
// animate to target, fire callback when done
|
53
|
+
UI.$("html,body").stop().animate({scrollTop: target}, options.duration, options.transition).promise().done(options.complete);
|
54
|
+
}
|
55
|
+
|
56
|
+
UI.Utils.scrollToElement = scrollToElement;
|
57
|
+
|
58
|
+
if (!UI.$.easing.easeOutExpo) {
|
59
|
+
UI.$.easing.easeOutExpo = function(x, t, b, c, d) { return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b; };
|
60
|
+
}
|
61
|
+
|
62
|
+
})(UIkit);
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
!function(t){"use strict";function o(o,i){i=t.$.extend({duration:1e3,transition:"easeOutExpo",offset:0,complete:function(){}},i);var n=o.offset().top-i.offset,s=t.$doc.height(),e=window.innerHeight;n+e>s&&(n=s-e),t.$("html,body").stop().animate({scrollTop:n},i.duration,i.transition).promise().done(i.complete)}t.component("smoothScroll",{boot:function(){t.$html.on("click.smooth-scroll.uikit","[data-uk-smooth-scroll]",function(){var o=t.$(this);if(!o.data("smoothScroll")){{t.smoothScroll(o,t.Utils.options(o.attr("data-uk-smooth-scroll")))}o.trigger("click")}return!1})},init:function(){var i=this;this.on("click",function(n){n.preventDefault(),o(t.$(this.hash).length?t.$(this.hash):t.$("body"),i.options)})}}),t.Utils.scrollToElement=o,t.$.easing.easeOutExpo||(t.$.easing.easeOutExpo=function(t,o,i,n,s){return o==s?i+n:n*(-Math.pow(2,-10*o/s)+1)+i})}(UIkit);
|
@@ -0,0 +1,304 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(UI) {
|
3
|
+
|
4
|
+
"use strict";
|
5
|
+
|
6
|
+
var Animations;
|
7
|
+
|
8
|
+
UI.component('switcher', {
|
9
|
+
|
10
|
+
defaults: {
|
11
|
+
connect : false,
|
12
|
+
toggle : ">*",
|
13
|
+
active : 0,
|
14
|
+
animation : false,
|
15
|
+
duration : 200,
|
16
|
+
swiping : true
|
17
|
+
},
|
18
|
+
|
19
|
+
animating: false,
|
20
|
+
|
21
|
+
boot: function() {
|
22
|
+
|
23
|
+
// init code
|
24
|
+
UI.ready(function(context) {
|
25
|
+
|
26
|
+
UI.$("[data-uk-switcher]", context).each(function() {
|
27
|
+
var switcher = UI.$(this);
|
28
|
+
|
29
|
+
if (!switcher.data("switcher")) {
|
30
|
+
var obj = UI.switcher(switcher, UI.Utils.options(switcher.attr("data-uk-switcher")));
|
31
|
+
}
|
32
|
+
});
|
33
|
+
});
|
34
|
+
},
|
35
|
+
|
36
|
+
init: function() {
|
37
|
+
|
38
|
+
var $this = this;
|
39
|
+
|
40
|
+
this.on("click.uikit.switcher", this.options.toggle, function(e) {
|
41
|
+
e.preventDefault();
|
42
|
+
$this.show(this);
|
43
|
+
});
|
44
|
+
|
45
|
+
if (this.options.connect) {
|
46
|
+
|
47
|
+
this.connect = UI.$(this.options.connect);
|
48
|
+
|
49
|
+
this.connect.find(".uk-active").removeClass(".uk-active");
|
50
|
+
|
51
|
+
// delegate switch commands within container content
|
52
|
+
if (this.connect.length) {
|
53
|
+
|
54
|
+
// Init ARIA for connect
|
55
|
+
this.connect.children().attr('aria-hidden', 'true');
|
56
|
+
|
57
|
+
this.connect.on("click", '[data-uk-switcher-item]', function(e) {
|
58
|
+
|
59
|
+
e.preventDefault();
|
60
|
+
|
61
|
+
var item = UI.$(this).attr('data-uk-switcher-item');
|
62
|
+
|
63
|
+
if ($this.index == item) return;
|
64
|
+
|
65
|
+
switch(item) {
|
66
|
+
case 'next':
|
67
|
+
case 'previous':
|
68
|
+
$this.show($this.index + (item=='next' ? 1:-1));
|
69
|
+
break;
|
70
|
+
default:
|
71
|
+
$this.show(parseInt(item, 10));
|
72
|
+
}
|
73
|
+
})
|
74
|
+
|
75
|
+
if (this.options.swiping) {
|
76
|
+
|
77
|
+
this.connect.on('swipeRight swipeLeft', function(e) {
|
78
|
+
e.preventDefault();
|
79
|
+
if(!window.getSelection().toString()) {
|
80
|
+
$this.show($this.index + (e.type == 'swipeLeft' ? 1 : -1));
|
81
|
+
}
|
82
|
+
});
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
var toggles = this.find(this.options.toggle),
|
87
|
+
active = toggles.filter(".uk-active");
|
88
|
+
|
89
|
+
if (active.length) {
|
90
|
+
this.show(active, false);
|
91
|
+
} else {
|
92
|
+
|
93
|
+
if (this.options.active===false) return;
|
94
|
+
|
95
|
+
active = toggles.eq(this.options.active);
|
96
|
+
this.show(active.length ? active : toggles.eq(0), false);
|
97
|
+
}
|
98
|
+
|
99
|
+
// Init ARIA for toggles
|
100
|
+
toggles.not(active).attr('aria-expanded', 'false');
|
101
|
+
active.attr('aria-expanded', 'true');
|
102
|
+
|
103
|
+
this.on('changed.uk.dom', function() {
|
104
|
+
$this.connect = UI.$($this.options.connect);
|
105
|
+
});
|
106
|
+
}
|
107
|
+
|
108
|
+
},
|
109
|
+
|
110
|
+
show: function(tab, animate) {
|
111
|
+
|
112
|
+
if (this.animating) {
|
113
|
+
return;
|
114
|
+
}
|
115
|
+
|
116
|
+
if (isNaN(tab)) {
|
117
|
+
tab = UI.$(tab);
|
118
|
+
} else {
|
119
|
+
|
120
|
+
var toggles = this.find(this.options.toggle);
|
121
|
+
|
122
|
+
tab = tab < 0 ? toggles.length-1 : tab;
|
123
|
+
tab = toggles.eq(toggles[tab] ? tab : 0);
|
124
|
+
}
|
125
|
+
|
126
|
+
var $this = this,
|
127
|
+
toggles = this.find(this.options.toggle),
|
128
|
+
active = UI.$(tab),
|
129
|
+
animation = Animations[this.options.animation] || function(current, next) {
|
130
|
+
|
131
|
+
if (!$this.options.animation) {
|
132
|
+
return Animations.none.apply($this);
|
133
|
+
}
|
134
|
+
|
135
|
+
var anim = $this.options.animation.split(',');
|
136
|
+
|
137
|
+
if (anim.length == 1) {
|
138
|
+
anim[1] = anim[0];
|
139
|
+
}
|
140
|
+
|
141
|
+
anim[0] = anim[0].trim();
|
142
|
+
anim[1] = anim[1].trim();
|
143
|
+
|
144
|
+
return coreAnimation.apply($this, [anim, current, next]);
|
145
|
+
};
|
146
|
+
|
147
|
+
if (animate===false || !UI.support.animation) {
|
148
|
+
animation = Animations.none;
|
149
|
+
}
|
150
|
+
|
151
|
+
if (active.hasClass("uk-disabled")) return;
|
152
|
+
|
153
|
+
// Update ARIA for Toggles
|
154
|
+
toggles.attr('aria-expanded', 'false');
|
155
|
+
active.attr('aria-expanded', 'true');
|
156
|
+
|
157
|
+
toggles.filter(".uk-active").removeClass("uk-active");
|
158
|
+
active.addClass("uk-active");
|
159
|
+
|
160
|
+
if (this.options.connect && this.connect.length) {
|
161
|
+
|
162
|
+
this.index = this.find(this.options.toggle).index(active);
|
163
|
+
|
164
|
+
if (this.index == -1 ) {
|
165
|
+
this.index = 0;
|
166
|
+
}
|
167
|
+
|
168
|
+
this.connect.each(function() {
|
169
|
+
|
170
|
+
var container = UI.$(this),
|
171
|
+
children = UI.$(container.children()),
|
172
|
+
current = UI.$(children.filter('.uk-active')),
|
173
|
+
next = UI.$(children.eq($this.index));
|
174
|
+
|
175
|
+
$this.animating = true;
|
176
|
+
|
177
|
+
animation.apply($this, [current, next]).then(function(){
|
178
|
+
|
179
|
+
current.removeClass("uk-active");
|
180
|
+
next.addClass("uk-active");
|
181
|
+
|
182
|
+
// Update ARIA for connect
|
183
|
+
current.attr('aria-hidden', 'true');
|
184
|
+
next.attr('aria-hidden', 'false');
|
185
|
+
|
186
|
+
UI.Utils.checkDisplay(next, true);
|
187
|
+
|
188
|
+
$this.animating = false;
|
189
|
+
});
|
190
|
+
});
|
191
|
+
}
|
192
|
+
|
193
|
+
this.trigger("show.uk.switcher", [active]);
|
194
|
+
}
|
195
|
+
});
|
196
|
+
|
197
|
+
Animations = {
|
198
|
+
|
199
|
+
'none': function() {
|
200
|
+
var d = UI.$.Deferred();
|
201
|
+
d.resolve();
|
202
|
+
return d.promise();
|
203
|
+
},
|
204
|
+
|
205
|
+
'fade': function(current, next) {
|
206
|
+
return coreAnimation.apply(this, ['uk-animation-fade', current, next]);
|
207
|
+
},
|
208
|
+
|
209
|
+
'slide-bottom': function(current, next) {
|
210
|
+
return coreAnimation.apply(this, ['uk-animation-slide-bottom', current, next]);
|
211
|
+
},
|
212
|
+
|
213
|
+
'slide-top': function(current, next) {
|
214
|
+
return coreAnimation.apply(this, ['uk-animation-slide-top', current, next]);
|
215
|
+
},
|
216
|
+
|
217
|
+
'slide-vertical': function(current, next, dir) {
|
218
|
+
|
219
|
+
var anim = ['uk-animation-slide-top', 'uk-animation-slide-bottom'];
|
220
|
+
|
221
|
+
if (current && current.index() > next.index()) {
|
222
|
+
anim.reverse();
|
223
|
+
}
|
224
|
+
|
225
|
+
return coreAnimation.apply(this, [anim, current, next]);
|
226
|
+
},
|
227
|
+
|
228
|
+
'slide-left': function(current, next) {
|
229
|
+
return coreAnimation.apply(this, ['uk-animation-slide-left', current, next]);
|
230
|
+
},
|
231
|
+
|
232
|
+
'slide-right': function(current, next) {
|
233
|
+
return coreAnimation.apply(this, ['uk-animation-slide-right', current, next]);
|
234
|
+
},
|
235
|
+
|
236
|
+
'slide-horizontal': function(current, next, dir) {
|
237
|
+
|
238
|
+
var anim = ['uk-animation-slide-right', 'uk-animation-slide-left'];
|
239
|
+
|
240
|
+
if (current && current.index() > next.index()) {
|
241
|
+
anim.reverse();
|
242
|
+
}
|
243
|
+
|
244
|
+
return coreAnimation.apply(this, [anim, current, next]);
|
245
|
+
},
|
246
|
+
|
247
|
+
'scale': function(current, next) {
|
248
|
+
return coreAnimation.apply(this, ['uk-animation-scale-up', current, next]);
|
249
|
+
}
|
250
|
+
};
|
251
|
+
|
252
|
+
UI.switcher.animations = Animations;
|
253
|
+
|
254
|
+
|
255
|
+
// helpers
|
256
|
+
|
257
|
+
function coreAnimation(cls, current, next) {
|
258
|
+
|
259
|
+
var d = UI.$.Deferred(), clsIn = cls, clsOut = cls, release;
|
260
|
+
|
261
|
+
if (next[0]===current[0]) {
|
262
|
+
d.resolve();
|
263
|
+
return d.promise();
|
264
|
+
}
|
265
|
+
|
266
|
+
if (typeof(cls) == 'object') {
|
267
|
+
clsIn = cls[0];
|
268
|
+
clsOut = cls[1] || cls[0];
|
269
|
+
}
|
270
|
+
|
271
|
+
release = function() {
|
272
|
+
|
273
|
+
if (current) current.hide().removeClass('uk-active '+clsOut+' uk-animation-reverse');
|
274
|
+
|
275
|
+
next.addClass(clsIn).one(UI.support.animation.end, function() {
|
276
|
+
|
277
|
+
next.removeClass(''+clsIn+'').css({opacity:'', display:''});
|
278
|
+
|
279
|
+
d.resolve();
|
280
|
+
|
281
|
+
if (current) current.css({opacity:'', display:''});
|
282
|
+
|
283
|
+
}.bind(this)).show();
|
284
|
+
};
|
285
|
+
|
286
|
+
next.css('animation-duration', this.options.duration+'ms');
|
287
|
+
|
288
|
+
if (current && current.length) {
|
289
|
+
|
290
|
+
current.css('animation-duration', this.options.duration+'ms');
|
291
|
+
|
292
|
+
current.css('display', 'none').addClass(clsOut+' uk-animation-reverse').one(UI.support.animation.end, function() {
|
293
|
+
release();
|
294
|
+
}.bind(this)).css('display', '');
|
295
|
+
|
296
|
+
} else {
|
297
|
+
next.addClass('uk-active');
|
298
|
+
release();
|
299
|
+
}
|
300
|
+
|
301
|
+
return d.promise();
|
302
|
+
}
|
303
|
+
|
304
|
+
})(UIkit);
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
!function(t){"use strict";function i(i,n,e){var s,a=t.$.Deferred(),o=i,r=i;return e[0]===n[0]?(a.resolve(),a.promise()):("object"==typeof i&&(o=i[0],r=i[1]||i[0]),s=function(){n&&n.hide().removeClass("uk-active "+r+" uk-animation-reverse"),e.addClass(o).one(t.support.animation.end,function(){e.removeClass(""+o).css({opacity:"",display:""}),a.resolve(),n&&n.css({opacity:"",display:""})}.bind(this)).show()},e.css("animation-duration",this.options.duration+"ms"),n&&n.length?(n.css("animation-duration",this.options.duration+"ms"),n.css("display","none").addClass(r+" uk-animation-reverse").one(t.support.animation.end,function(){s()}.bind(this)).css("display","")):(e.addClass("uk-active"),s()),a.promise())}var n;t.component("switcher",{defaults:{connect:!1,toggle:">*",active:0,animation:!1,duration:200,swiping:!0},animating:!1,boot:function(){t.ready(function(i){t.$("[data-uk-switcher]",i).each(function(){var i=t.$(this);if(!i.data("switcher")){t.switcher(i,t.Utils.options(i.attr("data-uk-switcher")))}})})},init:function(){var i=this;if(this.on("click.uikit.switcher",this.options.toggle,function(t){t.preventDefault(),i.show(this)}),this.options.connect){this.connect=t.$(this.options.connect),this.connect.find(".uk-active").removeClass(".uk-active"),this.connect.length&&(this.connect.children().attr("aria-hidden","true"),this.connect.on("click","[data-uk-switcher-item]",function(n){n.preventDefault();var e=t.$(this).attr("data-uk-switcher-item");if(i.index!=e)switch(e){case"next":case"previous":i.show(i.index+("next"==e?1:-1));break;default:i.show(parseInt(e,10))}}),this.options.swiping&&this.connect.on("swipeRight swipeLeft",function(t){t.preventDefault(),window.getSelection().toString()||i.show(i.index+("swipeLeft"==t.type?1:-1))}));var n=this.find(this.options.toggle),e=n.filter(".uk-active");if(e.length)this.show(e,!1);else{if(this.options.active===!1)return;e=n.eq(this.options.active),this.show(e.length?e:n.eq(0),!1)}n.not(e).attr("aria-expanded","false"),e.attr("aria-expanded","true"),this.on("changed.uk.dom",function(){i.connect=t.$(i.options.connect)})}},show:function(e,s){if(!this.animating){if(isNaN(e))e=t.$(e);else{var a=this.find(this.options.toggle);e=0>e?a.length-1:e,e=a.eq(a[e]?e:0)}var o=this,a=this.find(this.options.toggle),r=t.$(e),c=n[this.options.animation]||function(t,e){if(!o.options.animation)return n.none.apply(o);var s=o.options.animation.split(",");return 1==s.length&&(s[1]=s[0]),s[0]=s[0].trim(),s[1]=s[1].trim(),i.apply(o,[s,t,e])};s!==!1&&t.support.animation||(c=n.none),r.hasClass("uk-disabled")||(a.attr("aria-expanded","false"),r.attr("aria-expanded","true"),a.filter(".uk-active").removeClass("uk-active"),r.addClass("uk-active"),this.options.connect&&this.connect.length&&(this.index=this.find(this.options.toggle).index(r),-1==this.index&&(this.index=0),this.connect.each(function(){var i=t.$(this),n=t.$(i.children()),e=t.$(n.filter(".uk-active")),s=t.$(n.eq(o.index));o.animating=!0,c.apply(o,[e,s]).then(function(){e.removeClass("uk-active"),s.addClass("uk-active"),e.attr("aria-hidden","true"),s.attr("aria-hidden","false"),t.Utils.checkDisplay(s,!0),o.animating=!1})})),this.trigger("show.uk.switcher",[r]))}}}),n={none:function(){var i=t.$.Deferred();return i.resolve(),i.promise()},fade:function(t,n){return i.apply(this,["uk-animation-fade",t,n])},"slide-bottom":function(t,n){return i.apply(this,["uk-animation-slide-bottom",t,n])},"slide-top":function(t,n){return i.apply(this,["uk-animation-slide-top",t,n])},"slide-vertical":function(t,n){var e=["uk-animation-slide-top","uk-animation-slide-bottom"];return t&&t.index()>n.index()&&e.reverse(),i.apply(this,[e,t,n])},"slide-left":function(t,n){return i.apply(this,["uk-animation-slide-left",t,n])},"slide-right":function(t,n){return i.apply(this,["uk-animation-slide-right",t,n])},"slide-horizontal":function(t,n){var e=["uk-animation-slide-right","uk-animation-slide-left"];return t&&t.index()>n.index()&&e.reverse(),i.apply(this,[e,t,n])},scale:function(t,n){return i.apply(this,["uk-animation-scale-up",t,n])}},t.switcher.animations=n}(UIkit);
|
@@ -0,0 +1,165 @@
|
|
1
|
+
/*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(UI) {
|
3
|
+
|
4
|
+
"use strict";
|
5
|
+
|
6
|
+
UI.component('tab', {
|
7
|
+
|
8
|
+
defaults: {
|
9
|
+
'target' : '>li:not(.uk-tab-responsive, .uk-disabled)',
|
10
|
+
'connect' : false,
|
11
|
+
'active' : 0,
|
12
|
+
'animation' : false,
|
13
|
+
'duration' : 200
|
14
|
+
},
|
15
|
+
|
16
|
+
boot: function() {
|
17
|
+
|
18
|
+
// init code
|
19
|
+
UI.ready(function(context) {
|
20
|
+
|
21
|
+
UI.$("[data-uk-tab]", context).each(function() {
|
22
|
+
|
23
|
+
var tab = UI.$(this);
|
24
|
+
|
25
|
+
if (!tab.data("tab")) {
|
26
|
+
var obj = UI.tab(tab, UI.Utils.options(tab.attr("data-uk-tab")));
|
27
|
+
}
|
28
|
+
});
|
29
|
+
});
|
30
|
+
},
|
31
|
+
|
32
|
+
init: function() {
|
33
|
+
|
34
|
+
var $this = this;
|
35
|
+
|
36
|
+
this.current = false;
|
37
|
+
|
38
|
+
this.on("click.uikit.tab", this.options.target, function(e) {
|
39
|
+
|
40
|
+
e.preventDefault();
|
41
|
+
|
42
|
+
if ($this.switcher && $this.switcher.animating) {
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
|
46
|
+
var current = $this.find($this.options.target).not(this);
|
47
|
+
|
48
|
+
current.removeClass("uk-active").blur();
|
49
|
+
|
50
|
+
$this.trigger("change.uk.tab", [UI.$(this).addClass("uk-active"), $this.current]);
|
51
|
+
|
52
|
+
$this.current = UI.$(this);
|
53
|
+
|
54
|
+
// Update ARIA
|
55
|
+
if (!$this.options.connect) {
|
56
|
+
current.attr('aria-expanded', 'false');
|
57
|
+
UI.$(this).attr('aria-expanded', 'true');
|
58
|
+
}
|
59
|
+
});
|
60
|
+
|
61
|
+
if (this.options.connect) {
|
62
|
+
this.connect = UI.$(this.options.connect);
|
63
|
+
}
|
64
|
+
|
65
|
+
// init responsive tab
|
66
|
+
this.responsivetab = UI.$('<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>');
|
67
|
+
|
68
|
+
this.responsivetab.dropdown = this.responsivetab.find('.uk-dropdown');
|
69
|
+
this.responsivetab.lst = this.responsivetab.dropdown.find('ul');
|
70
|
+
this.responsivetab.caption = this.responsivetab.find('a:first');
|
71
|
+
|
72
|
+
if (this.element.hasClass("uk-tab-bottom")) this.responsivetab.dropdown.addClass("uk-dropdown-up");
|
73
|
+
|
74
|
+
// handle click
|
75
|
+
this.responsivetab.lst.on('click.uikit.tab', 'a', function(e) {
|
76
|
+
|
77
|
+
e.preventDefault();
|
78
|
+
e.stopPropagation();
|
79
|
+
|
80
|
+
var link = UI.$(this);
|
81
|
+
|
82
|
+
$this.element.children('li:not(.uk-tab-responsive)').eq(link.data('index')).trigger('click');
|
83
|
+
});
|
84
|
+
|
85
|
+
this.on('show.uk.switcher change.uk.tab', function(e, tab) {
|
86
|
+
$this.responsivetab.caption.html(tab.text());
|
87
|
+
});
|
88
|
+
|
89
|
+
this.element.append(this.responsivetab);
|
90
|
+
|
91
|
+
// init UIkit components
|
92
|
+
if (this.options.connect) {
|
93
|
+
this.switcher = UI.switcher(this.element, {
|
94
|
+
"toggle" : ">li:not(.uk-tab-responsive)",
|
95
|
+
"connect" : this.options.connect,
|
96
|
+
"active" : this.options.active,
|
97
|
+
"animation" : this.options.animation,
|
98
|
+
"duration" : this.options.duration
|
99
|
+
});
|
100
|
+
}
|
101
|
+
|
102
|
+
UI.dropdown(this.responsivetab, {"mode": "click"});
|
103
|
+
|
104
|
+
// init
|
105
|
+
$this.trigger("change.uk.tab", [this.element.find(this.options.target).not('.uk-tab-responsive').filter('.uk-active')]);
|
106
|
+
|
107
|
+
this.check();
|
108
|
+
|
109
|
+
UI.$win.on('resize orientationchange', UI.Utils.debounce(function(){
|
110
|
+
if ($this.element.is(":visible")) $this.check();
|
111
|
+
}, 100));
|
112
|
+
|
113
|
+
this.on('display.uk.check', function(){
|
114
|
+
if ($this.element.is(":visible")) $this.check();
|
115
|
+
});
|
116
|
+
},
|
117
|
+
|
118
|
+
check: function() {
|
119
|
+
|
120
|
+
var children = this.element.children('li:not(.uk-tab-responsive)').removeClass('uk-hidden');
|
121
|
+
|
122
|
+
if (!children.length) {
|
123
|
+
this.responsivetab.addClass('uk-hidden');
|
124
|
+
return;
|
125
|
+
}
|
126
|
+
|
127
|
+
var top = (children.eq(0).offset().top + Math.ceil(children.eq(0).height()/2)),
|
128
|
+
doresponsive = false,
|
129
|
+
item, link, clone;
|
130
|
+
|
131
|
+
this.responsivetab.lst.empty();
|
132
|
+
|
133
|
+
children.each(function(){
|
134
|
+
|
135
|
+
if (UI.$(this).offset().top > top) {
|
136
|
+
doresponsive = true;
|
137
|
+
}
|
138
|
+
});
|
139
|
+
|
140
|
+
if (doresponsive) {
|
141
|
+
|
142
|
+
for (var i = 0; i < children.length; i++) {
|
143
|
+
|
144
|
+
item = UI.$(children.eq(i));
|
145
|
+
link = item.find('a');
|
146
|
+
|
147
|
+
if (item.css('float') != 'none' && !item.attr('uk-dropdown')) {
|
148
|
+
|
149
|
+
if (!item.hasClass('uk-disabled')) {
|
150
|
+
|
151
|
+
clone = item[0].outerHTML.replace('<a ', '<a data-index="'+i+'" ');
|
152
|
+
|
153
|
+
this.responsivetab.lst.append(clone);
|
154
|
+
}
|
155
|
+
|
156
|
+
item.addClass('uk-hidden');
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
this.responsivetab[this.responsivetab.lst.children('li').length ? 'removeClass':'addClass']('uk-hidden');
|
162
|
+
}
|
163
|
+
});
|
164
|
+
|
165
|
+
})(UIkit);
|