Source for serving and static templating/compiling of https://joshstock.in.
{#} | Time | Hash | Subject | Author | # | (+) | (-) | GPG? |
---|---|---|---|---|---|---|---|---|
212 | 14 Oct 2024 22:51 | 328427c | rc snow plow temp | Josh Stockin | 1 | 3 | 1 | G |
1 | let banner = document.getElementsByClassName("banner-image")[0]; |
2 | function scroll() { |
3 | banner.style["background-position"] = "50% " + (30 * (1 - document.body.scrollTop * document.body.clientWidth / document.body.clientHeight / document.body.clientHeight)).toString() + "%"; |
4 | }; |
5 | |
6 | scroll(); |
7 | document.addEventListener('DOMContentLoaded', scroll); |
8 |