mirror of
https://github.com/hacks-guide/minimal-mistakes.git
synced 2025-02-20 00:30:43 +00:00
Remove "sticky sidebar" JS in favor of CSS media queries
This commit is contained in:
parent
4364fb73f5
commit
c76813f6f5
@ -7,6 +7,7 @@
|
||||
- Fix an unclosed `<p>` tag in `page__hero.html`, near `page.header.actions`.
|
||||
- Remove overlay and revert X to hamburger icon when popup disappears. [#3958](https://github.com/mmistakes/minimal-mistakes/pull/3958)
|
||||
- Fix SEO title when it contains a vertical bar. [#3094](https://github.com/mmistakes/minimal-mistakes/pull/3094) [#3113](https://github.com/mmistakes/minimal-mistakes/pull/3113)
|
||||
- Remove "sticky sidebar" JS as it's now completely based on CSS media queries. [#4245](https://github.com/mmistakes/minimal-mistakes/issues/4245) [#4645](https://github.com/mmistakes/minimal-mistakes/pull/4645)
|
||||
|
||||
### Enhancements
|
||||
|
||||
|
@ -6,27 +6,6 @@ $(function() {
|
||||
// FitVids init
|
||||
$("#main").fitVids();
|
||||
|
||||
// Sticky sidebar
|
||||
var stickySideBar = function() {
|
||||
var show =
|
||||
$(".author__urls-wrapper").find("button").length === 0
|
||||
? $(window).width() > 1024 // width should match $large Sass variable
|
||||
: !$(".author__urls-wrapper").find("button").is(":visible");
|
||||
if (show) {
|
||||
// fix
|
||||
$(".sidebar").addClass("sticky");
|
||||
} else {
|
||||
// unfix
|
||||
$(".sidebar").removeClass("sticky");
|
||||
}
|
||||
};
|
||||
|
||||
stickySideBar();
|
||||
|
||||
$(window).resize(function() {
|
||||
stickySideBar();
|
||||
});
|
||||
|
||||
// Follow menu drop down
|
||||
$(".author__urls-wrapper").find("button").on("click", function() {
|
||||
$(".author__urls").toggleClass("is--visible");
|
||||
|
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@ permalink: "/docs/history/"
|
||||
excerpt: Change log of enhancements and bug fixes made to the theme.
|
||||
sidebar:
|
||||
nav: docs
|
||||
last_modified_at: '2024-05-05T18:13:22+08:00'
|
||||
last_modified_at: '2024-05-05T18:22:58+08:00'
|
||||
toc: false
|
||||
---
|
||||
|
||||
@ -22,6 +22,7 @@ toc: false
|
||||
- Fix an unclosed `<p>` tag in `page__hero.html`, near `page.header.actions`.
|
||||
- Remove overlay and revert X to hamburger icon when popup disappears. [#3958](https://github.com/mmistakes/minimal-mistakes/pull/3958)
|
||||
- Fix SEO title when it contains a vertical bar. [#3094](https://github.com/mmistakes/minimal-mistakes/pull/3094) [#3113](https://github.com/mmistakes/minimal-mistakes/pull/3113)
|
||||
- Remove "sticky sidebar" JS as it's now completely based on CSS media queries. [#4245](https://github.com/mmistakes/minimal-mistakes/issues/4245) [#4645](https://github.com/mmistakes/minimal-mistakes/pull/4645)
|
||||
|
||||
### Enhancements
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user