diff --git a/internal/assets/templates/calendar.html b/internal/assets/templates/calendar.html index 5feabc0..7e6708b 100644 --- a/internal/assets/templates/calendar.html +++ b/internal/assets/templates/calendar.html @@ -1,6 +1,6 @@ {{ template "widget-base.html" . }} -{{ define "widget-content" }} {{ define "widget-content" }} +{{ define "widget-content" }}
{{ .Calendar.CurrentMonthName }}
@@ -20,15 +20,17 @@
Su
-
- {{ range .Calendar.Days }} -
- {{ if .IsEvent}} -
- {{ .Event.EventHover }} -
- {{ end }} - {{ .Day }} +
+ {{ range .Calendar.Days }} +
+ {{ if .IsEvent}} +
+ {{ .Event.EventHover }} +
+ {{ end }} + {{ .Day }}
+ {{ end }} +
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/internal/feed/calendar.go b/internal/feed/calendar.go index b4e6d3e..b94c506 100644 --- a/internal/feed/calendar.go +++ b/internal/feed/calendar.go @@ -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