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':
|
case 'weekly':
|
||||||
$cutoffDateTime->modify('-1 week');
|
$cutoffDateTime->modify('-1 week');
|
||||||
break;
|
break;
|
||||||
|
case 'fortnightly':
|
||||||
|
$cutoffDateTime->modify('-2 weeks');
|
||||||
|
break;
|
||||||
case 'monthly':
|
case 'monthly':
|
||||||
$cutoffDateTime->modify('-1 month');
|
$cutoffDateTime->modify('-1 month');
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -37,21 +37,25 @@
|
||||||
<p>View the tracker <a href="https://track.bengoldsworthy.net">here.</a></p>
|
<p>View the tracker <a href="https://track.bengoldsworthy.net">here.</a></p>
|
||||||
<hr>
|
<hr>
|
||||||
<h2>Checkins</h2>
|
<h2>Checkins</h2>
|
||||||
<ol>
|
@if($checkins)
|
||||||
@foreach($checkins as $checkin)
|
<ol>
|
||||||
<li>
|
@foreach($checkins as $checkin)
|
||||||
<details class="checkin" id="{{ $checkin->id }}">
|
<li>
|
||||||
<summary class="checkin__summary">
|
<details class="checkin" id="{{ $checkin->id }}">
|
||||||
<h3 class="checkin__title">{!! $checkin->title ?? "<i>Untitled</i>" !!}</h3>
|
<summary class="checkin__summary">
|
||||||
<p class="checkin__meta">{!! render_date_difference($checkin->date) !!}</p>
|
<h3 class="checkin__title">{!! $checkin->title ?? "<i>Untitled</i>" !!}</h3>
|
||||||
</summary>
|
<p class="checkin__meta">{!! render_date_difference($checkin->date) !!}</p>
|
||||||
@if($checkin->note)
|
</summary>
|
||||||
{!! $checkin->note !!}
|
@if($checkin->note)
|
||||||
@endif
|
{!! $checkin->note !!}
|
||||||
@if($checkin->image_url)
|
@endif
|
||||||
<img class="popup__image" loading="lazy" src="{{ $checkin->image_url }}">
|
@if($checkin->image_url)
|
||||||
@endif
|
<img class="popup__image" loading="lazy" src="{{ $checkin->image_url }}">
|
||||||
</details>
|
@endif
|
||||||
</li>
|
</details>
|
||||||
@endforeach
|
</li>
|
||||||
</ol>
|
@endforeach
|
||||||
|
</ol>
|
||||||
|
@else
|
||||||
|
<p>No new checkins</p>
|
||||||
|
@endif
|
||||||
|
|
Loading…
Reference in a new issue