Handle fortnightly digests, empty digests
This commit is contained in:
parent
77aaf4748f
commit
6eaaff513c
2 changed files with 25 additions and 18 deletions
|
@ -55,6 +55,9 @@ class Digest extends Mailable
|
|||
case 'weekly':
|
||||
$cutoffDateTime->modify('-1 week');
|
||||
break;
|
||||
case 'fortnightly':
|
||||
$cutoffDateTime->modify('-2 weeks');
|
||||
break;
|
||||
case 'monthly':
|
||||
$cutoffDateTime->modify('-1 month');
|
||||
break;
|
||||
|
|
|
@ -37,21 +37,25 @@
|
|||
<p>View the tracker <a href="https://track.bengoldsworthy.net">here.</a></p>
|
||||
<hr>
|
||||
<h2>Checkins</h2>
|
||||
<ol>
|
||||
@foreach($checkins as $checkin)
|
||||
<li>
|
||||
<details class="checkin" id="{{ $checkin->id }}">
|
||||
<summary class="checkin__summary">
|
||||
<h3 class="checkin__title">{!! $checkin->title ?? "<i>Untitled</i>" !!}</h3>
|
||||
<p class="checkin__meta">{!! render_date_difference($checkin->date) !!}</p>
|
||||
</summary>
|
||||
@if($checkin->note)
|
||||
{!! $checkin->note !!}
|
||||
@endif
|
||||
@if($checkin->image_url)
|
||||
<img class="popup__image" loading="lazy" src="{{ $checkin->image_url }}">
|
||||
@endif
|
||||
</details>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
@if($checkins)
|
||||
<ol>
|
||||
@foreach($checkins as $checkin)
|
||||
<li>
|
||||
<details class="checkin" id="{{ $checkin->id }}">
|
||||
<summary class="checkin__summary">
|
||||
<h3 class="checkin__title">{!! $checkin->title ?? "<i>Untitled</i>" !!}</h3>
|
||||
<p class="checkin__meta">{!! render_date_difference($checkin->date) !!}</p>
|
||||
</summary>
|
||||
@if($checkin->note)
|
||||
{!! $checkin->note !!}
|
||||
@endif
|
||||
@if($checkin->image_url)
|
||||
<img class="popup__image" loading="lazy" src="{{ $checkin->image_url }}">
|
||||
@endif
|
||||
</details>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
@else
|
||||
<p>No new checkins</p>
|
||||
@endif
|
||||
|
|
Loading…
Reference in a new issue