nationalparkservice / bootstrap

A version of Twitter Bootstrap customized to fit into the graphic identify of the National Park Service.
https://www.nps.gov/npmap/tools/bootstrap/
MIT License
10 stars 6 forks source link

Glyphicons don't work with NPS bootstrap #9

Open johnpauls opened 9 years ago

johnpauls commented 9 years ago

Hello, I am working on a bootstrap web page for NPS , and I can't seem to use the glyphicons. I get this error in my console:

Font from origin 'http://www.nps.gov' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:7859' is therefore not allowed access

Any idea on what this is. When I don't use the NPS theme I have no problems

nateirwin commented 9 years ago

Hi, John Paul.

We actually use Font Awesome (http://fortawesome.github.io/Font-Awesome/icons/) in our projects - over Glyphicons. So you may want to take a look at that.

As for getting Glyphicons working, what do you mean when you say: "When I don't use the NPS theme I have no problems"?

johnpauls commented 9 years ago

Sorry for the confusing message. So, I am building a website using RStudio's shiny package which lets me build interactive websites in R - basically in translates R into a javascript user interface. So, by default it uses bootstrap for the UI styling, and you can optionally designate a bootstrap theme - so I chose this one. It works great and make site look much more NPS - like.

However, there is a slider widget I use, that optionally has an animation feature - I can use it to let a user pick one year's worth of data to look at, or animate and have the site display one year after another. The slide is the Ion.RangeSlider if that matter. The slider animation, in turn, has icons for paly and pause, and these icons are Glyphicons.

If I use regular bootstrap (don't specify NPS bootstrap) all of this works fine. However if i use the NPS bootstrap I get that error. Not sure what the issue is.

Thanks for any insight.