Spaces:
Runtime error
Runtime error
Download static/js/scripts.js from RasoulSahibzadah/Machine-Learning-MLflow: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/RasoulSahibzadah/Machine-Learning-MLflow/resolve/main/static/js/scripts.js
- Command line
-
hf download hf://spaces/RasoulSahibzadah/Machine-Learning-MLflow/static/js/scripts.js
-
curl -L -o scripts.js https://huggingface.co/spaces/RasoulSahibzadah/Machine-Learning-MLflow/resolve/main/static/js/scripts.js
1.18 kB
| /*! | |
| * Start Bootstrap - Clean Blog v6.0.5 (https://startbootstrap.com/theme/clean-blog) | |
| * Copyright 2013-2021 Start Bootstrap | |
| * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-clean-blog/blob/master/LICENSE) | |
| */ | |
| window.addEventListener('DOMContentLoaded', () => { | |
| let scrollPos = 0; | |
| const mainNav = document.getElementById('mainNav'); | |
| const headerHeight = mainNav.clientHeight; | |
| window.addEventListener('scroll', function() { | |
| const currentTop = document.body.getBoundingClientRect().top * -1; | |
| if ( currentTop < scrollPos) { | |
| // Scrolling Up | |
| if (currentTop > 0 && mainNav.classList.contains('is-fixed')) { | |
| mainNav.classList.add('is-visible'); | |
| } else { | |
| console.log(123); | |
| mainNav.classList.remove('is-visible', 'is-fixed'); | |
| } | |
| } else { | |
| // Scrolling Down | |
| mainNav.classList.remove(['is-visible']); | |
| if (currentTop > headerHeight && !mainNav.classList.contains('is-fixed')) { | |
| mainNav.classList.add('is-fixed'); | |
| } | |
| } | |
| scrollPos = currentTop; | |
| }); | |
| }) | |