You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.0 KiB

  1. @extends('layouts.map')
  2. @section('content')
  3. @include('partials/logged-in')
  4. <div id="daterange"><div class="in">
  5. <div class="ui form">
  6. <div class="fields">
  7. <div class="five wide field"><input type="text" id="range-from" placeholder="from" value="<?= $range_from ?>"></div>
  8. <div class="five wide field"><input type="text" id="range-to" placeholder="to" value="<?= $range_to ?>"></div>
  9. <div class="five wide field"><input type="text" id="timezone" value="<?= $range_tz ?>"></div>
  10. <button class="ui submit button" id="range-go">Go</button>
  11. </div>
  12. </div>
  13. @if($database->micropub_endpoint)
  14. <div class="ui form hidden" style="margin-top: 4px;" id="trip-create-form">
  15. <div class="fields">
  16. <div style="display: flex; margin-right: 4px;">
  17. <select id="trip-mode">
  18. @foreach(['bicycle', 'car2go', 'drive', 'train', 'walk', 'run', 'plane', 'train', 'bus'] as $mode)
  19. <option value="{{ $mode }}">{{ $mode }}</option>
  20. @endforeach
  21. </select>
  22. </div>
  23. <button class="ui submit button" id="trip-create">Create Trip</button>
  24. </div>
  25. </div>
  26. @endif
  27. </div></div>
  28. <div id="calendar">
  29. <div class="scroll">
  30. <?php
  31. $days = array_fill(1,31,['#']);
  32. $start = new DateTime('2008-05-30T00:00:00-0800');
  33. $end = new DateTime();
  34. $end->setTimeZone(new DateTimeZone('America/Los_Angeles'));
  35. $i = clone $start;
  36. while((int)$i->format('Y') <= (int)$end->format('Y') && (int)$i->format('M') <= (int)$end->format('M')) {
  37. ?>
  38. @include('partials/calendar', [
  39. 'year' => $i->format('Y'),
  40. 'month' => $i->format('m'),
  41. 'days' => $days,
  42. 'day_name_length' => 3,
  43. 'month_href' => null,
  44. 'first_day' => 1,
  45. 'pn' => []
  46. ])
  47. <?php
  48. $i = $i->add(new DateInterval('P1M'));
  49. }
  50. ?>
  51. </div>
  52. </div>
  53. <div id="map"></div>
  54. <div id="graphs">
  55. <div id="battery-chart" width="800" height="160"></div>
  56. </div>
  57. <div id="database" data-name="{{ $database->name }}" data-token="{{ $database->read_token }}" data-write-token="{{ $database->write_token }}"></div>
  58. @endsection