2 Commits
Author SHA1 Message Date
mcndave 13d306aec9 Merge branch 'master' of https://git.mcnd.ca/mcndave/lean 2024-11-21 19:15:53 -05:00
mcndave 07613bf1cb - Small work done on calendar widget 2024-11-21 19:15:39 -05:00
+4 -2
View File
@@ -31,15 +31,17 @@
{% foreach range(0, 5) as $week %}
<div class="week">
{% foreach range(0, 6) as $day %}
{% php $dayType = in_array($day, [0, 6]) ? 'week-end' : 'week-day' %}
{% if ( $week * 6 + $day >= $index ) && ( $currentDay < $dayCount ) %}
{% php $currentDay++; %}
{% slot "day.content", new \DateTime("$year-$month-$currentDay"), date("$year-$month-$currentDay") === date('Y-n-j') %}
<div class="day-box {{ $today ? 'today' : '' }}">{{ $date->format('d') }}</div>
<div class="day-box {{ $today ? 'today' : '' }} {{ $dayType }}">{{ $date->format('d') }}</div>
{% endslot %}
{% else %}
{% slot "day.empty", $day, $month, $year %}
<div class="day-box"></div>
<div class="day-box {{ $dayType }}"></div>
{% endslot %}
{% endif %}
{% endforeach %}