react-component / menu

React Menu
https://menu.react-component.now.sh/
MIT License
681 stars 248 forks source link

Remove hardcoded fontawesome from CDN #134

Open kujenga opened 6 years ago

kujenga commented 6 years ago

This library uses a stylesheet that pulls in the font-awesome library from a CDN. Would it be possible to remove this or make it optional in some manner? For sites that have a more restrictive Content Security Policy, this external CDN causes errors in the JS console.

scragg0x commented 6 years ago

Not gonna happen. #100

To get around it, I copy/paste the CSS into my project and remove the font-face piece.

romanown commented 6 years ago

cdn.bootcss.com the site is periodically unavailable or very slow gives the font. need other links or how to make the font placed on my site?

romanown commented 6 years ago

I downloaded the font archive and unzipped it into the font directory. in the css file did so as @font-face { font-family: 'FontAwesome'; src: url('/fonts/fontawesome-webfont.eot?v=4.7.0'); src: url('/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } it is works