From 838dda07c4abe2970d5d3aaa2eff29dded0f2917 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 24 Aug 2022 10:40:58 +0000 Subject: [PATCH 1/3] Fix mobile map height --- public/css/app.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/css/app.css b/public/css/app.css index 341e02c..d699dce 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -24,7 +24,7 @@ } #map { - min-height: 800px; + height: 400px; grid-column-start: 1; grid-column-end: 3; } @@ -44,6 +44,8 @@ details h2 { } #map { + height: auto; + min-height: 800px; grid-column-end: 2; } From 08beeced358050426b04008f3675ebb572d60672 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 24 Aug 2022 10:41:23 +0000 Subject: [PATCH 2/3] Fix details toggling --- resources/views/tracker.blade.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/resources/views/tracker.blade.php b/resources/views/tracker.blade.php index 8cdb23a..ed9757d 100644 --- a/resources/views/tracker.blade.php +++ b/resources/views/tracker.blade.php @@ -12,10 +12,10 @@ - + - +

Where in the World is Ben?

@@ -32,8 +32,8 @@
    @foreach($trip->checkins as $checkin) -
  1. -
    +
  2. +

    {{ $checkin->title ?? "[No title]" }}

    {{ $checkin->date }}
    {{ $checkin->note ?? "[No note]" }}
    @@ -71,8 +71,18 @@ checkinMarkers[{{ $checkin->id }}] = marker; @endforeach - function openCheckin(checkinId) { - checkinMarkers[checkinId].openPopup(); + function toggleCheckin(isOpen, checkinId) { + if (isOpen) { + var checkins = document.querySelectorAll('details'); + + checkinMarkers[checkinId].openPopup(); + + checkins.forEach(checkin => { + if (checkin.id != checkinId && checkin.open) checkin.open = false; + }); + } else { + checkinMarkers[checkinId].closePopup(); + } } From 045a42c250ed421e84f774f8619d7625934dcce1 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 24 Aug 2022 10:41:43 +0000 Subject: [PATCH 3/3] Move trip URL to .env --- config/app.php | 2 ++ routes/web.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index ef76a7e..f8008d4 100644 --- a/config/app.php +++ b/config/app.php @@ -58,6 +58,8 @@ return [ 'asset_url' => env('ASSET_URL'), + 'trip' => env('TRIP'), + /* |-------------------------------------------------------------------------- | Application Timezone diff --git a/routes/web.php b/routes/web.php index c7aedef..f563875 100644 --- a/routes/web.php +++ b/routes/web.php @@ -20,7 +20,7 @@ Route::get('/', function () { 'timeout' => 3.0 ]); - $response = $client->get('trip/q0mwldvenxq09p2x18nj/user/zmld8ko6qy7d9j3xvq10/json'); + $response = $client->get('trip/'.config('app.trip').'/user/zmld8ko6qy7d9j3xvq10/json'); if ($response->getStatusCode() == 200) { $data = json_decode($response->getBody());