You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2016/10/06 23:53:47 UTC
[19/25] incubator-systemml-website git commit: [SYSTEMML-975] Create
build steps to create css and js bundles
http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/blob/4aa30b1c/_src/_scripts/main.js
----------------------------------------------------------------------
diff --git a/_src/_scripts/main.js b/_src/_scripts/main.js
new file mode 100644
index 0000000..902354e
--- /dev/null
+++ b/_src/_scripts/main.js
@@ -0,0 +1,60 @@
+console.log('hello main.js');
+
+$(document).ready(function() {
+
+ stickyHeader();
+
+ $(window).resize(function() {
+ stickyHeader();
+ });
+
+ // Modal Triggers
+ $('.jq-modal-trigger').click(function(event) {
+ var el_show = $(this).attr("href");
+ $(el_show).fadeIn('slow');
+ event.preventDefault();
+ hideModal();
+ });
+
+ $('.jq-modal').fitVids();
+
+});
+
+//End Ready......................................
+
+//StickyHeader
+function stickyHeader() {
+ // get height of first two headers
+ var scrollHeight = 80;
+ var self = this;
+ if($( window ).width() > 750) {
+
+ $(window).scroll(function() {
+ // get current scroll position
+ var scrollTop = $(this).scrollTop();
+
+ // if current position > scrollHeight
+ if (scrollTop > scrollHeight) {
+ // make fixed and change background color
+ $('.site-header').addClass('sticky').animate({top: "0"}, 300);
+
+ } else if (scrollTop == 0) {
+ // unfix and go back to default color
+ $('.site-header').css('top','-80px').removeClass('sticky');
+ }
+
+ });
+
+ }
+}
+
+// Show Modal
+function hideModal() {
+ $(".jq-close").click(function(event){
+ var src = $(this).parent().find('iframe').attr('src');
+ $(this).parent().fadeOut('slow');
+ $(this).parent().find('iframe').attr('src','');
+ $(this).parent().find('iframe').attr('src',src);
+ event.preventDefault();
+ });
+}
http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/blob/4aa30b1c/_src/_scripts/pushy.js
----------------------------------------------------------------------
diff --git a/_src/_scripts/pushy.js b/_src/_scripts/pushy.js
new file mode 100644
index 0000000..791eb90
--- /dev/null
+++ b/_src/_scripts/pushy.js
@@ -0,0 +1 @@
+!function(a){function b(){g.hasClass(k)?h.toggleClass(l):h.toggleClass(m)}function c(){g.hasClass(k)?(h.addClass(l),g.animate({left:"0px"},p),i.animate({left:q},p),j.animate({left:q},p)):(h.addClass(m),g.animate({right:"0px"},p),i.animate({right:q},p),j.animate({right:q},p))}function d(){g.hasClass(k)?(h.removeClass(l),g.animate({left:"-"+q},p),i.animate({left:"0px"},p),j.animate({left:"0px"},p)):(h.removeClass(m),g.animate({right:"-"+q},p),i.animate({right:"0px"},p),j.animate({right:"0px"},p))}function e(){a(r).addClass(t),a(r).on("click",function(){var b=a(this);b.hasClass(t)?(a(r).addClass(t).removeClass(s),b.removeClass(t).addClass(s)):b.addClass(t).removeClass(s)})}function f(){a(r).addClass(t),u.children("a").on("click",function(b){b.preventDefault(),a(this).toggleClass(s).next(".pushy-submenu ul").slideToggle(200).end().parent(r).siblings(r).children("a").removeClass(s).next(".pushy-submenu ul").slideUp(200)})}var g=a(".pushy"),h=a("body"),i=a("#container"),j=a(".push"),k="pu
shy-left",l="pushy-open-left",m="pushy-open-right",n=a(".site-overlay"),o=a(".menu-btn, .pushy-link"),p=200,q=g.width()+"px",r=".pushy-submenu",s="pushy-submenu-open",t="pushy-submenu-closed",u=a(r),v=function(){var a=document.createElement("p"),b=!1,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(a,null);for(var d in c)void 0!==a.style[d]&&(a.style[d]="translate3d(1px,1px,1px)",b=window.getComputedStyle(a).getPropertyValue(c[d]));return document.body.removeChild(a),void 0!==b&&b.length>0&&"none"!==b}();if(v)g.css({visibility:"visible"}),e(),o.on("click",function(){b()}),n.on("click",function(){b()});else{h.addClass("no-csstransforms3d"),g.hasClass(k)?g.css({left:"-"+q}):g.css({right:"-"+q}),g.css({visibility:"visible"}),i.css({"overflow-x":"hidden"});var w=!1;f(),o.on("click",function(){w?(d(),w=!1):(c(),w=!0)}),n.on("click",function(){w?(d(),w=!1):(c(),w=!0)
})}}(jQuery);