<div class="progress-bar"></div>
<div class="progress-bar"></div>
/* No context defined for this component. */
'use strict';
/**
* @name Novicell Scroll progress bar
* @author Emil Ankersen (EAN)
* @requires https://github.com/jeremenichelli/scrollProgress
*/
var novicell = novicell || {};
novicell.scrollProgressBar =
novicell.scrollProgressBar ||
new function() {
this.init = function() {
const progressElement = document.querySelector('.progress-bar');
if (progressElement) {
const progressObserver = new ScrollProgress((x, y) => {
progressElement.style.width = `${y * 100}%`;
});
}
};
}();
:root {
--progress-bar-bg: var(--color-primary, blue);
--progress-bar-height: 5px;
}
.progress-bar {
background-color: var(--progress-bar-bg);
height: var(--progress-bar-height);
position: fixed;
bottom: 0;
}
There are no notes for this item.