Remove border from months on yearly view and increase spacing, also switch to using css grid
This commit is contained in:
@@ -123,20 +123,21 @@
|
|||||||
{% elif selected_view == 'year'%}
|
{% elif selected_view == 'year'%}
|
||||||
<div class="flex justify-center px-2 py-2 -mb-px">
|
<div class="flex justify-center px-2 py-2 -mb-px">
|
||||||
|
|
||||||
<div class="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 bg-white overflow-hidden">
|
<div
|
||||||
|
class="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-4 lg:gap-10 bg-white overflow-hidden">
|
||||||
{% for i in range(12) %}
|
{% for i in range(12) %}
|
||||||
{% set date = start_date + relativedelta(months=i) %}
|
{% set date = start_date + relativedelta(months=i) %}
|
||||||
{% set first_day_of_month = date.replace(day=1) %}
|
{% set first_day_of_month = date.replace(day=1) %}
|
||||||
{% set last_day_of_month = date + relativedelta(day=31) %}
|
{% set last_day_of_month = date + relativedelta(day=31) %}
|
||||||
{% set (first_day, last_day) = first_and_last_visible_days_in_month(first_day_of_month, last_day_of_month)
|
{% set (first_day, last_day) = first_and_last_visible_days_in_month(first_day_of_month, last_day_of_month)
|
||||||
%}
|
%}
|
||||||
<div class="mx-3 my-3 border-solid border-grey-light rounded border shadow-sm">
|
<div>
|
||||||
<div class="bg-grey-lighter px-2 py-2 border-solid border-grey-light border-b text-center cursor-pointer"
|
<div class="bg-grey-lighter font-semibold text-center cursor-pointer"
|
||||||
hx-get="{{ url_for('get_calendar', person_id=person['PersonId']) }}" hx-target="#container"
|
hx-get="{{ url_for('get_calendar', person_id=person['PersonId']) }}" hx-target="#container"
|
||||||
hx-vals='{"date": "{{ first_day_of_month }}", "view": "month"}' hx-push-url="true">{{
|
hx-vals='{"date": "{{ first_day_of_month }}", "view": "month"}' hx-push-url="true">{{
|
||||||
strftime(first_day_of_month, '%B %Y') }}
|
strftime(first_day_of_month, '%B %Y') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div>
|
||||||
<div class="grid grid-cols-7 border-b font-semibold">
|
<div class="grid grid-cols-7 border-b font-semibold">
|
||||||
<div class="py-3 px-4">S</div>
|
<div class="py-3 px-4">S</div>
|
||||||
<div class="py-3 px-4">M</div>
|
<div class="py-3 px-4">M</div>
|
||||||
@@ -165,7 +166,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user