added calendars for kisfenyo
This commit is contained in:
@@ -850,6 +850,110 @@ data:
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
# Calendar Events Widget (Családi only)
|
||||
- type: custom-api
|
||||
title: Family Calendar
|
||||
cache: 5m
|
||||
url: http://glance-helper.glance-system.svc.cluster.local:8000/calendar/events
|
||||
parameters:
|
||||
count: 10
|
||||
days: 14
|
||||
calendars: Családi
|
||||
template: |
|
||||
{{ $events := .JSON.Array "events" }}
|
||||
{{ $count := len $events }}
|
||||
{{ $showCount := 5 }}
|
||||
{{ $hasMore := gt $count $showCount }}
|
||||
|
||||
<style>
|
||||
.cal-widget { display: flex; flex-direction: column; gap: 6px; }
|
||||
.cal-meta { opacity: .65; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
|
||||
.cal-empty { opacity: 0.5; font-size: 13px; padding: 8px 0; }
|
||||
.cal-list { display: flex; flex-direction: column; gap: 4px; }
|
||||
.cal-item {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
background: rgba(255,255,255,0.04);
|
||||
align-items: start;
|
||||
}
|
||||
.cal-item:hover { background: rgba(255,255,255,0.08); }
|
||||
.cal-title {
|
||||
font-weight: 600;
|
||||
opacity: 0.95;
|
||||
font-size: 13px;
|
||||
line-height: 1.3;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.cal-time {
|
||||
font-size: 12px;
|
||||
opacity: 0.7;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.cal-date { font-weight: 600; }
|
||||
.cal-hour { opacity: 0.8; }
|
||||
.cal-allday {
|
||||
font-size: 10px;
|
||||
opacity: 0.6;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
/* Collapse/expand styling */
|
||||
.cal-hidden { display: none; }
|
||||
.cal-toggle {
|
||||
font-size: 12px;
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
padding: 6px;
|
||||
border-radius: 6px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.cal-toggle:hover { opacity: 0.9; background: rgba(255,255,255,0.05); }
|
||||
#cal-expand-fam:checked ~ .cal-list .cal-extra { display: grid; }
|
||||
#cal-expand-fam:checked ~ .cal-toggle-more { display: none; }
|
||||
#cal-expand-fam:not(:checked) ~ .cal-toggle-less { display: none; }
|
||||
</style>
|
||||
|
||||
<div class="cal-widget">
|
||||
{{ if lt $count 1 }}
|
||||
<div class="cal-empty">No events in near future</div>
|
||||
{{ else }}
|
||||
{{ if $hasMore }}<input type="checkbox" id="cal-expand-fam" style="display:none;">{{ end }}
|
||||
<div class="cal-list">
|
||||
{{ range $i, $e := $events }}
|
||||
{{ $isExtra := ge $i $showCount }}
|
||||
{{ $isAllDay := $e.Bool "is_all_day" }}
|
||||
{{ $title := $e.String "title" }}
|
||||
{{ $startDate := $e.String "start_date" }}
|
||||
{{ $startTime := $e.String "start_time" }}
|
||||
|
||||
<div class="cal-item{{ if $isExtra }} cal-extra cal-hidden{{ end }}">
|
||||
<div>
|
||||
<div class="cal-title">{{ $title }}</div>
|
||||
</div>
|
||||
<div class="cal-time">
|
||||
<div class="cal-date">{{ $startDate }}</div>
|
||||
{{ if $isAllDay }}
|
||||
<div class="cal-allday">Whole day</div>
|
||||
{{ else }}
|
||||
<div class="cal-hour">{{ $startTime }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if $hasMore }}
|
||||
<label class="cal-toggle cal-toggle-more" for="cal-expand-fam">Show more ({{ sub $count $showCount }} more) ▼</label>
|
||||
<label class="cal-toggle cal-toggle-less" for="cal-expand-fam">Show less ▲</label>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
- type: bookmarks
|
||||
title: Productivity Self-Hosted
|
||||
groups:
|
||||
|
||||
Reference in New Issue
Block a user