Skip to content
Snippets Groups Projects
Commit 23ac7f81 authored by HouTeng Chan's avatar HouTeng Chan
Browse files

Update file home.html

parent 4a8884f1
No related branches found
No related tags found
No related merge requests found
......@@ -142,33 +142,35 @@
.scroll-line {
position: fixed;
right: 50px;
top: 120px;
bottom: 20px;
width: 4px;
background-color: transparent;
top: 0;
bottom: 120px;
width: 10px;
background-color: rgba(255, 192, 203, 0.7);
border-radius: 5px;
z-index: 999;
}
.scroll-progress {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
background-color: #FFB6C1;
background-color: #FF69B4;
border-radius: 5px;
transition: height 0.3s;
}
.scroll-fragrance {
position: absolute;
top: 100%;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
width: 30px;
height: 30px;
background-color: #FFB6C1;
background-color: #FF69B4;
border-radius: 50%;
animation: float 2s ease-in-out infinite;
}
@keyframes float {
0%, 100% { transform: translate(-50%, 0); }
50% { transform: translate(-50%, 10px); }
50% { transform: translate(-50%, -10px); }
}
.centered-text {
text-align: center;
......@@ -262,7 +264,7 @@
</div>
{% include 'footer.html' %}
<script>
<script>
window.addEventListener('load', function() {
const loaderContainer = document.querySelector('.loader-container');
setTimeout(function() {
......@@ -276,21 +278,14 @@
window.addEventListener('scroll', function() {
var scrollGuide = document.querySelector('.scroll-guide');
var scrollLine = document.querySelector('.scroll-line');
var scrollProgress = document.querySelector('.scroll-progress');
var scrollPosition = window.scrollY;
var windowHeight = window.innerHeight;
var documentHeight = document.documentElement.scrollHeight;
var scrollPercentage = (scrollPosition / (documentHeight - windowHeight)) * 100;
scrollProgress.style.height = scrollPercentage + '%';
if (scrollPosition + windowHeight >= documentHeight - 100) {
scrollGuide.style.display = 'none';
scrollLine.style.display = 'none';
} else {
scrollGuide.style.display = 'block';
scrollLine.style.display = 'block';
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment