Posts with the tag JavaScript

Create a header that appears and disappears by scrolling

Headers can be animated easily by CSS and a few JavaScript, but the speed will be constant. I hate that, so I’ll create a header that works naturally like this. Sample code & Demo See the Pen Awesome header by Akimo (@akimon658) on CodePen. This script changes the value of top by scrolling....

Use Disqus on multilingual Hugo site

The answer window.disqus_config = function() { this.language = '{{ .Lang }}'; } Why use window.disqus_config? According to the Disqus’ help page, we can override the language by adding this. var disqus_config = function () { this.language = "ja"; }; So basically the following JavaScript works. var disqus_config = function () { this....
menu
keyboard_arrow_up