Skip to content

Commit

Permalink
Merge pull request #275 from glanceapp/release/v0.6.3
Browse files Browse the repository at this point in the history
Release/v0.6.3
  • Loading branch information
svilenmarkov authored Dec 11, 2024
2 parents 448c795 + 01016e0 commit 24f93d8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 6 additions & 3 deletions internal/assets/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ kbd:active {
list-style: none;
position: relative;
display: flex;
z-index: 1;
}

.details[open] .summary {
Expand All @@ -535,6 +536,10 @@ kbd:active {
opacity: 1;
}

.details:not([open]) .list-with-transition {
display: none;
}

.summary::after {
content: "◀";
font-size: 1.2em;
Expand Down Expand Up @@ -707,6 +712,7 @@ details[open] .summary::after {
justify-content: space-between;
position: relative;
margin-bottom: 1.8rem;
z-index: 1;
}

.widget-error-header::before {
Expand Down Expand Up @@ -1095,7 +1101,6 @@ details[open] .summary::after {

.dns-stats-graph-gridlines-container {
position: absolute;
z-index: -1;
inset: 0;
}

Expand All @@ -1122,7 +1127,6 @@ details[open] .summary::after {
content: '';
position: absolute;
inset: 1px 0;
z-index: -1;
opacity: 0;
background: var(--color-text-base);
transition: opacity .2s;
Expand Down Expand Up @@ -1264,7 +1268,6 @@ details[open] .summary::after {
overflow: hidden;
mask-image: linear-gradient(0deg, transparent 40%, #000);
-webkit-mask-image: linear-gradient(0deg, transparent 40%, #000);
z-index: -1;
}

.weather-column-rain::before {
Expand Down
9 changes: 8 additions & 1 deletion internal/feed/openmeteo.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,19 @@ func FetchWeatherForPlace(place *PlaceJson, units string) (*Weather, error) {
minT := slices.Min(temperatures)
maxT := slices.Max(temperatures)

temperaturesRange := float64(maxT - minT)

for i := 0; i < 12; i++ {
bars = append(bars, weatherColumn{
Temperature: temperatures[i],
Scale: float64(temperatures[i]-minT) / float64(maxT-minT),
HasPrecipitation: precipitations[i],
})

if temperaturesRange > 0 {
bars[i].Scale = float64(temperatures[i]-minT) / temperaturesRange
} else {
bars[i].Scale = 1
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/widget/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func toSimpleIconIfPrefixed(icon string) (string, bool) {
}

icon = strings.TrimPrefix(icon, "si:")
icon = "https://cdnjs.cloudflare.com/ajax/libs/simple-icons/11.14.0/" + icon + ".svg"
icon = "https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/" + icon + ".svg"

return icon, true
}

0 comments on commit 24f93d8

Please sign in to comment.