RoyAalekh commited on
Commit
6e18a26
·
1 Parent(s): c6755c8

feat: Enhanced TreeTrack form UI with improved multi-select and location controls

Browse files

- Redesigned multi-select elements with better visual separation and custom scrollbars
- Added enhanced hover effects and checked states for better UX
- Improved location section with reorganized GPS and Map buttons
- Enhanced mobile responsiveness with proper button stacking
- Added better spacing, padding, and visual hierarchy
- Implemented custom scrollbar styling for multi-select containers
- Optimized button placement for mobile devices (GPS left-aligned, Map full-width)
- Added responsive text hiding for very small screens
- Improved overall form usability and visual appeal

Changes affect utility, phenology, and photography sections with consistent styling.

Files changed (1) hide show
  1. static/index.html +103 -31
static/index.html CHANGED
@@ -381,44 +381,73 @@
381
  appearance: none;
382
  }
383
 
384
- /* Multi-select */
385
  .multi-select {
386
- border: 1px solid var(--gray-300);
387
- border-radius: var(--radius-md);
388
- background: white;
389
- max-height: 140px;
390
  overflow-y: auto;
 
 
 
 
 
 
 
391
  }
392
 
393
- .multi-select-option {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
  display: flex;
395
  align-items: center;
396
  padding: var(--space-3) var(--space-4);
397
- border-bottom: 1px solid var(--gray-100);
398
- transition: background-color 0.15s ease;
 
 
399
  cursor: pointer;
 
 
 
 
 
400
  }
401
 
402
- .multi-select-option:last-child {
403
- border-bottom: none;
 
 
 
404
  }
405
 
406
- .multi-select-option:hover {
407
- background: var(--gray-50);
 
 
 
408
  }
409
 
410
- .multi-select-checkbox {
 
 
411
  margin-right: var(--space-3);
412
- width: 1rem;
413
- height: 1rem;
414
  accent-color: var(--primary-500);
415
- }
416
-
417
- .multi-select-label {
418
- flex: 1;
419
- font-size: 0.875rem;
420
- color: var(--gray-700);
421
- margin: 0;
422
  }
423
 
424
  /* File Upload */
@@ -473,6 +502,49 @@
473
  flex-shrink: 0;
474
  }
475
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476
  /* Form Actions */
477
  .form-actions {
478
  display: flex;
@@ -707,14 +779,7 @@
707
  <div class="form-row">
708
  <div class="form-group">
709
  <label class="form-label required" for="latitude">Latitude</label>
710
- <div class="location-group">
711
- <div class="location-input">
712
- <input type="number" id="latitude" class="form-input" step="0.0000001" min="-90" max="90" required placeholder="e.g. 26.1445">
713
- </div>
714
- <div class="location-button">
715
- <button type="button" id="getLocation" class="btn btn-outline btn-sm">📍 GPS</button>
716
- </div>
717
- </div>
718
  </div>
719
  <div class="form-group">
720
  <label class="form-label required" for="longitude">Longitude</label>
@@ -723,7 +788,14 @@
723
  </div>
724
 
725
  <div class="form-group">
726
- <a href="/static/map.html" class="btn btn-outline" style="width: 100%; justify-content: center;">🗺️ Select from Interactive Map</a>
 
 
 
 
 
 
 
727
  </div>
728
  </div>
729
 
 
381
  appearance: none;
382
  }
383
 
384
+ /* Enhanced Multi-select with better UX */
385
  .multi-select {
386
+ border: 2px solid var(--gray-200);
387
+ border-radius: var(--radius-lg);
388
+ background: var(--gray-50);
389
+ max-height: 200px;
390
  overflow-y: auto;
391
+ overflow-x: hidden;
392
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
393
+ }
394
+
395
+ /* Custom scrollbar for multi-select */
396
+ .multi-select::-webkit-scrollbar {
397
+ width: 8px;
398
  }
