Tweak checkin rendering
This commit is contained in:
parent
b839012cd9
commit
1ea56eaa72
1 changed files with 9 additions and 7 deletions
|
@ -42,13 +42,15 @@
|
|||
<li>
|
||||
<details class="checkin" id="{{ $checkin->id }}" ontoggle="toggleCheckin(this.open, this.id)">
|
||||
<summary class="checkin__summary">
|
||||
<h2 class="checkin__title">{{ $checkin->title ?? "[No title]" }}</h2>
|
||||
<h2 class="checkin__title">{!! $checkin->title ?? "<i>Untitled</i>" !!}</h2>
|
||||
<p class="checkin__meta">{!! render_date_difference($checkin->date) !!}</p>
|
||||
</summary>
|
||||
{{ $checkin->note ?? "[No note]" }}
|
||||
@if($checkin->image_url)
|
||||
<img class="popup__image" loading="lazy" src="{{ $checkin->image_url }}">
|
||||
@endif
|
||||
@if($checkin->note)
|
||||
{!! $checkin->note !!}
|
||||
@endif
|
||||
@if($checkin->image_url)
|
||||
<img class="popup__image" loading="lazy" src="{{ $checkin->image_url }}">
|
||||
@endif
|
||||
</details>
|
||||
</li>
|
||||
@endforeach
|
||||
|
@ -90,8 +92,8 @@
|
|||
@foreach($trip->checkins as $checkin)
|
||||
marker = L.marker([{{ $checkin->location->latitude }}, {{ $checkin->location->longitude }}]).addTo(map);
|
||||
|
||||
popupMarkup = '<h2 class="popup__title">{{ $checkin->title ?? "No Title" }}</h2>';
|
||||
popupMarkup += `<p class="popup__note">{{ $checkin->note }}</p>`;
|
||||
popupMarkup = `<h2 class="popup__title">{!! $checkin->title ?? "<i>Untitled</i>" !!}</h2>`;
|
||||
popupMarkup += `<p class="popup__note">{!! $checkin->note !!}</p>`;
|
||||
popupMarkup += '<img class="popup__image" src="{{ $checkin->image_url }}">';
|
||||
marker.bindPopup(popupMarkup).openPopup();
|
||||
|
||||
|
|
Loading…
Reference in a new issue