|
@@ -124,7 +124,16 @@ document.addEventListener('DOMContentLoaded', function() {
|
124
|
124
|
} else {
|
125
|
125
|
var start = window.pageYOffset;
|
126
|
126
|
var target = start + scrollAmount;
|
127
|
|
- var duration = 5000; // duration of the animation
|
|
127
|
+ // Set duration based on screen size
|
|
128
|
+ var screenWidth = window.innerWidth;
|
|
129
|
+ var duration;
|
|
130
|
+ if (screenWidth < 600) {
|
|
131
|
+ duration = 3000; // Smaller screen
|
|
132
|
+ } else if (screenWidth < 1200) {
|
|
133
|
+ duration = 4000; // Medium screen
|
|
134
|
+ } else {
|
|
135
|
+ duration = 7000; // Larger screen
|
|
136
|
+ }
|
128
|
137
|
var startTime = null;
|
129
|
138
|
|
130
|
139
|
function scrollStep(timestamp) {
|