Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mappings for yr.no #140

Closed
Grayda opened this issue Feb 10, 2016 · 10 comments
Closed

Mappings for yr.no #140

Grayda opened this issue Feb 10, 2016 · 10 comments

Comments

@Grayda
Copy link

Grayda commented Feb 10, 2016

Could we please get mappings in for yr.no's weather API? I'm happy to do it myself, I just need to sit down and work out how.

The API page for their weather codes (which can be used to display their icons) are located here: http://api.yr.no/weatherapi/weathericon/1.1/documentation

Thanks :)

@erikflowers
Copy link
Owner

I am not actively adding things to the project right now, but if you want to contribute it that is great. Please try and copy the other mappings I have and create them in Less so they can be part of the build.

@Grayda
Copy link
Author

Grayda commented Feb 10, 2016

Thanks Erik. I took a look last night and it seems straight forward. Just so I don't miss anything, I think I just need to:

  • Copy and modify an existing mapping in both the less and sass folders
  • Rename my mapping to something like wi-yrno.less / wi-yrno.scss
  • @import my mapping in the relevant weather-icons.less / weather-icons.scss file

And that's it? Nothing to minify or otherwise fiddle with?

@erikflowers
Copy link
Owner

Actually yeah. 

The sass and less then all need to be compiled down to their single source CSS. But as the project is not documented for anyone but me to do the final compile, if you do the less/sass then I can retrieve it and compile it down to the CSS and then update the repository. 

At some point, I need to take on a partner here (if anyone was even interested) or see if someone wants to be the new owner of Weather Icons. Or, figure out how to update it more than twice a year. 

On February 10, 2016 at 2:06:37 PM, David Gray ([email protected]) wrote:

Thanks Erik. I took a look last night and it seems straight forward. Just so I don't miss anything, I think I just need to:

Copy and modify an existing mapping in both the less and sass folders
Rename my mapping to something like wi-yrno.less / wi-yrno.scss
@import my mapping in the relevant weather-icons.less / weather-icons.scss file
And that's it? Nothing to minify or otherwise fiddle with?


Reply to this email directly or view it on GitHub.

@Grayda
Copy link
Author

Grayda commented Feb 11, 2016

Thanks Erik. I just made a PR with the yr.no mappings. I've tested it in my app and it works well, but because I don't have a Sass compiler handy (just LESS), I might leave the compilation up to you, if that's alright.

@erikflowers
Copy link
Owner

Thanks I will check it out. I use https://incident57.com/codekit/ for everything compilewise. 

On February 10, 2016 at 8:50:25 PM, David Gray ([email protected]) wrote:

Thanks Erik. I just made a PR with the yr.no mappings. I've tested it in my app and it works well, but because I don't have a Sass compiler handy (just LESS), I might leave the compilation up to you, if that's alright.


Reply to this email directly or view it on GitHub.

@dosjos
Copy link

dosjos commented Dec 2, 2016

Hi
I was on the verge of starting to make this mapping myself, but you have already done it.
I couldnt find it in the less folder, so I guess it isn't merget yet.
Is there a way I could get my hands on the mapping?

@Grayda
Copy link
Author

Grayda commented Dec 2, 2016

@dosjos You can get the mapping from here: https://github.com/Auroras-live/weather-icons/blob/master/less/mappings/wi-yrno.less. It needs to be compiled before use though, as I was leaving final compilation up to Erik

@dosjos
Copy link

dosjos commented Dec 2, 2016

Thanks, must have missed it when I looked.
@erikflowers could you do us the favour and compile it?

@Grayda
Copy link
Author

Grayda commented Dec 3, 2016

@dosjos If you want to compile it yourself, and you have access to node.js, you can do:

npm install -g lessc

And then you can compile it by going in to the less folder in the weather-icons folder and running

lessc weather-icons.less

And it should throw out a CSS file with the yr.no mappings included.

I've also compiled it and placed it here: https://gist.github.com/Grayda/4a58ad3f489acdf2e787e3fd71a2e4b8

But there's no minified version, as I'm using it in a mobile app and fiddling with minification wasn't worth the effort. Just download that file and place it in the weather-icons/css folder, overwriting the old one, then just use the icons as you normally would.

Oh, and if you're after a set of PHP "mappings", check out my other repo which acts as a really simple bridge between PHP and weather-icons' unicode points. Just thought I'd chuck that in there :)

@fox91
Copy link
Collaborator

fox91 commented Mar 2, 2023

I close this considering that it has been updated in #260.

@fox91 fox91 closed this as completed Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants