Sha256: 4b767f8fd0698142c3541a3627d200282e44f7213eb81681c39f080713acd80d

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

document.addEventListener("DOMContentLoaded", function() {
  var scrollLock = false;

  let runOnScroll = function(evt) {
    if(!scrollLock) {
      scrollLock = true;
      let img = document.getElementById("headerImg");
      img.style.filter = "blur("+0.05*window.scrollY+"px)";
      let header = document.getElementById("header");
      header.style.backgroundColor = "rgba(04,09,17,"+0.003*window.scrollY+")";
      scrollLock = false;
    }
  }
  
  window.addEventListener("scroll",runOnScroll);
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rebuild-theme-0.2.0 assets/js/rebuild.js