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

Style: Website expansion icon displays incorrectly #133

Closed
RLittlesII opened this issue Aug 6, 2018 · 5 comments · Fixed by #148
Closed

Style: Website expansion icon displays incorrectly #133

RLittlesII opened this issue Aug 6, 2018 · 5 comments · Fixed by #148

Comments

@RLittlesII
Copy link
Member

I noticed that the expansion arrow that should be displayed on the website is appearing as a box. Perviously it was an arrow that would animate based on whether the navigation item was expanded or not.

image

@worldbeater
Copy link
Contributor

worldbeater commented Aug 7, 2018

Access to Font at 'https://d33wubrfki0l68.cloudfront.net/fonts/fontawesome-webfont.woff2?v=4.6.3' from origin 'https://reactiveui.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://reactiveui.net' is therefore not allowed access. The response had HTTP status code 404.

CDN object Not Found - Request ID: 55b2c826-dc46-48af-9b52-05bd8803a307-159127

It turns out FontAwesome was removed from CDN the website currently uses.
We can switch to this one: https://cdnjs.com/libraries/font-awesome
Or store the fonts locally. The question is how to do this.

@glennawatson
Copy link
Contributor

Looks like the entire purpose of cdnjs is for this type of purpose so lets go with them.

@RLittlesII
Copy link
Member Author

@worldbeater That is interesting (and I have confirmed that in the Chrome Developer Tools), good find. I have several other sites built with Wyam that use the theme that aren't experiencing this issue. So the question in my mind is, what makes us so special that we found the easter egg?

@worldbeater
Copy link
Contributor

worldbeater commented Aug 8, 2018

When I clone the repo and run the website on my local machine, the icons are back.

image

Probably there are some issues with deployment or host, I'm unable to fix that :(

@daveaglick
Copy link
Member

Looks like the entire purpose of cdnjs is for this type of purpose so lets go with them.

+1 for cdnjs

I have several other sites built with Wyam that use the theme that aren't experiencing this issue. So the question in my mind is, what makes us so special that we found the easter egg?

Wyam doesn't use a CDN in the default theme (that's intentional). All the assets (except for the Google Fonts) are distributed in the theme.

When I clone the repo and run the website on my local machine, the icons are back.

Digging deeper, it looks like the ReactiveUI theme still uses local FontAwesome assets:

_Master.cshtml:

<link href="@Context.GetLink("/assets/css/font-awesome.min.css")" rel="stylesheet" type="text/css">

And since there's no override for font-awesome.min.css, it's still coming locally from the default theme. That suggests Cloudflare is swapping out the local Font Awesome files for CDN-based ones during deployment (I don't know that much about how Cloudflare works). That would also explain why it still works locally - because there's not deployment to Cloudflare and thus the asset links remain local and aren't being replaced with CDN versions.

@lock lock bot added the outdated label Jun 25, 2019
@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants