Update css/main.css, js/main.js

Deleted main.css, main.js
This commit is contained in:
XenGi 2022-02-08 21:48:00 +00:00
commit 4b70c28030
4 changed files with 25 additions and 24 deletions

View file

@ -1,3 +1,12 @@
html {
scroll-behavior: smooth;
}
#gototop_button {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
cursor: pointer;
}

View file

@ -0,0 +1,16 @@
// Show button on scroll
window.onscroll = function() { toggle_gototop() };
function toggle_gototop() {
gototop_button = document.getElementById("gototop");
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
gototop_button.style.display = "block";
} else {
gototop_button.style.display = "none";
}
}
function gototop() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}

View file

@ -1,8 +0,0 @@
#gototop_button {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
cursor: pointer;
}

16
main.js
View file

@ -1,16 +0,0 @@
// Show button on scroll
window.onscroll = function() { toggle_gototop() };
function toggle_gototop() {
gototop_button = document.getElementById("gototop");
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
gototop_button.style.display = "block";
} else {
gototop_button.style.display = "none";
}
}
function gototop() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}