mirror of
https://github.com/glanceapp/glance.git
synced 2025-02-18 03:11:32 +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" . }}
|
{{ template "widget-base.html" . }}
|
||||||
|
|
||||||
{{ define "widget-content" }} {{ define "widget-content" }}
|
{{ define "widget-content" }}
|
||||||
<div class="widget-small-content-bounds">
|
<div class="widget-small-content-bounds">
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<div class="color-highlight size-h1">{{ .Calendar.CurrentMonthName }}</div>
|
<div class="color-highlight size-h1">{{ .Calendar.CurrentMonthName }}</div>
|
||||||
@ -20,15 +20,17 @@
|
|||||||
<div class="calendar-day">Su</div>
|
<div class="calendar-day">Su</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-wrap justify-center items-center">
|
<div class="flex flex-wrap justify-center items-center">
|
||||||
{{ range .Calendar.Days }}
|
{{ range .Calendar.Days }}
|
||||||
<div class="calendar-day{{ if eq .Day $.Calendar.CurrentDay }} calendar-day-today{{ end }} {{ if .IsEvent}} calendar-isevent{{ end }}">
|
<div class="calendar-day{{ if eq .Day $.Calendar.CurrentDay }} calendar-day-today{{ end }} {{ if .IsEvent}} calendar-isevent{{ end }}">
|
||||||
{{ if .IsEvent}}
|
{{ if .IsEvent}}
|
||||||
<div class="tooltip">
|
<div class="tooltip">
|
||||||
<span class="tooltiptext">{{ .Event.EventHover }}</span>
|
<span class="tooltiptext">{{ .Event.EventHover }}</span>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<span>{{ .Day }}</span>
|
<span>{{ .Day }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
@ -53,7 +53,7 @@ func NewCalendar(now time.Time, icsurl string) *Calendar {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
if startAt.Day() == day && startAt.Month() == month {
|
if startAt.Day() == day && startAt.Month() == month && startAt.Year() == year {
|
||||||
dayEvent.StartedDay = startAt
|
dayEvent.StartedDay = startAt
|
||||||
dayEvent.EventHover = event.GetProperty("SUMMARY").Value
|
dayEvent.EventHover = event.GetProperty("SUMMARY").Value
|
||||||
days[i].IsEvent = true
|
days[i].IsEvent = true
|
||||||
|
Loading…
Reference in New Issue
Block a user