Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest inlining grayscale.js #42

Closed
njaremko opened this issue Nov 3, 2015 · 1 comment
Closed

Suggest inlining grayscale.js #42

njaremko opened this issue Nov 3, 2015 · 1 comment
Labels
Milestone

Comments

@njaremko
Copy link
Contributor

njaremko commented Nov 3, 2015

I propose inlining a minified grayscale.js into the js.html in _includes to remove an unnecessary roundtrip to the server for a 500 byte file. Thoughts?

Replacing:

<script src="{{site.baseurl}}/js/grayscale.js"></script>

With:

<!--* Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.-->
<script>$(window).scroll(function(){50<$(".navbar").offset().top?$(".navbar-fixed-top").addClass("top-nav-collapse"):$(".navbar-fixed-top").removeClass("top-nav-collapse")});$(function(){$("a.page-scroll").bind("click",function(b){var a=$(this);$("html, body").stop().animate({scrollTop:$(a.attr("href")).offset().top},1500,"easeInOutExpo",function(){a.blur()});b.preventDefault()})});$(".navbar-collapse ul li
a").click(function(){$(".navbar-toggle:visible").click()});</script>
@le4ker
Copy link
Owner

le4ker commented Nov 3, 2015

Sounds great!

@le4ker le4ker added the feature label Nov 3, 2015
@njaremko njaremko closed this as completed Nov 9, 2015
@le4ker le4ker added this to the Version 4.0.0 milestone Nov 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants