Spaces:
Running
Complete UI fixes: Granim animations + location panel buttons
Browse files✅ Fixed Granim background coverage on all pages:
- Login page: Disabled zoom animation, full viewport coverage
- Index/Form page: Fixed header gradient scaling & animation
- Map page: Fixed header gradient & location panel buttons
✅ Fixed location panel button visibility:
- Added explicit CSS styling for .tt-btn classes in location panel
- Ensured Cancel button is fully visible and styled
- Added hover effects and proper spacing
- Made buttons touch-friendly (44px min height)
✅ Improved gradient animations:
- Removed scaling effects that caused zoom/growth
- Added 5th gradient color for smoother transitions
- Faster transition speed (6s instead of 8s)
- Higher resolution background images (w=2000)
- Disabled pause when not in view for consistent animation
✅ Updated service worker cache (v1734826222) for deployment
All pages now have consistent, smooth gradient backgrounds without
visual glitches and fully functional UI components.
- static/index.html +14 -10
- static/login.html +13 -13
- static/map.html +55 -10
- static/sw.js +1 -1
@@ -95,9 +95,10 @@
|
|
95 |
position: absolute;
|
96 |
top: 0;
|
97 |
left: 0;
|
98 |
-
width:
|
99 |
height: 100%;
|
100 |
z-index: 1;
|
|
|
101 |
}
|
102 |
|
103 |
/* Ensure header content is above canvas */
|
@@ -1155,24 +1156,27 @@
|
|
1155 |
<script>
|
1156 |
// Initialize Granim background animation on page load
|
1157 |
document.addEventListener('DOMContentLoaded', function() {
|
1158 |
-
// Initialize Granim with
|
1159 |
var headerGranimInstance = new Granim({
|
1160 |
element: '#header-canvas',
|
1161 |
direction: 'diagonal',
|
1162 |
-
isPausedWhenNotInView:
|
1163 |
image: {
|
1164 |
-
|
1165 |
-
|
|
|
|
|
1166 |
},
|
1167 |
states: {
|
1168 |
"default-state": {
|
1169 |
gradients: [
|
1170 |
-
['#
|
1171 |
-
['#
|
1172 |
-
['#
|
1173 |
-
['#
|
|
|
1174 |
],
|
1175 |
-
transitionSpeed:
|
1176 |
}
|
1177 |
}
|
1178 |
});
|
|
|
95 |
position: absolute;
|
96 |
top: 0;
|
97 |
left: 0;
|
98 |
+
width: 100vw;
|
99 |
height: 100%;
|
100 |
z-index: 1;
|
101 |
+
background: linear-gradient(135deg, #1a2f1a, #2d5a2d, #4a7c4a);
|
102 |
}
|
103 |
|
104 |
/* Ensure header content is above canvas */
|
|
|
1156 |
<script>
|
1157 |
// Initialize Granim background animation on page load
|
1158 |
document.addEventListener('DOMContentLoaded', function() {
|
1159 |
+
// Initialize Granim with animated gradients and full coverage
|
1160 |
var headerGranimInstance = new Granim({
|
1161 |
element: '#header-canvas',
|
1162 |
direction: 'diagonal',
|
1163 |
+
isPausedWhenNotInView: false,
|
1164 |
image: {
|
1165 |
+
source: 'https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?q=80&w=2000&auto=format&fit=crop&ixlib=rb-4.0.3',
|
1166 |
+
position: ['center', 'center'],
|
1167 |
+
stretchMode: ['stretch', 'stretch'],
|
1168 |
+
blendingMode: 'multiply'
|
1169 |
},
|
1170 |
states: {
|
1171 |
"default-state": {
|
1172 |
gradients: [
|
1173 |
+
['#1a2f1a', '#2d5a2d', '#4a7c4a'],
|
1174 |
+
['#0d3d0d', '#1a5c1a', '#2e7c2e'],
|
1175 |
+
['#2c4c2c', '#3e6e3e', '#5a8a5a'],
|
1176 |
+
['#1e3e1e', '#2f5f2f', '#4a7a4a'],
|
1177 |
+
['#234a2c', '#326641', '#4a7c4a']
|
1178 |
],
|
1179 |
+
transitionSpeed: 6000
|
1180 |
}
|
1181 |
}
|
1182 |
});
|
@@ -28,7 +28,6 @@
|
|
28 |
width: 100vw;
|
29 |
height: 100vh;
|
30 |
z-index: -1;
|
31 |
-
object-fit: cover;
|
32 |
background: linear-gradient(135deg, #1a2f1a, #2d5a2d, #4a7c4a);
|
33 |
}
|
34 |
|
@@ -366,11 +365,11 @@
|
|
366 |
console.log('Initializing Granim...');
|
367 |
|
368 |
try {
|
369 |
-
// Initialize Granim with
|
370 |
var granimInstance = new Granim({
|
371 |
element: '#granim-canvas',
|
372 |
direction: 'diagonal',
|
373 |
-
isPausedWhenNotInView:
|
374 |
image: {
|
375 |
source: 'https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?q=80&w=2000&auto=format&fit=crop&ixlib=rb-4.0.3',
|
376 |
position: ['center', 'center'],
|
@@ -380,19 +379,20 @@
|
|
380 |
states: {
|
381 |
"default-state": {
|
382 |
gradients: [
|
383 |
-
['#1a2f1a', '#2d5a2d', '#4a7c4a'
|
384 |
-
['#0d3d0d', '#1a5c1a', '#2e7c2e'
|
385 |
-
['#2c4c2c', '#3e6e3e', '#5a8a5a'
|
386 |
-
['#1e3e1e', '#2f5f2f', '#4a7a4a',
|
|
|
387 |
],
|
388 |
-
transitionSpeed:
|
389 |
}
|
390 |
},
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
}
|
397 |
});
|
398 |
|
|
|
28 |
width: 100vw;
|
29 |
height: 100vh;
|
30 |
z-index: -1;
|
|
|
31 |
background: linear-gradient(135deg, #1a2f1a, #2d5a2d, #4a7c4a);
|
32 |
}
|
33 |
|
|
|
365 |
console.log('Initializing Granim...');
|
366 |
|
367 |
try {
|
368 |
+
// Initialize Granim with animated gradients and full coverage
|
369 |
var granimInstance = new Granim({
|
370 |
element: '#granim-canvas',
|
371 |
direction: 'diagonal',
|
372 |
+
isPausedWhenNotInView: false,
|
373 |
image: {
|
374 |
source: 'https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?q=80&w=2000&auto=format&fit=crop&ixlib=rb-4.0.3',
|
375 |
position: ['center', 'center'],
|
|
|
379 |
states: {
|
380 |
"default-state": {
|
381 |
gradients: [
|
382 |
+
['#1a2f1a', '#2d5a2d', '#4a7c4a'],
|
383 |
+
['#0d3d0d', '#1a5c1a', '#2e7c2e'],
|
384 |
+
['#2c4c2c', '#3e6e3e', '#5a8a5a'],
|
385 |
+
['#1e3e1e', '#2f5f2f', '#4a7a4a'],
|
386 |
+
['#234a2c', '#326641', '#4a7c4a']
|
387 |
],
|
388 |
+
transitionSpeed: 6000
|
389 |
}
|
390 |
},
|
391 |
+
onStart: function() {
|
392 |
+
console.log('Granim animation started');
|
393 |
+
},
|
394 |
+
onEnd: function() {
|
395 |
+
console.log('Granim animation ended');
|
396 |
}
|
397 |
});
|
398 |
|
@@ -107,9 +107,10 @@
|
|
107 |
position: absolute;
|
108 |
top: 0;
|
109 |
left: 0;
|
110 |
-
width:
|
111 |
height: 100%;
|
112 |
z-index: 1;
|
|
|
113 |
}
|
114 |
|
115 |
/* Ensure header content is above canvas */
|
@@ -322,6 +323,47 @@
|
|
322 |
grid-template-columns: 1fr 1fr;
|
323 |
gap: var(--space-3);
|
324 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
|
326 |
/* Messages */
|
327 |
.message {
|
@@ -870,24 +912,27 @@
|
|
870 |
<script>
|
871 |
// Initialize Granim background animation on page load
|
872 |
document.addEventListener('DOMContentLoaded', function() {
|
873 |
-
// Initialize Granim with
|
874 |
var mapHeaderGranimInstance = new Granim({
|
875 |
element: '#map-header-canvas',
|
876 |
direction: 'radial',
|
877 |
-
isPausedWhenNotInView:
|
878 |
image: {
|
879 |
-
|
880 |
-
|
|
|
|
|
881 |
},
|
882 |
states: {
|
883 |
"default-state": {
|
884 |
gradients: [
|
885 |
-
['#
|
886 |
-
['#
|
887 |
-
['#
|
888 |
-
['#
|
|
|
889 |
],
|
890 |
-
transitionSpeed:
|
891 |
}
|
892 |
}
|
893 |
});
|
|
|
107 |
position: absolute;
|
108 |
top: 0;
|
109 |
left: 0;
|
110 |
+
width: 100vw;
|
111 |
height: 100%;
|
112 |
z-index: 1;
|
113 |
+
background: linear-gradient(135deg, #1a2f1a, #2d5a2d, #4a7c4a);
|
114 |
}
|
115 |
|
116 |
/* Ensure header content is above canvas */
|
|
|
323 |
grid-template-columns: 1fr 1fr;
|
324 |
gap: var(--space-3);
|
325 |
}
|
326 |
+
|
327 |
+
/* Ensure buttons are visible in location panel */
|
328 |
+
.location-actions .tt-btn {
|
329 |
+
width: 100%;
|
330 |
+
padding: var(--space-3) var(--space-4);
|
331 |
+
border-radius: var(--radius-md);
|
332 |
+
font-size: 0.875rem;
|
333 |
+
font-weight: 500;
|
334 |
+
cursor: pointer;
|
335 |
+
transition: all 0.15s ease;
|
336 |
+
border: 1px solid transparent;
|
337 |
+
text-align: center;
|
338 |
+
display: flex;
|
339 |
+
align-items: center;
|
340 |
+
justify-content: center;
|
341 |
+
min-height: 44px;
|
342 |
+
}
|
343 |
+
|
344 |
+
.location-actions .tt-btn-primary {
|
345 |
+
background: var(--primary-600);
|
346 |
+
color: white;
|
347 |
+
border-color: var(--primary-600);
|
348 |
+
}
|
349 |
+
|
350 |
+
.location-actions .tt-btn-primary:hover {
|
351 |
+
background: var(--primary-700);
|
352 |
+
border-color: var(--primary-700);
|
353 |
+
transform: translateY(-1px);
|
354 |
+
}
|
355 |
+
|
356 |
+
.location-actions .tt-btn-secondary {
|
357 |
+
background: var(--gray-100);
|
358 |
+
color: var(--gray-700);
|
359 |
+
border-color: var(--gray-300);
|
360 |
+
}
|
361 |
+
|
362 |
+
.location-actions .tt-btn-secondary:hover {
|
363 |
+
background: var(--gray-200);
|
364 |
+
border-color: var(--gray-400);
|
365 |
+
transform: translateY(-1px);
|
366 |
+
}
|
367 |
|
368 |
/* Messages */
|
369 |
.message {
|
|
|
912 |
<script>
|
913 |
// Initialize Granim background animation on page load
|
914 |
document.addEventListener('DOMContentLoaded', function() {
|
915 |
+
// Initialize Granim with animated gradients and full coverage
|
916 |
var mapHeaderGranimInstance = new Granim({
|
917 |
element: '#map-header-canvas',
|
918 |
direction: 'radial',
|
919 |
+
isPausedWhenNotInView: false,
|
920 |
image: {
|
921 |
+
source: 'https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?q=80&w=2000&auto=format&fit=crop&ixlib=rb-4.0.3',
|
922 |
+
position: ['center', 'center'],
|
923 |
+
stretchMode: ['stretch', 'stretch'],
|
924 |
+
blendingMode: 'multiply'
|
925 |
},
|
926 |
states: {
|
927 |
"default-state": {
|
928 |
gradients: [
|
929 |
+
['#1a2f1a', '#2d5a2d', '#4a7c4a'],
|
930 |
+
['#0d3d0d', '#1a5c1a', '#2e7c2e'],
|
931 |
+
['#2c4c2c', '#3e6e3e', '#5a8a5a'],
|
932 |
+
['#1e3e1e', '#2f5f2f', '#4a7a4a'],
|
933 |
+
['#234a2c', '#326641', '#4a7c4a']
|
934 |
],
|
935 |
+
transitionSpeed: 6000
|
936 |
}
|
937 |
}
|
938 |
});
|
@@ -1,5 +1,5 @@
|
|
1 |
// TreeTrack Service Worker - PWA and Offline Support
|
2 |
-
const VERSION =
|
3 |
const CACHE_NAME = `treetrack-v${VERSION}`;
|
4 |
const STATIC_CACHE = `static-v${VERSION}`;
|
5 |
const API_CACHE = `api-v${VERSION}`;
|
|
|
1 |
// TreeTrack Service Worker - PWA and Offline Support
|
2 |
+
const VERSION = 1734826222; // Cache busting - updated for location panel button fix & Granim improvements
|
3 |
const CACHE_NAME = `treetrack-v${VERSION}`;
|
4 |
const STATIC_CACHE = `static-v${VERSION}`;
|
5 |
const API_CACHE = `api-v${VERSION}`;
|