From 6b0a5699988ecc9d97091e398f772355e2c00b2a Mon Sep 17 00:00:00 2001
From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com>
Date: Fri, 6 Sep 2024 21:45:03 +0100
Subject: [PATCH] Limit width of widgets
---
internal/assets/static/main.css | 1 -
internal/assets/templates/calendar.html | 42 +++++++++++++------------
internal/assets/templates/weather.html | 42 +++++++++++++------------
3 files changed, 44 insertions(+), 41 deletions(-)
diff --git a/internal/assets/static/main.css b/internal/assets/static/main.css
index 0fb6a93..3f3a79d 100644
--- a/internal/assets/static/main.css
+++ b/internal/assets/static/main.css
@@ -1206,7 +1206,6 @@ details[open] .summary::after {
flex-direction: column;
width: calc(100% / 12);
padding-top: 3px;
- max-width: 30px;
}
.weather-column-value, .weather-columns:hover .weather-column-value {
diff --git a/internal/assets/templates/calendar.html b/internal/assets/templates/calendar.html
index 68fda83..af15e5a 100644
--- a/internal/assets/templates/calendar.html
+++ b/internal/assets/templates/calendar.html
@@ -1,27 +1,29 @@
{{ template "widget-base.html" . }}
{{ define "widget-content" }}
-
-
{{ .Calendar.CurrentMonthName }}
-
- - Week {{ .Calendar.CurrentWeekNumber }}
- - {{ .Calendar.CurrentYear }}
-
-
+
+
+
{{ .Calendar.CurrentMonthName }}
+
+ - Week {{ .Calendar.CurrentWeekNumber }}
+ - {{ .Calendar.CurrentYear }}
+
+
-
-
Mo
-
Tu
-
We
-
Th
-
Fr
-
Sa
-
Su
-
+
+
Mo
+
Tu
+
We
+
Th
+
Fr
+
Sa
+
Su
+
-
- {{ range .Calendar.Days }}
-
{{ . }}
- {{ end }}
+
+ {{ range .Calendar.Days }}
+
{{ . }}
+ {{ end }}
+
{{ end }}
diff --git a/internal/assets/templates/weather.html b/internal/assets/templates/weather.html
index 40fdcb6..f271b74 100644
--- a/internal/assets/templates/weather.html
+++ b/internal/assets/templates/weather.html
@@ -1,29 +1,31 @@
{{ template "widget-base.html" . }}
{{ define "widget-content" }}
-
{{ .Weather.WeatherCodeAsString }}
-
Feels like {{ .Weather.ApparentTemperature }}°{{ if eq .Units "metric" }}C{{ else }}F{{ end }}
+
+
{{ .Weather.WeatherCodeAsString }}
+
Feels like {{ .Weather.ApparentTemperature }}°{{ if eq .Units "metric" }}C{{ else }}F{{ end }}
-
- {{ range $i, $column := .Weather.Columns }}
-
- {{ if $column.HasPrecipitation }}
-
+
+ {{ range $i, $column := .Weather.Columns }}
+
+ {{ if $column.HasPrecipitation }}
+
+ {{ end }}
+ {{ if and (ge $i $.Weather.SunriseColumn) (le $i $.Weather.SunsetColumn ) }}
+
+ {{ end }}
+
{{ $column.Temperature | absInt }}
+
+
{{ index $.TimeLabels $i }}
+
{{ end }}
- {{ if and (ge $i $.Weather.SunriseColumn) (le $i $.Weather.SunsetColumn ) }}
-
- {{ end }}
-
{{ $column.Temperature | absInt }}
-
-
{{ index $.TimeLabels $i }}
+
+
+ {{ if not .HideLocation }}
+
+
+
{{ .Place.Name }},{{ if .ShowAreaName }} {{ .Place.Area }},{{ end }} {{ .Place.Country }}
{{ end }}
-
-{{ if not .HideLocation }}
-
-
-
{{ .Place.Name }},{{ if .ShowAreaName }} {{ .Place.Area }},{{ end }} {{ .Place.Country }}
-
-{{ end }}
{{ end }}