Style: Add an icon on completed homework
This commit is contained in:
@@ -49,17 +49,17 @@ else
|
|||||||
@foreach (var day in DaysForCurrentMonth)
|
@foreach (var day in DaysForCurrentMonth)
|
||||||
{
|
{
|
||||||
var isOtherMonth = day.Month != currentMonth.Month;
|
var isOtherMonth = day.Month != currentMonth.Month;
|
||||||
var hwForDay = GetHomeworksForDate(day);
|
var homeworkForDay = GetHomeworksForDate(day);
|
||||||
<div class="calendar-day @(isOtherMonth ? "other-month" : "")">
|
<div class="calendar-day @(isOtherMonth ? "other-month" : "")">
|
||||||
<div class="date-number">@day.Day</div>
|
<div class="date-number">@day.Day</div>
|
||||||
@if (hwForDay != null && hwForDay.Count > 0)
|
@if (homeworkForDay != null && homeworkForDay.Count > 0)
|
||||||
{
|
{
|
||||||
<div class="homeworks-list">
|
<div class="homeworks-list">
|
||||||
@foreach (var hw in hwForDay)
|
@foreach (var homework in homeworkForDay)
|
||||||
{
|
{
|
||||||
var color = GetSubjectColor(hw.SchoolSubject);
|
var color = GetSubjectColor(homework.SchoolSubject);
|
||||||
<div class="hw-pill" title="@($"{hw.Title} - {hw.SchoolSubject?.Name}")" style="background:@color">
|
<div class="hw-pill" title="@($"{homework.Title} - {homework.SchoolSubject?.Name}")" style="background:@color">
|
||||||
@Shorten(hw.Title, 28)
|
@Shorten(homework.Title, 28) @(homework.IsCompleted ? "✅" : string.Empty)
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -89,4 +89,3 @@
|
|||||||
NavigationManager.LocationChanged -= OnLocationChanged;
|
NavigationManager.LocationChanged -= OnLocationChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user