@coderbyheart/react-weather-widget
v1.4.5
Published
React Weather Widget
Downloads
21
Readme
react-weather-widget
Unstyled weather widget build with React.
Usage
Add this widget to your site:
<div id="weather-widget" data-url="…" data-images="https://coderbyheart.github.io/react-weather-widget/icon/"></div>
<script type="text/javascript" defer src="https://coderbyheart.github.io/react-weather-widget/main.min.js"></script>
data-url
is the location of the weather JSON file, generated from a yr.no XML feed.
curl -s \
http://www.yr.no/sted/Norge/S%C3%B8r-Tr%C3%B8ndelag/Trondheim/Trondheim_sentrum/varsel.xml \
| ./node_modules/.bin/babel-node src/xml2json.js
Here is a live example: https://coderbyheart.github.io/react-weather-widget/
Acknowledgments
Icons are from @yr/weather-symbols.