399
 
400
+ .multi-select::-webkit-scrollbar-track {
401
+ background: var(--gray-100);
402
+ border-radius: 4px;
403
+ margin: 4px;
404
+ }
405
+
406
+ .multi-select::-webkit-scrollbar-thumb {
407
+ background: var(--gray-400);
408
+ border-radius: 4px;
409
+ }
410
+
411
+ .multi-select::-webkit-scrollbar-thumb:hover {
412
+ background: var(--primary-500);
413
+ }
414
+
415
+ .multi-select label {
416
  display: flex;
417
  align-items: center;
418
  padding: var(--space-3) var(--space-4);
419
+ margin: var(--space-2);
420
+ border: 1px solid var(--gray-200);
421
+ border-radius: var(--radius-md);
422
+ background: white;
423
  cursor: pointer;
424
+ transition: all 0.2s ease;
425
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
426
+ font-size: 0.875rem;
427
+ font-weight: 500;
428
+ color: var(--gray-700);
429
  }
430
 
431
+ .multi-select label:hover {
432
+ border-color: var(--primary-300);
433
+ background: var(--primary-50);
434
+ transform: translateY(-1px);
435
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
436
  }
437
 
438
+ .multi-select label:has(input:checked) {
439
+ border-color: var(--primary-500);
440
+ background: var(--primary-100);
441
+ color: var(--primary-700);
442
+ font-weight: 600;
443
  }
444
 
445
+ .multi-select input[type="checkbox"] {
446
+ width: 1.125rem;
447
+ height: 1.125rem;
448
  margin-right: var(--space-3);
 
 
449
  accent-color: var(--primary-500);
450
+ cursor: pointer;
 
 
 
 
 
 
451
  }
452
 
453
  /* File Upload */
 
502
  flex-shrink: 0;
503
  }
504
 
505
+ /* Location buttons redesign */
506
+ .location-buttons {
507
+ display: flex;
508
+ gap: var(--space-3);
509
+ align-items: center;
510
+ margin-top: var(--space-2);
511
+ }
512
+
513
+ .location-btn-gps {
514
+ flex: 0 0 auto;
515
+ }
516
+
517
+ .location-btn-map {
518
+ flex: 1;
519
+ justify-content: center;
520
+ }
521
+
522
+ @media (max-width: 640px) {
523
+ .location-buttons {
524
+ flex-direction: column;
525
+ gap: var(--space-2);
526
+ }
527
+
528
+ .location-btn-gps {
529
+ align-self: flex-start;
530
+ width: auto;
531
+ }
532
+
533
+ .location-btn-map {
534
+ width: 100%;
535
+ }
536
+
537
+ .btn-text {
538
+ display: inline;
539
+ }
540
+ }
541
+
542
+ @media (max-width: 480px) {
543
+ .btn-text {
544
+ display: none;
545
+ }
546
+ }
547
+
548
  /* Form Actions */
549
  .form-actions {
550
  display: flex;
 
779
  <div class="form-row">
780
  <div class="form-group">
781
  <label class="form-label required" for="latitude">Latitude</label>
782
+ <input type="number" id="latitude" class="form-input" step="0.0000001" min="-90" max="90" required placeholder="e.g. 26.1445">
 
 
 
 
 
 
 
783
  </div>
784
  <div class="form-group">
785
  <label class="form-label required" for="longitude">Longitude</label>
 
788
  </div>
789
 
790
  <div class="form-group">
791
+ <div class="location-buttons">
792
+ <button type="button" id="getLocation" class="btn btn-outline location-btn-gps">
793
+ 📍 <span class="btn-text">Get GPS Location</span>
794
+ </button>
795
+ <a href="/static/map.html" class="btn btn-primary location-btn-map">
796
+ 🗺️ <span class="btn-text">Select from Map</span>
797
+ </a>
798
+ </div>
799
  </div>
800
  </div>
801