mirror of
https://github.com/glanceapp/glance.git
synced 2024-11-25 01:44:47 +01:00
- Calendar template fixed
- Bug with ics events, from another years fixed
This commit is contained in:
parent
2eb1821941
commit
4cb8b0f4f4
@ -1,6 +1,6 @@
|
||||
{{ template "widget-base.html" . }}
|
||||
|
||||
{{ define "widget-content" }} {{ define "widget-content" }}
|
||||
{{ define "widget-content" }}
|
||||
<div class="widget-small-content-bounds">
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="color-highlight size-h1">{{ .Calendar.CurrentMonthName }}</div>
|
||||
@ -20,15 +20,17 @@
|
||||
<div class="calendar-day">Su</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
{{ range .Calendar.Days }}
|
||||
<div class="calendar-day{{ if eq .Day $.Calendar.CurrentDay }} calendar-day-today{{ end }} {{ if .IsEvent}} calendar-isevent{{ end }}">
|
||||
{{ if .IsEvent}}
|
||||
<div class="tooltip">
|
||||
<span class="tooltiptext">{{ .Event.EventHover }}</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
<span>{{ .Day }}</span>
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
{{ range .Calendar.Days }}
|
||||
<div class="calendar-day{{ if eq .Day $.Calendar.CurrentDay }} calendar-day-today{{ end }} {{ if .IsEvent}} calendar-isevent{{ end }}">
|
||||
{{ if .IsEvent}}
|
||||
<div class="tooltip">
|
||||
<span class="tooltiptext">{{ .Event.EventHover }}</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
<span>{{ .Day }}</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -53,7 +53,7 @@ func NewCalendar(now time.Time, icsurl string) *Calendar {
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
}
|
||||
if startAt.Day() == day && startAt.Month() == month {
|
||||
if startAt.Day() == day && startAt.Month() == month && startAt.Year() == year {
|
||||
dayEvent.StartedDay = startAt
|
||||
dayEvent.EventHover = event.GetProperty("SUMMARY").Value
|
||||
days[i].IsEvent = true
|
||||
|
Loading…
Reference in New Issue
Block a user