mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-10-16 09:17:52 +00:00
[layout] update styles for weather and calendar (#3894)
This commit is contained in:
@@ -48,6 +48,7 @@ Thanks to: @dathbe.
|
|||||||
- [core] Update dependencies including electron to v38 as well as github actions (#3831, #3849, #3857, #3858, #3872, #3876, #3882, #3891)
|
- [core] Update dependencies including electron to v38 as well as github actions (#3831, #3849, #3857, #3858, #3872, #3876, #3882, #3891)
|
||||||
- [weather] Update feels_like temperature calculation formula (#3869)
|
- [weather] Update feels_like temperature calculation formula (#3869)
|
||||||
- [weather] Update null value handling for weather type (#3892)
|
- [weather] Update null value handling for weather type (#3892)
|
||||||
|
- [layout] Update styles for weather and calendar (#3894)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
@@ -331,7 +332,7 @@ For more info, please read the following post: [A New Chapter for MagicMirror: T
|
|||||||
- Update translations for estonian (#3371)
|
- Update translations for estonian (#3371)
|
||||||
- Update electron to v29 and update other dependencies
|
- Update electron to v29 and update other dependencies
|
||||||
- [calendar] fullDay events over several days now show the left days from the first day on and 'today' on the last day
|
- [calendar] fullDay events over several days now show the left days from the first day on and 'today' on the last day
|
||||||
- Update layout of current weather indoor values
|
- [weather] Update layout of current weather indoor values
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
@@ -779,7 +780,7 @@ Special thanks to the following contributors: @apiontek, @eouia, @jupadin, @khas
|
|||||||
- Actually test all js and css files when lint script is run.
|
- Actually test all js and css files when lint script is run.
|
||||||
- Updated jsdocs and print warnings during testing too.
|
- Updated jsdocs and print warnings during testing too.
|
||||||
- Updated weathergov provider to try fetching not just current, but also forecast, when API URLs available.
|
- Updated weathergov provider to try fetching not just current, but also forecast, when API URLs available.
|
||||||
- Refactored clock layout.
|
- [clock] Refactored clock layout.
|
||||||
- Refactored methods from weather-providers into weatherobject (isDaytime, updateSunTime).
|
- Refactored methods from weather-providers into weatherobject (isDaytime, updateSunTime).
|
||||||
- Use of `logger.js` in jest tests.
|
- Use of `logger.js` in jest tests.
|
||||||
- Run prettier over all relevant files.
|
- Run prettier over all relevant files.
|
||||||
|
12
css/main.css
12
css/main.css
@@ -252,3 +252,15 @@ sup {
|
|||||||
.region .container.hidden {
|
.region .container.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.region.left .flex {
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.region.center .flex {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.region.right .flex {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
@@ -2,23 +2,14 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding-left: 0;
|
gap: 5px;
|
||||||
padding-right: 10px;
|
|
||||||
font-size: var(--font-size-small);
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar .symbol span {
|
|
||||||
padding-top: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar .title {
|
.calendar .title {
|
||||||
padding-left: 0;
|
padding: 0 10px;
|
||||||
padding-right: 0;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar .time {
|
.calendar .time {
|
||||||
padding-left: 30px;
|
padding-left: 20px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
vertical-align: top;
|
|
||||||
}
|
}
|
||||||
|
@@ -168,8 +168,8 @@ Module.register("calendar", {
|
|||||||
|
|
||||||
this.selfUpdate();
|
this.selfUpdate();
|
||||||
},
|
},
|
||||||
notificationReceived (notification, payload, sender) {
|
|
||||||
|
|
||||||
|
notificationReceived (notification, payload, sender) {
|
||||||
if (notification === "FETCH_CALENDAR") {
|
if (notification === "FETCH_CALENDAR") {
|
||||||
if (this.hasCalendarURL(payload.url)) {
|
if (this.hasCalendarURL(payload.url)) {
|
||||||
this.sendSocketNotification(notification, { url: payload.url, id: this.identifier });
|
this.sendSocketNotification(notification, { url: payload.url, id: this.identifier });
|
||||||
@@ -217,7 +217,6 @@ Module.register("calendar", {
|
|||||||
|
|
||||||
// Override dom generator.
|
// Override dom generator.
|
||||||
getDom () {
|
getDom () {
|
||||||
const ONE_SECOND = 1000; // 1,000 milliseconds
|
|
||||||
const events = this.createEventList(true);
|
const events = this.createEventList(true);
|
||||||
const wrapper = document.createElement("table");
|
const wrapper = document.createElement("table");
|
||||||
wrapper.className = this.config.tableClass;
|
wrapper.className = this.config.tableClass;
|
||||||
@@ -308,15 +307,12 @@ Module.register("calendar", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const symbolClass = this.symbolClassForUrl(event.url);
|
const symbolClass = this.symbolClassForUrl(event.url);
|
||||||
symbolWrapper.className = `symbol align-right ${symbolClass}`;
|
symbolWrapper.className = `symbol ${symbolClass}`;
|
||||||
|
|
||||||
const symbols = this.symbolsForEvent(event);
|
const symbols = this.symbolsForEvent(event);
|
||||||
symbols.forEach((s, index) => {
|
symbols.forEach((s) => {
|
||||||
const symbol = document.createElement("span");
|
const symbol = document.createElement("span");
|
||||||
symbol.className = s;
|
symbol.className = s;
|
||||||
if (index > 0) {
|
|
||||||
symbol.style.paddingLeft = "5px";
|
|
||||||
}
|
|
||||||
symbolWrapper.appendChild(symbol);
|
symbolWrapper.appendChild(symbol);
|
||||||
});
|
});
|
||||||
eventWrapper.appendChild(symbolWrapper);
|
eventWrapper.appendChild(symbolWrapper);
|
||||||
@@ -601,7 +597,6 @@ Module.register("calendar", {
|
|||||||
*/
|
*/
|
||||||
createEventList (limitNumberOfEntries) {
|
createEventList (limitNumberOfEntries) {
|
||||||
let now = moment();
|
let now = moment();
|
||||||
let today = now.clone().startOf("day");
|
|
||||||
let future = now.clone().startOf("day").add(this.config.maximumNumberOfDays, "days");
|
let future = now.clone().startOf("day").add(this.config.maximumNumberOfDays, "days");
|
||||||
|
|
||||||
let events = [];
|
let events = [];
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="large type-temp">
|
<div class="flex large type-temp">
|
||||||
{% if config.showIndoorTemperature and indoor.temperature or config.showIndoorHumidity and indoor.humidity %}
|
{% if config.showIndoorTemperature and indoor.temperature or config.showIndoorHumidity and indoor.humidity %}
|
||||||
<span class="medium fas fa-home"></span>
|
<span class="medium fas fa-home"></span>
|
||||||
<span style="display: inline-block">
|
<span style="display: inline-block">
|
||||||
|
@@ -44,6 +44,6 @@
|
|||||||
|
|
||||||
.weather .type-temp {
|
.weather .type-temp {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: baseline;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user