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/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;
}
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)
- -
-
+ -
+
{{ $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();
+ }
}
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());