Update main.js, index.html

This commit is contained in:
XenGi 2022-02-08 21:23:07 +00:00
commit 0e30b0ce96
2 changed files with 9 additions and 9 deletions

View file

@ -5,12 +5,12 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>mkbd65 - by XenGi</title>
<link rel="stylesheet" href="css/bulma.css" />
<link rel="stylesheet" href="css/fontawesome.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="/css/bulma.css" />
<link rel="stylesheet" href="/css/fontawesome.css" />
<link rel="stylesheet" href="/css/main.css" />
</head>
<body>
<button class="button is-primary is-medium is-responsive" onclick="gototop()" id="gototop_button" title="Go to top">
<button class="button is-primary is-medium is-responsive" onclick="gototop()" id="gototop" title="Go to top">
<span class="icon is-medium">
<i class="fas fa-solid fa-angles-up"></i>
</span>
@ -322,6 +322,6 @@
</div><!--/.content .has-text-centered-->
</footer><!--/.footer-->
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="/js/main.js"></script>
</body>
</html>

View file

@ -1,9 +1,9 @@
// Show button on scroll
window.onscroll = function() { toggle_gototop_button() };
window.onscroll = function() { toggle_gototop() };
function toggle_gototop_button() {
gototop_button = document.getElementById("gototop_button");
if (document.body.scrollTop > 23 || document.documentElement.scrollTop > 23) {
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";