Read the statement by Michael Teeuw here.
Changing icons of the modules Current Weather and Weather Forecast
-
@Manu85 they ALL must be straight up and down…
I was warning you that the copy you did originally had the wrong quote marks
they ALL MUST BE ONLY
"
-
@sdetweil like that ?
.currentweather .wi-night-clear { content: url("/css/icons/night.svg"); }
-
@Manu85 yes
-
@sdetweil excuse me, I’ll do it right away
-
@sdetweil by putting them straight up and down my weather has the original icons
-
@sdetweil sorry for my mistakes
-
Your precious help allowed me to succeed in having the icons on the mirror :-), I added a few lines in the custom to position each icon, for example:
.weather .wi-day-sunny {
content: url(“/css/icons/day.svg”);
padding-left: 60px;
padding-top: 7px;
height: 50px;
}
the last thing to do is how to manage the current day icon (position and size) because on the original file there was a part:.currentweather .weathericon { and another part:.weatherforecast .weathericon {
Following your help I named everything: .weather .weathericon { so that it works and I think that now it no longer makes a difference between current and forecast and I cannot manage the icon of the current day. Do you have any ideas on how to handle this?
Thank you for your valuable help -
@Manu85 yes the current/forecast are not unique modules now…but mm provides a way to differentiate between two of the same module
you can add arbitrary names that are used in the class of the module in the html tree, and then use that class in your custom.css
I wish I had thought of the sooner
in the config.js for one of the weather modules, showing forecast for instance, after the module name line add
module:"weather", classes:"forecast", ... ...
then in the custom.css, for the icons used in forecast change the primary selector
from.weather
to
.forecast
if I had thought of this first, we would have just added the two classes lines in config.js
one for currentweather and one for weatherforecast, each on the appropriate weather module instance
-
@sdetweil Ok, I will try, thanks for your help, you are the best:clapping_hands:
-
@sdetweil I tried but it doesn’t work, I don’t know if I did things wrong, in config.js I added the line < classes: “current”,’ > I changed forecast to current:
{ disabled: false, module: "weather", classes: "current", position: "top_right", header: "Meteo Ile d'Olonne", config: { weatherProvider: "openweathermap", type: "current", location: "Olonne-sur-Mer,France", locationID: "2989572", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }, { disabled: false, module: "weather", position: "top_right", header: "Meteo", config: { weatherProvider: "openweathermap", type: "forecast", location: "Olonne-sur-Mer,France", locationID: "2989572", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }
then I changed the first part of the lines in my custom ccs by adding current, I send you the first lines, but it doesn’t change anything, the icons are still identical:
/* Aenderungen Wetter Icon */ /* Aenderungen aktuelles Wetter */ .current .weathericon { position: absolute; z-index: 0; height: 200px; right: 180px; margin-top: -65px; } .current .wi-day-sunny { content: url("/css/icons/day.svg"); padding-left: 60px; padding-top: 7px; height: 100px; } .current .wi-day-cloudy { content: url("/css/icons/cloudy-day-1.svg"); padding-left: 60px; padding-top: 7px; height: 100px; }