Compare commits

...

2 Commits

View File

@ -31,15 +31,17 @@
{% foreach range(0, 5) as $week %} {% foreach range(0, 5) as $week %}
<div class="week"> <div class="week">
{% foreach range(0, 6) as $day %} {% foreach range(0, 6) as $day %}
{% php $dayType = in_array($day, [0, 6]) ? 'week-end' : 'week-day' %}
{% if ( $week * 6 + $day >= $index ) && ( $currentDay < $dayCount ) %} {% if ( $week * 6 + $day >= $index ) && ( $currentDay < $dayCount ) %}
{% php $currentDay++; %} {% php $currentDay++; %}
{% slot "day.content", new \DateTime("$year-$month-$currentDay"), date("$year-$month-$currentDay") === date('Y-n-j') %} {% 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 %} {% endslot %}
{% else %} {% else %}
{% slot "day.empty", $day, $month, $year %} {% slot "day.empty", $day, $month, $year %}
<div class="day-box"></div> <div class="day-box {{ $dayType }}"></div>
{% endslot %} {% endslot %}
{% endif %} {% endif %}
{% endforeach %} {% endforeach %}