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

Social icons are reloading/flashing when navigating #55

Closed
jcdepth opened this issue Nov 15, 2018 · 4 comments
Closed

Social icons are reloading/flashing when navigating #55

jcdepth opened this issue Nov 15, 2018 · 4 comments

Comments

@jcdepth
Copy link

jcdepth commented Nov 15, 2018

Hi there, something that I've noticed is that when navigating between pages, the social icons seem to "flash", which suggests they may be reloading each time?

I've looked at your personal live site and this occurs there too, so it doesn't seem to be an issue specific to my environment/machine. Interestingly enough, the demo site doesn't experience this issue: https://themes.gohugo.io/theme/hyde-hyde/.

I've looked at some other themes/sites derived from the original hyde theme for Hugo, and they don't seem to have this issue:

This is by no means a critical issue, I was just wondering if there's a simple way to change this.

Thanks!

@htr3n
Copy link
Owner

htr3n commented Nov 15, 2018

@jcdepth The social icons are part of Font-Awesome. In my personal site, instead of directly loading FA's CSSs, I've used deferred FA JavaScript loading. That's the reason of the flashing/flickering of social icons.

The reason I chose deferred JS for FA was that, the social icons aren't the most important parts of the site or post, they can be loaded later, saving some loading time on the critical rendering path for other stuffs that the reader might want to see first ;)

@jcdepth
Copy link
Author

jcdepth commented Nov 16, 2018

Thanks for the reply! How would I tweak when Fontawesome is loading?

I'm guessing that because the demo site on gohugo.io doesn't load like this, it may be a setting in how Hugo is building the site?

@htr3n
Copy link
Owner

htr3n commented Nov 16, 2018

@jcdepth Sorry for the misleading info. During hyde-hyde development, I have switched back and forth between using Fontawesome CSSs or JavaScripts quite few times. The current version of hyde-hyde is using FA's JavaScripts in deferred loading styles.

https://github.com/htr3n/hyde-hyde/blob/master/layouts/partials/footer/font-awesome-js.html

That's the main cause of flashing/flickering as the social icons of FA will be loaded almost at the end of the page loading.

The demo site on https://themes.gohugo.io uses the same code base but, I guess, the flickering/flashing is quicker/shorter and perhaps unnoticeable (e.g. due to faster hosting or caching) compared to my Github site.

@htr3n
Copy link
Owner

htr3n commented Nov 23, 2018

@jcdepth As haven't heard from you since the last comment, I will close this issue for now. Please feel free to reopen it any time for following up.

@htr3n htr3n closed this as completed Nov 23, 2018
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

2 participants