Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions leave_calendar/www/leave_calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ body {
border-radius: 5px;
}

.vacation-day-field.half-day {
background: linear-gradient(to bottom, var(--day-color) 50%, #e0e0e0 50%);
}

.default {
background-color: #e0e0e0;
}
Expand Down Expand Up @@ -362,6 +366,10 @@ body.dark-mode .legend-item {
color: #ffffff;
}

body.dark-mode .vacation-day-field.half-day {
background: linear-gradient(to bottom, var(--day-color) 50%, #636363 50%);
}

body.dark-mode .filter-container,
body.dark-mode .year-filter,
body.dark-mode .current-year-display {
Expand Down
10 changes: 3 additions & 7 deletions leave_calendar/www/leave_calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,13 @@
<td class="text-center">{{ employee.new_leaves_allocated }}</td>
<td class="text-center">{{ employee.unused_leaves }}</td>
{% for day in employee.days %}
{% if day.type.half_day == 1 %}
{% set background_css = "background: linear-gradient(to bottom, " ~ day.type.color ~ " 50%, #ffffff 50%)" %}
{% else %}
{% set background_css = "background-color: " ~ day.type.color %}
{% endif %}

<td>
{% if day.type.name in ["DEFAULT", "SATURDAY", "SUNDAY"] %}
<div class="vacation-day-field default">{{ day.type.abbreviation }}</div>
{% elif day.type.half_day == 1 %}
<div class="vacation-day-field half-day" style="--day-color: {{ day.type.color }}">{{ day.type.abbreviation }}</div>
{% else %}
<div class="vacation-day-field" style="{{ background_css }}">{{ day.type.abbreviation }}</div>
<div class="vacation-day-field" style="background-color: {{ day.type.color }}">{{ day.type.abbreviation }}</div>
{% endif %}
</td>
{% endfor %}
Expand Down
Loading