Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions public/Community.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
<link rel="stylesheet" href="community.css">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
</head>

<body>
Expand Down Expand Up @@ -107,7 +107,10 @@ <h3 id="swal-msg"></h3>
<button class="btn-submit" onclick="closeSwal()">OK</button>
</div>
</div>

<!-- Scroll To Top Button -->
<button id="scrollTopBtn" title="Go to top">
<i class="fas fa-arrow-up"></i>
</button>
<script src="protect.js"></script>
<script src="community.js"></script>

Expand Down
27 changes: 27 additions & 0 deletions public/community.css
Original file line number Diff line number Diff line change
Expand Up @@ -858,4 +858,31 @@ body {
.cursor-hovering {
transform: translate(-50%, -50%) scale(1.3);
background: linear-gradient(135deg, #00b4d8 0%, #64ffda 100%) !important;
}#scrollTopBtn{
position: fixed;
bottom: 30px;
right: 30px;
background: linear-gradient(135deg,#00e6a8,#64ffda);
color: #000;
border: none;
padding: 14px 16px;
border-radius: 50%;
font-size: 18px;
cursor: pointer;
display: none;
z-index: 1000;
box-shadow: 0 0 15px rgba(100,255,218,0.7);
transition: all 0.3s ease;
}

#scrollTopBtn:hover{
transform: translateY(-4px) scale(1.1);
box-shadow: 0 0 25px rgba(100,255,218,1);
}

/* Dark Mode */

body.dark-mode #scrollTopBtn{
background: linear-gradient(135deg,#64ffda,#00bfa5);
color:white;
}
15 changes: 15 additions & 0 deletions public/community.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,18 @@ ${p.replies.map((r) => `<div>💬 ${r.t}</div>`).join("")}
.join("");
}
render();
const scrollBtn = document.getElementById("scrollTopBtn");
window.onscroll = function () {
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
scrollBtn.style.display = "block";
} else {
scrollBtn.style.display = "none";
}
};

scrollBtn.addEventListener("click", function () {
window.scrollTo({
top: 0,
behavior: "smooth"
});
});
47 changes: 46 additions & 1 deletion public/networth.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,34 @@
canvas {
margin-top: 20px;
}
#scrollTopBtn{
position: fixed;
bottom: 30px;
right: 30px;
background: linear-gradient(135deg,#00e6a8,#64ffda);
color: #000;
border: none;
padding: 14px 16px;
border-radius: 50%;
font-size: 18px;
cursor: pointer;
display: none;
z-index: 1000;
box-shadow: 0 0 15px rgba(100,255,218,0.7);
transition: all 0.3s ease;
}

#scrollTopBtn:hover{
transform: translateY(-4px) scale(1.1);
box-shadow: 0 0 25px rgba(100,255,218,1);
}

/* Dark Mode */

body.dark-mode #scrollTopBtn{
background: linear-gradient(135deg,#64ffda,#00bfa5);
color:white;
}
</style>
</head>

Expand Down Expand Up @@ -196,7 +223,10 @@ <h3>Debt Breakdown</h3>
</div>

</div>

<!-- Scroll To Top Button -->
<button id="scrollTopBtn" title="Go to top">
<i class="fas fa-arrow-up"></i>
</button>
<script>

let assetChart, debtChart;
Expand Down Expand Up @@ -297,7 +327,22 @@ <h3>Debt Breakdown</h3>
toggle.innerHTML='<i class="fas fa-moon"></i>';
}
});
const scrollBtn = document.getElementById("scrollTopBtn");

window.onscroll = function () {
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
scrollBtn.style.display = "block";
} else {
scrollBtn.style.display = "none";
}
};

scrollBtn.addEventListener("click", function () {
window.scrollTo({
top: 0,
behavior: "smooth"
});
});
</script>

</body>
Expand Down