Blog/static/Blog/JS/scripts.js
// SHOW OR HIDE SCROLL TOP BUTTON
SHOW OR HIDE SCROLL TOP BUTTON
SHOW OR HIDE SCROLL TOP BUTTON
function scrollTopButton() {
	var state;
	if ($(".main-article").length && reading_progress > 1) {
		state = "show";
	} else if (!$(".main-article").length && window.pageYOffset >= 100) {
		state = "show";
 	} else {
		state = "hide";
	}
	$(".scroll-top-btn").css("opacity", state == "show" ? 1 : 0);
	$(".scroll-top-btn").css("pointer-events", state == "show" ? "all" : "none");
}
function scrollTopButton ( ) { var state ; if ( $ ( ".main-article" ) . length && reading_progress > 1 ) { state = "show" ; } else if ( ! $ ( ".main-article" ) . length && window . pageYOffset >= 100 ) { state = "show" ; } else { state = "hide" ; } $ ( ".scroll-top-btn" ) . css ( "opacity" , state == "show" ? 1 : 0 ) ; $ ( ".scroll-top-btn" ) . css ( "pointer-events" , state == "show" ? "all" : "none" ) ; }
SHOW OR HIDE SCROLL TOP BUTTON
SHOW OR HIDE SCROLL TOP BUTTON
// if on article detail page and started reading article... // otherwise if not on detail page and at least scrolled down a bit... // otherwise just hide // edit button css based on state