Remove position: sticky
JavaScript polyfill
- Fallback to default positioning for browser that don't support it IE, Chrome < 56, etc. - Issue #752
This commit is contained in:
parent
88933c4e08
commit
55843c5dca
10 changed files with 11 additions and 88 deletions
|
@ -128,7 +128,6 @@ To test the theme, run `bundle exec rake preview` and open your browser at `http
|
||||||
- [FitVids.JS](http://fitvidsjs.com/)
|
- [FitVids.JS](http://fitvidsjs.com/)
|
||||||
- Greedy Navigation - [lukejacksonn](http://codepen.io/lukejacksonn/pen/PwmwWV)
|
- Greedy Navigation - [lukejacksonn](http://codepen.io/lukejacksonn/pen/PwmwWV)
|
||||||
- [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll)
|
- [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll)
|
||||||
- [Stickyfill](https://github.com/wilddeer/stickyfill)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -25,35 +25,7 @@ $(document).ready(function(){
|
||||||
// FitVids init
|
// FitVids init
|
||||||
$("#main").fitVids();
|
$("#main").fitVids();
|
||||||
|
|
||||||
// init sticky sidebar
|
|
||||||
$(".sticky").Stickyfill();
|
|
||||||
|
|
||||||
var stickySideBar = function(){
|
|
||||||
var show = $(".author__urls-wrapper button").length === 0 ? $(window).width() > 1024 : !$(".author__urls-wrapper button").is(":visible");
|
|
||||||
// console.log("has button: " + $(".author__urls-wrapper button").length === 0);
|
|
||||||
// console.log("Window Width: " + windowWidth);
|
|
||||||
// console.log("show: " + show);
|
|
||||||
//old code was if($(window).width() > 1024)
|
|
||||||
if (show) {
|
|
||||||
// fix
|
|
||||||
Stickyfill.rebuild();
|
|
||||||
Stickyfill.init();
|
|
||||||
$(".author__urls").show();
|
|
||||||
} else {
|
|
||||||
// unfix
|
|
||||||
Stickyfill.stop();
|
|
||||||
$(".author__urls").hide();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
stickySideBar();
|
|
||||||
|
|
||||||
$(window).resize(function(){
|
|
||||||
stickySideBar();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Follow menu drop down
|
// Follow menu drop down
|
||||||
|
|
||||||
$(".author__urls-wrapper button").on("click", function() {
|
$(".author__urls-wrapper button").on("click", function() {
|
||||||
$(".author__urls").fadeToggle("fast", function() {});
|
$(".author__urls").fadeToggle("fast", function() {});
|
||||||
$(".author__urls-wrapper button").toggleClass("open");
|
$(".author__urls-wrapper button").toggleClass("open");
|
||||||
|
|
9
assets/js/main.min.js
vendored
9
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
8
assets/js/plugins/stickyfill.min.js
vendored
8
assets/js/plugins/stickyfill.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -15,8 +15,7 @@ minimal mistakes
|
||||||
| | | ├── jquery.fitvids.js # fluid width video embeds
|
| | | ├── jquery.fitvids.js # fluid width video embeds
|
||||||
| | | ├── jquery.greedy-navigation.js # priority plus navigation
|
| | | ├── jquery.greedy-navigation.js # priority plus navigation
|
||||||
| | | ├── jquery.magnific-popup.js # responsive lightbox
|
| | | ├── jquery.magnific-popup.js # responsive lightbox
|
||||||
| | | ├── jquery.smooth-scroll.min.js # make same-page links scroll smoothly
|
| | | └── jquery.smooth-scroll.min.js # make same-page links scroll smoothly
|
||||||
| | | └── stickyfill.min.js # `position: sticky` polyfill
|
|
||||||
| | ├── vendor
|
| | ├── vendor
|
||||||
| | | └── jquery
|
| | | └── jquery
|
||||||
| | | └── jquery-1.12.1.min.js
|
| | | └── jquery-1.12.1.min.js
|
||||||
|
|
|
@ -12,7 +12,7 @@ layouts_gallery:
|
||||||
- url: /assets/images/mm-layout-archive.png
|
- url: /assets/images/mm-layout-archive.png
|
||||||
image_path: /assets/images/mm-layout-archive.png
|
image_path: /assets/images/mm-layout-archive.png
|
||||||
alt: "archive layout example"
|
alt: "archive layout example"
|
||||||
modified: 2016-11-03T11:55:22-04:00
|
modified: 2017-01-05T11:46:07-05:00
|
||||||
---
|
---
|
||||||
|
|
||||||
Minimal Mistakes is a flexible two-column Jekyll theme. Perfect for hosting your personal site, blog, or portfolio on GitHub or self-hosting on your own server. As the name implies --- styling is purposely minimalistic to be enhanced and customized by you :smile:.
|
Minimal Mistakes is a flexible two-column Jekyll theme. Perfect for hosting your personal site, blog, or portfolio on GitHub or self-hosting on your own server. As the name implies --- styling is purposely minimalistic to be enhanced and customized by you :smile:.
|
||||||
|
@ -75,7 +75,6 @@ For even more demo pages check the [posts archive][year-archive].
|
||||||
- [FitVids.JS](http://fitvidsjs.com/)
|
- [FitVids.JS](http://fitvidsjs.com/)
|
||||||
- Greedy Navigation - [lukejacksonn](http://codepen.io/lukejacksonn/pen/PwmwWV)
|
- Greedy Navigation - [lukejacksonn](http://codepen.io/lukejacksonn/pen/PwmwWV)
|
||||||
- [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll)
|
- [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll)
|
||||||
- [Stickyfill](https://github.com/wilddeer/stickyfill)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -25,35 +25,7 @@ $(document).ready(function(){
|
||||||
// FitVids init
|
// FitVids init
|
||||||
$("#main").fitVids();
|
$("#main").fitVids();
|
||||||
|
|
||||||
// init sticky sidebar
|
|
||||||
$(".sticky").Stickyfill();
|
|
||||||
|
|
||||||
var stickySideBar = function(){
|
|
||||||
var show = $(".author__urls-wrapper button").length === 0 ? $(window).width() > 1024 : !$(".author__urls-wrapper button").is(":visible");
|
|
||||||
// console.log("has button: " + $(".author__urls-wrapper button").length === 0);
|
|
||||||
// console.log("Window Width: " + windowWidth);
|
|
||||||
// console.log("show: " + show);
|
|
||||||
//old code was if($(window).width() > 1024)
|
|
||||||
if (show) {
|
|
||||||
// fix
|
|
||||||
Stickyfill.rebuild();
|
|
||||||
Stickyfill.init();
|
|
||||||
$(".author__urls").show();
|
|
||||||
} else {
|
|
||||||
// unfix
|
|
||||||
Stickyfill.stop();
|
|
||||||
$(".author__urls").hide();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
stickySideBar();
|
|
||||||
|
|
||||||
$(window).resize(function(){
|
|
||||||
stickySideBar();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Follow menu drop down
|
// Follow menu drop down
|
||||||
|
|
||||||
$(".author__urls-wrapper button").on("click", function() {
|
$(".author__urls-wrapper button").on("click", function() {
|
||||||
$(".author__urls").fadeToggle("fast", function() {});
|
$(".author__urls").fadeToggle("fast", function() {});
|
||||||
$(".author__urls-wrapper button").toggleClass("open");
|
$(".author__urls-wrapper button").toggleClass("open");
|
||||||
|
|
9
docs/assets/js/main.min.js
vendored
9
docs/assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
8
docs/assets/js/plugins/stickyfill.min.js
vendored
8
docs/assets/js/plugins/stickyfill.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -26,7 +26,7 @@
|
||||||
"uglify-js": "^2.6.1"
|
"uglify-js": "^2.6.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"uglify": "uglifyjs assets/js/vendor/jquery/jquery-1.12.4.min.js assets/js/plugins/jquery.fitvids.js assets/js/plugins/jquery.greedy-navigation.js assets/js/plugins/jquery.magnific-popup.js assets/js/plugins/jquery.smooth-scroll.min.js assets/js/plugins/stickyfill.min.js assets/js/_main.js -c -m -o assets/js/main.min.js",
|
"uglify": "uglifyjs assets/js/vendor/jquery/jquery-1.12.4.min.js assets/js/plugins/jquery.fitvids.js assets/js/plugins/jquery.greedy-navigation.js assets/js/plugins/jquery.magnific-popup.js assets/js/plugins/jquery.smooth-scroll.min.js assets/js/_main.js -c -m -o assets/js/main.min.js",
|
||||||
"watch:js": "onchange \"assets/js/**/*.js\" -e \"assets/js/main.min.js\" -- npm run build:js",
|
"watch:js": "onchange \"assets/js/**/*.js\" -e \"assets/js/main.min.js\" -- npm run build:js",
|
||||||
"build:js": "npm run uglify"
|
"build:js": "npm run uglify"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue