weather-icons-lite

394 views
Skip to first unread message

Paul Reed

unread,
Nov 27, 2017, 3:49:58 PM11/27/17
to Node-RED
After a short discussion with Dave CJ a few days ago, I've created a new repo - https://github.com/Paul-Reed/weather-icons-lite which provides 57 weather icons and full CSS support for node-red's Wunderground, Darksky & OpenWeatherMap nodes.

The new 'essential files' are significantly smaller than 'weather-icons', for the following reasons;
  • The icon files have been optimized and edited to restrict the glyphs to Wunderground, Darksky & OpenWeatherMap.
  • SVG icon files have now been removed as they have been retired from modern browsers.
  • The CSS has been updated to reflect the above.
The resulting changes slim the loading as follows;

original weather-icons
Font files  474kb
CSS         149kb
TOTAL      523kb

weather-icons-lite
Font files  84kb
CSS         10kb
TOTAL      94kb

The repo can be simply cloned directly into the node-red shared folder (details in readme), but all that is really needed is the single CSS file & 4 corresponding font files.

These changes have significantly reduced the initial browser loading time, and time populating the app.cache, and hopefully may tempt Dave CJ to integrate them into node-red in the same way as Font Awsome has been added. 

I would appreciate feedback, improvements & comments.


Paul Reed

unread,
Nov 29, 2017, 3:37:58 PM11/29/17
to Node-RED
As from v2.6.3-beta, weather-icons-lite has been integrated into NR dashboard and can now be used in the same way as Font Awsome.
Adding <i class="wi wi-forecast-io-rain"> to a dashboard template node displays the icon, but CSS mappings have also been integrated which map the icons to the respective api code from Wunderground, Darksky & OpenWeatherMap.


Many thanks to Dave CJ
Reply all
Reply to author
Forward
0 new messages