This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://codesandbox.io/s/71z47kpl90 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .box__container:after{ | |
| content: ""; | |
| flex: auto; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <span className="ml-2">© {new Date().getYear() + 1900}.</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Remove Polyfill | |
| // Create Element.remove() function if not exist | |
| if (!('remove' in Element.prototype)) { | |
| Element.prototype.remove = function () { | |
| if (this.parentNode) { | |
| this.parentNode.removeChild(this); | |
| } | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resizeBtns() { | |
| const bodyWidth = document.body.clientWidth; | |
| const img = this.element.querySelector(`.${this.settings.imgClassname}`); | |
| const imgCR = img.getBoundingClientRect(); | |
| const imgRatio = imgCR.height / imgCR.width; | |
| var sheet = document.createElement('style') | |
| sheet.innerHTML = `${this.settings.prevButtonSelector}, ${this.settings.nextButtonSelector} { | |
| height: calc(${100 * imgRatio}vw - ${(bodyWidth - imgCR.width + this.getScrollbarWidth()) * imgRatio}px); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class RMIPopup{ | |
| constructor(element){ | |
| this.element = element; | |
| this.close = '.updated-rmi__form-close'; | |
| this.init(); | |
| } | |
| init(){ | |
| let clickAnchor = this.element.querySelector('a'); | |
| this.attachListener(clickAnchor); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // place the above breakpoints into a list in order to build scalable font sizes | |
| $breakpoints: ( | |
| xs: ( | |
| min: null, | |
| max: 479px | |
| ), | |
| sm: ( | |
| min: 480px, | |
| max: 767px | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gulp.task('dui', () =>{ | |
| return glob("deployment/public/services/print-at-your-service.html", function(er, files) { | |
| let totalFiles = []; | |
| let imageCount = 0; | |
| let currentWorkingDirectory = process.env.PWD + '/'; | |
| if(er){ | |
| throw(er); | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function scrollIt(destination, duration = 200, easing = 'linear', offsetAdjustment, callback) { | |
| const easings = { | |
| easeOutQuad(t) { | |
| return t * (2 - t); | |
| } | |
| }; | |
| const start = window.pageYOffset; | |
| const startTime = 'now' in window.performance ? performance.now() : new Date().getTime(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isAnyPartOfElementInViewport(el) { | |
| const rect = el.getBoundingClientRect(); | |
| // DOMRect { x: 8, y: 8, width: 100, height: 100, top: 8, right: 108, bottom: 108, left: 8 } | |
| const windowHeight = (window.innerHeight || document.documentElement.clientHeight); | |
| const windowWidth = (window.innerWidth || document.documentElement.clientWidth); | |
| // http://stackoverflow.com/questions/325933/determine-whether-two-date-ranges-overlap | |
| const vertInView = (rect.top <= windowHeight) && ((rect.top + rect.height) >= 0); | |
| const horInView = (rect.left <= windowWidth) && ((rect.left + rect.width) >= 0); |