From 54454c2a20d3058a43499a20bda20c85cff0fa05 Mon Sep 17 00:00:00 2001 From: Martin Richard Date: Fri, 27 Sep 2013 11:49:35 +0200 Subject: [PATCH] Minified css Signed-off-by: Martin Richard --- .gitignore | 2 ++ Makefile | 2 ++ index.html | 4 ++-- js/martiusweb.min.js | 1 - js/scrollspy.min.js | 1 - 5 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 js/martiusweb.min.js delete mode 100644 js/scrollspy.min.js diff --git a/.gitignore b/.gitignore index 9b69767..cd5ec1c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ # Generated files css/styles.css css/styles-responsive.css +css/*.min.css js/bootstrap* js/jquery.js +js/*.min.js img/glyphicons-halflings*.png diff --git a/Makefile b/Makefile index 9e99a1d..a0f75cb 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ BOOTSTRAP_RESPONSIVE_LESS = ./less/responsive.less minassets: ./${BOOTSTRAP_PATH}/node_modules/.bin/uglifyjs -nc js/scrollspy.js > js/scrollspy.min.js ./${BOOTSTRAP_PATH}/node_modules/.bin/uglifyjs -nc js/martiusweb.js > js/martiusweb.min.js + ./${BOOTSTRAP_PATH}/node_modules/.bin/recess --compress ${BOOTSTRAP} > css/styles.min.css + ./${BOOTSTRAP_PATH}/node_modules/.bin/recess --compress ${BOOTSTRAP_RESPONSIVE} > css/styles-responsive.min.css bootstrap: mkdir -p ./css ./js ./img diff --git a/index.html b/index.html index 6ff2d47..6ecee4c 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,8 @@ - - + + =r?(t.addClass("sticky"),t.css("top","-"+r+"px")):(t.removeClass("sticky"),t.css("top",0))}),Sticky=!0};e(document).width()>767&&r(),e(window).on("resize",function(){e(document).width()>767?t||r():(e("#sticky-wrap").css("paddingTop",0),e(window).off("scroll.sticky"))})}(window.jQuery); \ No newline at end of file diff --git a/js/scrollspy.min.js b/js/scrollspy.min.js deleted file mode 100644 index 1aa76e4..0000000 --- a/js/scrollspy.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height();n==0&&(t=2885,n=t-this.$scrollElement.height());var r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1]-68)&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery); \ No newline at end of file