feat(wetter): Wetter auf dem Schreibtisch und in der Leiste
Zwei Schalter, unabhaengig voneinander: Schreibtisch, Leiste, beides oder keins. Die Stadt wird einmal gesucht und mit ihren Koordinaten gespeichert, sonst suchte jede Abfrage den Ort erneut. Geholt wird serverseitig und zehn Minuten zwischengespeichert. Der Grund ist nicht Sparsamkeit: Die Leiste steht auf jeder Seite jeder App, und fragte sie selbst an, ginge bei jedem Seitenaufruf eine Anfrage samt IP an einen Fremden — und die CSP jeder App muesste ihn erlauben. Kein Ort eingestellt oder Dienst nicht erreichbar: 204, und das Symbol bleibt weg. Eine Zahl von gestern waere schlechter als keine. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
52b11efe06
commit
4e38ccdec1
10 files changed
+823
-6
No files matched your search
@@ -885,3 +885,72 @@ body {
|
||||
color: var(--p-mid);
|
||||
}
|
||||
.saveline[data-kind="err"] { color: #ff7a5c; }
|
||||
|
||||
/* ── Wetter ────────────────────────────────────────────────────────────────
|
||||
Zweimal dasselbe Feld: als Fenster im Terminal-Modus, als kleines Schild
|
||||
oben rechts auf dem Schreibtisch. Ein Aufbau, zwei Rahmen. */
|
||||
.wx {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.wx-glyph {
|
||||
display: block;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
flex: 0 0 44px;
|
||||
color: var(--p);
|
||||
}
|
||||
.wx-glyph svg { width: 100%; height: 100%; display: block; }
|
||||
.wx-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
|
||||
.wx-temp { font-size: 22px; color: var(--p); }
|
||||
.wx-desc { color: var(--p-mid); }
|
||||
.wx-city {
|
||||
color: var(--p-dim);
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Terminal-Modus: ein Fenster wie die anderen, aber schmal. Über die volle
|
||||
Breite gezogen sähe eine Temperatur nach Bekanntmachung aus, nicht nach
|
||||
Widget. */
|
||||
.win-weather { max-width: 320px; align-self: start; }
|
||||
|
||||
/* Schreibtisch-Modus: schwebendes Schild, rechts unter der Menüleiste. Nicht
|
||||
verschiebbar wie ein Fenster — ein Widget, das man erst suchen muss, ist
|
||||
keins. */
|
||||
.deskwidget {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
right: 14px;
|
||||
z-index: 5;
|
||||
padding: 10px 14px;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--p-faint);
|
||||
box-shadow: 0 0 0 1px var(--bg), 4px 4px 0 rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
@media (max-width: 620px) {
|
||||
/* Am Handy stünde es über der Symbolspalte. */
|
||||
.deskwidget { position: static; margin: 10px; }
|
||||
}
|
||||
|
||||
/* Ortssuche in den Einstellungen */
|
||||
.wx-city-row { display: flex; gap: 6px; margin-top: 8px; }
|
||||
.wx-city-row input { flex: 1; min-width: 0; }
|
||||
.wx-results { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
|
||||
.wx-hit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
padding: 5px 8px;
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
color: var(--p-mid);
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.wx-hit span { color: var(--p-dim); font-size: 12px; }
|
||||
.wx-hit:hover { border-color: var(--p-faint); color: var(--p); }
|
||||
Reference in new issue
Block a user