diff --git a/resources/views/partials/checkin-list.blade.php b/resources/views/partials/checkin-list.blade.php new file mode 100644 index 0000000..c533718 --- /dev/null +++ b/resources/views/partials/checkin-list.blade.php @@ -0,0 +1,16 @@ +@foreach($checkinsList as $checkin) +
  • +
    + +

    {!! $checkin->title ?? "Untitled" !!}

    +

    {!! render_date_difference($checkin->date) !!}

    +
    + @if($checkin->note) + {!! $checkin->note !!} + @endif + @if($checkin->image_url) + + @endif +
    +
  • +@endforeach diff --git a/resources/views/tracker.blade.php b/resources/views/tracker.blade.php index 8eb518f..b956e7d 100644 --- a/resources/views/tracker.blade.php +++ b/resources/views/tracker.blade.php @@ -38,22 +38,8 @@ @php $checkinsList = array_slice(array_reverse($trip->checkins), 0, 10) @endphp @endif - @foreach($checkinsList as $checkin) -
  • -
    - -

    {!! $checkin->title ?? "Untitled" !!}

    -

    {!! render_date_difference($checkin->date) !!}

    -
    - @if($checkin->note) - {!! $checkin->note !!} - @endif - @if($checkin->image_url) - - @endif -
    -
  • - @endforeach + @include('partials.checkin-list') + @if (!$showAllCheckins)

    Show all checkins