diff options
author | thinkpadmaster <a.scerba02@gmail.com> | 2023-07-13 23:35:05 -0500 |
---|---|---|
committer | thinkpadmaster <a.scerba02@gmail.com> | 2023-07-13 23:35:05 -0500 |
commit | fca693f8cf2eeeae92939488b63127a90030c8fb (patch) | |
tree | bfe7d75448b9d2714f024e7d783d3e901facfbab /data/static/script.js | |
parent | e864807341990f5c72e198d96740983bf7671584 (diff) |
Extreme structure changes and file renames. Move to new template format.
Diffstat (limited to 'data/static/script.js')
-rw-r--r-- | data/static/script.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/data/static/script.js b/data/static/script.js deleted file mode 100644 index a7323f3..0000000 --- a/data/static/script.js +++ /dev/null @@ -1,49 +0,0 @@ -function stickyTopNav() { - var nav = document.querySelector('.nav'); - var header = document.querySelector('.header'); - if (document.body.scrollTop > 194 || document.documentElement.scrollTop > 194) { - if (document.querySelector('.sticky') == null) { - nav.classList.toggle('sticky'); - header.classList.toggle('sticky'); - } - } else { - if (document.querySelector('.sticky') != null) { - nav.classList.toggle('sticky'); - header.classList.toggle('sticky'); - } - } -}; - -window.onscroll = function() { - stickyTopNav(); -}; - -window.onload = function() { - stickyTopNav(); -}; - -function actionToggle() { - var action = document.querySelector('.action'); - action.classList.toggle('active') -} - -/*// https://stackoverflow.com/questions/17534661/make-anchor-link-go-some-pixels-above-where-its-linked-to - -// The function actually applying the offset -function offsetAnchor() { - if (location.hash.length !== 0) { - window.scrollTo(window.scrollX, window.scrollY - 69); - } -} - -// Captures click events of all <a> elements with href starting with # -document.addEventListener('click', 'a[href^="#"]', function(event) { - // Click events are captured before hashchanges. Timeout - // causes offsetAnchor to be called after the page jump. - window.setTimeout(function() { - offsetAnchor(); - }, 0); -}); - -// Set the offset when entering page with hash present in the url -window.setTimeout(offsetAnchor, 0);*/
\ No newline at end of file |