diff options
author | Przemysław Kołodziejczyk <eshlox@vertolabs.com> | 2018-11-09 21:03:05 +0300 |
---|---|---|
committer | Przemysław Kołodziejczyk <eshlox@vertolabs.com> | 2018-11-09 21:03:05 +0300 |
commit | 026c2295b737f323ee18caee22cf4219bbdbc2dd (patch) | |
tree | 461a797da7d891dce11b8cbe89dd03639def6f74 | |
parent | 008a18c257481f4997e7c7d8a8a5bcd0e73cdcdb (diff) |
Remove packages.json
-rw-r--r-- | assets/package.json | 18 | ||||
-rw-r--r-- | assets/src/scripts/_external/baguetteBox.js | 789 | ||||
-rw-r--r-- | assets/src/scripts/_external/headroom.js | 467 | ||||
-rw-r--r-- | assets/src/scripts/_external/lazyload.js | 422 | ||||
-rw-r--r-- | assets/src/styles/_external/baguetteBox.css | 198 | ||||
-rw-r--r-- | assets/src/styles/_external/milligram.css | 602 | ||||
-rw-r--r-- | assets/src/styles/_external/normalize.css | 341 | ||||
-rw-r--r-- | assets/src/styles/styles.scss | 1 | ||||
-rw-r--r-- | assets/yarn.lock | 35 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 6 | ||||
-rw-r--r-- | layouts/partials/head.html | 13 | ||||
-rw-r--r-- | resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.content | 8 | ||||
-rw-r--r-- | resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.json | 1 | ||||
-rw-r--r-- | resources/_gen/assets/js/assets/js/scripts.js_d3f53f09220d597dac26fe7840c31fc9.content | 2 | ||||
-rw-r--r-- | resources/_gen/assets/scss/src/styles/styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.content | 7 |
15 files changed, 2841 insertions, 69 deletions
diff --git a/assets/package.json b/assets/package.json deleted file mode 100644 index 457cbb3..0000000 --- a/assets/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "simplicity", - "description": "Minimalist theme for Hugo", - "version": "2.0.2", - "author": { - "name": "Przemysław Kołodziejczyk", - "url": "https://eshlox.net" - }, - "repository": "eshlox/simplicity", - "license": "MIT", - "dependencies": { - "baguettebox.js": "^1.11.0", - "headroom.js": "^0.9.4", - "milligram": "^1.3.0", - "normalize.css": "^8.0.0", - "vanilla-lazyload": "^10.18.0" - } -} diff --git a/assets/src/scripts/_external/baguetteBox.js b/assets/src/scripts/_external/baguetteBox.js new file mode 100644 index 0000000..d7ab19b --- /dev/null +++ b/assets/src/scripts/_external/baguetteBox.js @@ -0,0 +1,789 @@ +/*! + * baguetteBox.js + * @author feimosi + * @version 1.11.0 + * @url https://github.com/feimosi/baguetteBox.js + */ + +/* global define, module */ + +(function (root, factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + define(factory); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.baguetteBox = factory(); + } +}(this, function () { + 'use strict'; + + // SVG shapes used on the buttons + var leftArrow = '<svg width="44" height="60">' + + '<polyline points="30 10 10 30 30 50" stroke="rgba(255,255,255,0.5)" stroke-width="4"' + + 'stroke-linecap="butt" fill="none" stroke-linejoin="round"/>' + + '</svg>', + rightArrow = '<svg width="44" height="60">' + + '<polyline points="14 10 34 30 14 50" stroke="rgba(255,255,255,0.5)" stroke-width="4"' + + 'stroke-linecap="butt" fill="none" stroke-linejoin="round"/>' + + '</svg>', + closeX = '<svg width="30" height="30">' + + '<g stroke="rgb(160,160,160)" stroke-width="4">' + + '<line x1="5" y1="5" x2="25" y2="25"/>' + + '<line x1="5" y1="25" x2="25" y2="5"/>' + + '</g></svg>'; + // Global options and their defaults + var options = {}, + defaults = { + captions: true, + buttons: 'auto', + fullScreen: false, + noScrollbars: false, + bodyClass: 'baguetteBox-open', + titleTag: false, + async: false, + preload: 2, + animation: 'slideIn', + afterShow: null, + afterHide: null, + onChange: null, + overlayBackgroundColor: 'rgba(0,0,0,.8)' + }; + // Object containing information about features compatibility + var supports = {}; + // DOM Elements references + var overlay, slider, previousButton, nextButton, closeButton; + // An array with all images in the current gallery + var currentGallery = []; + // Current image index inside the slider + var currentIndex = 0; + // Visibility of the overlay + var isOverlayVisible = false; + // Touch event start position (for slide gesture) + var touch = {}; + // If set to true ignore touch events because animation was already fired + var touchFlag = false; + // Regex pattern to match image files + var regex = /.+\.(gif|jpe?g|png|webp)/i; + // Object of all used galleries + var data = {}; + // Array containing temporary images DOM elements + var imagesElements = []; + // The last focused element before opening the overlay + var documentLastFocus = null; + var overlayClickHandler = function(event) { + // Close the overlay when user clicks directly on the background + if (event.target.id.indexOf('baguette-img') !== -1) { + hideOverlay(); + } + }; + var previousButtonClickHandler = function(event) { + event.stopPropagation ? event.stopPropagation() : event.cancelBubble = true; // eslint-disable-line no-unused-expressions + showPreviousImage(); + }; + var nextButtonClickHandler = function(event) { + event.stopPropagation ? event.stopPropagation() : event.cancelBubble = true; // eslint-disable-line no-unused-expressions + showNextImage(); + }; + var closeButtonClickHandler = function(event) { + event.stopPropagation ? event.stopPropagation() : event.cancelBubble = true; // eslint-disable-line no-unused-expressions + hideOverlay(); + }; + var touchstartHandler = function(event) { + touch.count++; + if (touch.count > 1) { + touch.multitouch = true; + } + // Save x and y axis position + touch.startX = event.changedTouches[0].pageX; + touch.startY = event.changedTouches[0].pageY; + }; + var touchmoveHandler = function(event) { + // If action was already triggered or multitouch return + if (touchFlag || touch.multitouch) { + return; + } + event.preventDefault ? event.preventDefault() : event.returnValue = false; // eslint-disable-line no-unused-expressions + var touchEvent = event.touches[0] || event.changedTouches[0]; + // Move at least 40 pixels to trigger the action + if (touchEvent.pageX - touch.startX > 40) { + touchFlag = true; + showPreviousImage(); + } else if (touchEvent.pageX - touch.startX < -40) { + touchFlag = true; + showNextImage(); + // Move 100 pixels up to close the overlay + } else if (touch.startY - touchEvent.pageY > 100) { + hideOverlay(); + } + }; + var touchendHandler = function() { + touch.count--; + if (touch.count <= 0) { + touch.multitouch = false; + } + touchFlag = false; + }; + var contextmenuHandler = function() { + touchendHandler(); + }; + + var trapFocusInsideOverlay = function(event) { + if (overlay.style.display === 'block' && (overlay.contains && !overlay.contains(event.target))) { + event.stopPropagation(); + initFocus(); + } + }; + + // forEach polyfill for IE8 + // http://stackoverflow.com/a/14827443/1077846 + /* eslint-disable */ + if (![].forEach) { + Array.prototype.forEach = function(callback, thisArg) { + for (var i = 0; i < this.length; i++) { + callback.call(thisArg, this[i], i, this); + } + }; + } + + // filter polyfill for IE8 + // https://gist.github.com/eliperelman/1031656 + if (![].filter) { + Array.prototype.filter = function(a, b, c, d, e) { + c = this; + d = []; + for (e = 0; e < c.length; e++) + a.call(b, c[e], e, c) && d.push(c[e]); + return d; + }; + } + /* eslint-enable */ + + // Script entry point + function run(selector, userOptions) { + // Fill supports object + supports.transforms = testTransformsSupport(); + supports.svg = testSvgSupport(); + supports.passiveEvents = testPassiveEventsSupport(); + + buildOverlay(); + removeFromCache(selector); + return bindImageClickListeners(selector, userOptions); + } + + function bindImageClickListeners(selector, userOptions) { + // For each gallery bind a click event to every image inside it + var galleryNodeList = document.querySelectorAll(selector); + var selectorData = { + galleries: [], + nodeList: galleryNodeList + }; + data[selector] = selectorData; + + [].forEach.call(galleryNodeList, function(galleryElement) { + if (userOptions && userOptions.filter) { + regex = userOptions.filter; + } + + // Get nodes from gallery elements or single-element galleries + var tagsNodeList = []; + if (galleryElement.tagName === 'A') { + tagsNodeList = [galleryElement]; + } else { + tagsNodeList = galleryElement.getElementsByTagName('a'); + } + + // Filter 'a' elements from those not linking to images + tagsNodeList = [].filter.call(tagsNodeList, function(element) { + if (element.className.indexOf(userOptions && userOptions.ignoreClass) === -1) { + return regex.test(element.href); + } + }); + if (tagsNodeList.length === 0) { + return; + } + + var gallery = []; + [].forEach.call(tagsNodeList, function(imageElement, imageIndex) { + var imageElementClickHandler = function(event) { + event.preventDefault ? event.preventDefault() : event.returnValue = false; // eslint-disable-line no-unused-expressions + prepareOverlay(gallery, userOptions); + showOverlay(imageIndex); + }; + var imageItem = { + eventHandler: imageElementClickHandler, + imageElement: imageElement + }; + bind(imageElement, 'click', imageElementClickHandler); + gallery.push(imageItem); + }); + selectorData.galleries.push(gallery); + }); + + return selectorData.galleries; + } + + function clearCachedData() { + for (var selector in data) { + if (data.hasOwnProperty(selector)) { + removeFromCache(selector); + } + } + } + + function removeFromCache(selector) { + if (!data.hasOwnProperty(selector)) { + return; + } + var galleries = data[selector].galleries; + [].forEach.call(galleries, function(gallery) { + [].forEach.call(gallery, function(imageItem) { + unbind(imageItem.imageElement, 'click', imageItem.eventHandler); + }); + + if (currentGallery === gallery) { + currentGallery = []; + } + }); + + delete data[selector]; + } + + function buildOverlay() { + overlay = getByID('baguetteBox-overlay'); + // Check if the overlay already exists + if (overlay) { + slider = getByID('baguetteBox-slider'); + previousButton = getByID('previous-button'); + nextButton = getByID('next-button'); + closeButton = getByID('close-button'); + return; + } + // Create overlay element + overlay = create('div'); + overlay.setAttribute('role', 'dialog'); + overlay.id = 'baguetteBox-overlay'; + document.getElementsByTagName('body')[0].appendChild(overlay); + // Create gallery slider element + slider = create('div'); + slider.id = 'baguetteBox-slider'; + overlay.appendChild(slider); + // Create all necessary buttons + previousButton = create('button'); + previousButton.setAttribute('type', 'button'); + previousButton.id = 'previous-button'; + previousButton.setAttribute('aria-label', 'Previous'); + previousButton.innerHTML = supports.svg ? leftArrow : '<'; + overlay.appendChild(previousButton); + + nextButton = create('button'); + nextButton.setAttribute('type', 'button'); + nextButton.id = 'next-button'; + nextButton.setAttribute('aria-label', 'Next'); + nextButton.innerHTML = supports.svg ? rightArrow : '>'; + overlay.appendChild(nextButton); + + closeButton = create('button'); + closeButton.setAttribute('type', 'button'); + closeButton.id = 'close-button'; + closeButton.setAttribute('aria-label', 'Close'); + closeButton.innerHTML = supports.svg ? closeX : '×'; + overlay.appendChild(closeButton); + + previousButton.className = nextButton.className = closeButton.className = 'baguetteBox-button'; + + bindEvents(); + } + + function keyDownHandler(event) { + switch (event.keyCode) { + case 37: // Left arrow + showPreviousImage(); + break; + case 39: // Right arrow + showNextImage(); + break; + case 27: // Esc + hideOverlay(); + break; + case 36: // Home + showFirstImage(event); + break; + case 35: // End + showLastImage(event); + break; + } + } + + function bindEvents() { + var options = supports.passiveEvents ? { passive: true } : null; + bind(overlay, 'click', overlayClickHandler); + bind(previousButton, 'click', previousButtonClickHandler); + bind(nextButton, 'click', nextButtonClickHandler); + bind(closeButton, 'click', closeButtonClickHandler); + bind(slider, 'contextmenu', contextmenuHandler); + bind(overlay, 'touchstart', touchstartHandler, options); + bind(overlay, 'touchmove', touchmoveHandler, options); + bind(overlay, 'touchend', touchendHandler); + bind(document, 'focus', trapFocusInsideOverlay, true); + } + + function unbindEvents() { + var options = supports.passiveEvents ? { passive: true } : null; + unbind(overlay, 'click', overlayClickHandler); + unbind(previousButton, 'click', previousButtonClickHandler); + unbind(nextButton, 'click', nextButtonClickHandler); + unbind(closeButton, 'click', closeButtonClickHandler); + unbind(slider, 'contextmenu', contextmenuHandler); + unbind(overlay, 'touchstart', touchstartHandler, options); + unbind(overlay, 'touchmove', touchmoveHandler, options); + unbind(overlay, 'touchend', touchendHandler); + unbind(document, 'focus', trapFocusInsideOverlay, true); + } + + function prepareOverlay(gallery, userOptions) { + // If the same gallery is being opened prevent from loading it once again + if (currentGallery === gallery) { + return; + } + currentGallery = gallery; + // Update gallery specific options + setOptions(userOptions); + // Empty slider of previous contents (more effective than .innerHTML = "") + while (slider.firstChild) { + slider.removeChild(slider.firstChild); + } + imagesElements.length = 0; + + var imagesFiguresIds = []; + var imagesCaptionsIds = []; + // Prepare and append images containers and populate figure and captions IDs arrays + for (var i = 0, fullImage; i < gallery.length; i++) { + fullImage = create('div'); + fullImage.className = 'full-image'; + fullImage.id = 'baguette-img-' + i; + imagesElements.push(fullImage); + + imagesFiguresIds.push('baguetteBox-figure-' + i); + imagesCaptionsIds.push('baguetteBox-figcaption-' + i); + slider.appendChild(imagesElements[i]); + } + overlay.setAttribute('aria-labelledby', imagesFiguresIds.join(' ')); + overlay.setAttribute('aria-describedby', imagesCaptionsIds.join(' ')); + } + + function setOptions(newOptions) { + if (!newOptions) { + newOptions = {}; + } + // Fill options object + for (var item in defaults) { + options[item] = defaults[item]; + if (typeof newOptions[item] !== 'undefined') { + options[item] = newOptions[item]; + } + } + /* Apply new options */ + // Change transition for proper animation + slider.style.transition = slider.style.webkitTransition = (options.animation === 'fadeIn' ? 'opacity .4s ease' : + options.animation === 'slideIn' ? '' : 'none'); + // Hide buttons if necessary + if (options.buttons === 'auto' && ('ontouchstart' in window || currentGallery.length === 1)) { + options.buttons = false; + } + // Set buttons style to hide or display them + previousButton.style.display = nextButton.style.display = (options.buttons ? '' : 'none'); + // Set overlay color + try { + overlay.style.backgroundColor = options.overlayBackgroundColor; + } catch (e) { + // Silence the error and continue + } + } + + function showOverlay(chosenImageIndex) { + if (options.noScrollbars) { + document.documentElement.style.overflowY = 'hidden'; + document.body.style.overflowY = 'scroll'; + } + if (overlay.style.display === 'block') { + return; + } + + bind(document, 'keydown', keyDownHandler); + currentIndex = chosenImageIndex; + touch = { + count: 0, + startX: null, + startY: null + }; + loadImage(currentIndex, function() { + preloadNext(currentIndex); + preloadPrev(currentIndex); + }); + + updateOffset(); + overlay.style.display = 'block'; + if (options.fullScreen) { + enterFullScreen(); + } + // Fade in overlay + setTimeout(function() { + overlay.className = 'visible'; + if (options.bodyClass && document.body.classList) { + document.body.classList.add(options.bodyClass); + } + if (options.afterShow) { + options.afterShow(); + } + }, 50); + if (options.onChange) { + options.onChange(currentIndex, imagesElements.length); + } + documentLastFocus = document.activeElement; + initFocus(); + isOverlayVisible = true; + } + + function initFocus() { + if (options.buttons) { + previousButton.focus(); + } else { + closeButton.focus(); + } + } + + function enterFullScreen() { + if (overlay.requestFullscreen) { + overlay.requestFullscreen(); + } else if (overlay.webkitRequestFullscreen) { + overlay.webkitRequestFullscreen(); + } else if (overlay.mozRequestFullScreen) { + overlay.mozRequestFullScreen(); + } + } + + function exitFullscreen() { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } + } + + function hideOverlay() { + if (options.noScrollbars) { + document.documentElement.style.overflowY = 'auto'; + document.body.style.overflowY = 'auto'; + } + if (overlay.style.display === 'none') { + return; + } + + unbind(document, 'keydown', keyDownHandler); + // Fade out and hide the overlay + overlay.className = ''; + setTimeout(function() { + overlay.style.display = 'none'; + if (document.fullscreen) { + exitFullscreen(); + } + if (options.bodyClass && document.body.classList) { + document.body.classList.remove(options.bodyClass); + } + if (options.afterHide) { + options.afterHide(); + } + documentLastFocus && documentLastFocus.focus(); + isOverlayVisible = false; + }, 500); + } + + function loadImage(index, callback) { + var imageContainer = imagesElements[index]; + var galleryItem = currentGallery[index]; + + // Return if the index exceeds prepared images in the overlay + // or if the current gallery has been changed / closed + if (typeof imageContainer === 'undefined' || typeof galleryItem === 'undefined') { + return; + } + + // If image is already loaded run callback and return + if (imageContainer.getElementsByTagName('img')[0]) { + if (callback) { + callback(); + } + return; + } + + // Get element reference, optional caption and source path + var imageElement = galleryItem.imageElement; + var thumbnailElement = imageElement.getElementsByTagName('img')[0]; + var imageCaption = typeof options.captions === 'function' ? + options.captions.call(currentGallery, imageElement) : + imageElement.getAttribute('data-caption') || imageElement.title; + var imageSrc = getImageSrc(imageElement); + + // Prepare figure element + var figure = create('figure'); + figure.id = 'baguetteBox-figure-' + index; + figure.innerHTML = '<div class="baguetteBox-spinner">' + + '<div class="baguetteBox-double-bounce1"></div>' + + '<div class="baguetteBox-double-bounce2"></div>' + + '</div>'; + // Insert caption if available + if (options.captions && imageCaption) { + var figcaption = create('figcaption'); + figcaption.id = 'baguetteBox-figcaption-' + index; + figcaption.innerHTML = imageCaption; + figure.appendChild(figcaption); + } + imageContainer.appendChild(figure); + + // Prepare gallery img element + var image = create('img'); + image.onload = function() { + // Remove loader element + var spinner = document.querySelector('#baguette-img-' + index + ' .baguetteBox-spinner'); + figure.removeChild(spinner); + if (!options.async && callback) { + callback(); + } + }; + image.setAttribute('src', imageSrc); + image.alt = thumbnailElement ? thumbnailElement.alt || '' : ''; + if (options.titleTag && imageCaption) { + image.title = imageCaption; + } + figure.appendChild(image); + + // Run callback + if (options.async && callback) { + callback(); + } + } + + // Get image source location, mostly used for responsive images + function getImageSrc(image) { + // Set default image path from href + var result = image.href; + // If dataset is supported find the most suitable image + if (image.dataset) { + var srcs = []; + // Get all possible image versions depending on the resolution + for (var item in image.dataset) { + if (item.substring(0, 3) === 'at-' && !isNaN(item.substring(3))) { + srcs[item.replace('at-', '')] = image.dataset[item]; + } + } + // Sort resolutions ascending + var keys = Object.keys(srcs).sort(function(a, b) { + return parseInt(a, 10) < parseInt(b, 10) ? -1 : 1; + }); + // Get real screen resolution + var width = window.innerWidth * window.devicePixelRatio; + // Find the first image bigger than or equal to the current width + var i = 0; + while (i < keys.length - 1 && keys[i] < width) { + i++; + } + result = srcs[keys[i]] || result; + } + return result; + } + + // Return false at the right end of the gallery + function showNextImage() { + return show(currentIndex + 1); + } + + // Return false at the left end of the gallery + function showPreviousImage() { + return show(currentIndex - 1); + } + + // Return false at the left end of the gallery + function showFirstImage(event) { + if (event) { + event.preventDefault(); + } + return show(0); + } + + // Return false at the right end of the gallery + function showLastImage(event) { + if (event) { + event.preventDefault(); + } + return show(currentGallery.length - 1); + } + + /** + * Move the gallery to a specific index + * @param `index` {number} - the position of the image + * @param `gallery` {array} - gallery which should be opened, if omitted assumes the currently opened one + * @return {boolean} - true on success or false if the index is invalid + */ + function show(index, gallery) { + if (!isOverlayVisible && index >= 0 && index < gallery.length) { + prepareOverlay(gallery, options); + showOverlay(index); + return true; + } + if (index < 0) { + if (options.animation) { + bounceAnimation('left'); + } + return false; + } + if (index >= imagesElements.length) { + if (options.animation) { + bounceAnimation('right'); + } + return false; + } + + currentIndex = index; + loadImage(currentIndex, function() { + preloadNext(currentIndex); + preloadPrev(currentIndex); + }); + updateOffset(); + + if (options.onChange) { + options.onChange(currentIndex, imagesElements.length); + } + + return true; + } + + /** + * Triggers the bounce animation + * @param {('left'|'right')} direction - Direction of the movement + */ + function bounceAnimation(direction) { + slider.className = 'bounce-from-' + direction; + setTimeout(function() { + slider.className = ''; + }, 400); + } + + function updateOffset() { + var offset = -currentIndex * 100 + '%'; + if (options.animation === 'fadeIn') { + slider.style.opacity = 0; + setTimeout(function() { + supports.transforms ? + slider.style.transform = slider.style.webkitTransform = 'translate3d(' + offset + ',0,0)' + : slider.style.left = offset; + slider.style.opacity = 1; + }, 400); + } else { + supports.transforms ? + slider.style.transform = slider.style.webkitTransform = 'translate3d(' + offset + ',0,0)' + : slider.style.left = offset; + } + } + + // CSS 3D Transforms test + function testTransformsSupport() { + var div = create('div'); + return typeof div.style.perspective !== 'undefined' || typeof div.style.webkitPerspective !== 'undefined'; + } + + // Inline SVG test + function testSvgSupport() { + var div = create('div'); + div.innerHTML = '<svg/>'; + return (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg'; + } + + // Borrowed from https://github.com/seiyria/bootstrap-slider/pull/680/files + /* eslint-disable getter-return */ + function testPassiveEventsSupport() { + var passiveEvents = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function() { + passiveEvents = true; + } + }); + window.addEventListener('test', null, opts); + } catch (e) { /* Silence the error and continue */ } + + return passiveEvents; + } + /* eslint-enable getter-return */ + + function preloadNext(index) { + if (index - currentIndex >= options.preload) { + return; + } + loadImage(index + 1, function() { + preloadNext(index + 1); + }); + } + + function preloadPrev(index) { + if (currentIndex - index >= options.preload) { + return; + } + loadImage(index - 1, function() { + preloadPrev(index - 1); + }); + } + + function bind(element, event, callback, options) { + if (element.addEventListener) { + element.addEventListener(event, callback, options); + } else { + // IE8 fallback + element.attachEvent('on' + event, function(event) { + // `event` and `event.target` are not provided in IE8 + event = event || window.event; + event.target = event.target || event.srcElement; + callback(event); + }); + } + } + + function unbind(element, event, callback, options) { + if (element.removeEventListener) { + element.removeEventListener(event, callback, options); + } else { + // IE8 fallback + element.detachEvent('on' + event, callback); + } + } + + function getByID(id) { + return document.getElementById(id); + } + + function create(element) { + return document.createElement(element); + } + + function destroyPlugin() { + unbindEvents(); + clearCachedData(); + unbind(document, 'keydown', keyDownHandler); + document.getElementsByTagName('body')[0].removeChild(document.getElementById('baguetteBox-overlay')); + data = {}; + currentGallery = []; + currentIndex = 0; + } + + return { + run: run, + show: show, + showNext: showNextImage, + showPrevious: showPreviousImage, + hide: hideOverlay, + destroy: destroyPlugin + }; +})); diff --git a/assets/src/scripts/_external/headroom.js b/assets/src/scripts/_external/headroom.js new file mode 100644 index 0000000..37e91af --- /dev/null +++ b/assets/src/scripts/_external/headroom.js @@ -0,0 +1,467 @@ +/*! + * headroom.js v0.9.4 - Give your page some headroom. Hide your header until you need it + * Copyright (c) 2017 Nick Williams - http://wicky.nillia.ms/headroom.js + * License: MIT + */ + +(function(root, factory) { + 'use strict'; + + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], factory); + } + else if (typeof exports === 'object') { + // COMMONJS + module.exports = factory(); + } + else { + // BROWSER + root.Headroom = factory(); + } +}(this, function() { + 'use strict'; + + /* exported features */ + + var features = { + bind : !!(function(){}.bind), + classList : 'classList' in document.documentElement, + rAF : !!(window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame) + }; + window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; + + /** + * Handles debouncing of events via requestAnimationFrame + * @see http://www.html5rocks.com/en/tutorials/speed/animations/ + * @param {Function} callback The callback to handle whichever event + */ + function Debouncer (callback) { + this.callback = callback; + this.ticking = false; + } + Debouncer.prototype = { + constructor : Debouncer, + + /** + * dispatches the event to the supplied callback + * @private + */ + update : function() { + this.callback && this.callback(); + this.ticking = false; + }, + + /** + * ensures events don't get stacked + * @private + */ + requestTick : function() { + if(!this.ticking) { + requestAnimationFrame(this.rafCallback || (this.rafCallback = this.update.bind(this))); + this.ticking = true; + } + }, + + /** + * Attach this as the event listeners + */ + handleEvent : function() { + this.requestTick(); + } + }; + /** + * Check if object is part of the DOM + * @constructor + * @param {Object} obj element to check + */ + function isDOMElement(obj) { + return obj && typeof window !== 'undefined' && (obj === window || obj.nodeType); + } + + /** + * Helper function for extending objects + */ + function extend (object /*, objectN ... */) { + if(arguments.length <= 0) { + throw new Error('Missing arguments in extend function'); + } + + var result = object || {}, + key, + i; + + for (i = 1; i < arguments.length; i++) { + var replacement = arguments[i] || {}; + + for (key in replacement) { + // Recurse into object except if the object is a DOM element + if(typeof result[key] === 'object' && ! isDOMElement(result[key])) { + result[key] = extend(result[key], replacement[key]); + } + else { + result[key] = result[key] || replacement[key]; + } + } + } + + return result; + } + + /** + * Helper function for normalizing tolerance option to object format + */ + function normalizeTolerance (t) { + return t === Object(t) ? t : { down : t, up : t }; + } + + /** + * UI enhancement for fixed headers. + * Hides header when scrolling down + * Shows header when scrolling up + * @constructor + * @param {DOMElement} elem the header element + * @param {Object} options options for the widget + */ + function Headroom (elem, options) { + options = extend(options, Headroom.options); + + this.lastKnownScrollY = 0; + this.elem = elem; + this.tolerance = normalizeTolerance(options.tolerance); + this.classes = options.classes; + this.offset = options.offset; + this.scroller = options.scroller; + this.initialised = false; + this.onPin = options.onPin; + this.onUnpin = options.onUnpin; + this.onTop = options.onTop; + this.onNotTop = options.onNotTop; + this.onBottom = options.onBottom; + this.onNotBottom = options.onNotBottom; + } + Headroom.prototype = { + constructor : Headroom, + + /** + * Initialises the widget + */ + init : function() { + if(!Headroom.cutsTheMustard) { + return; + } + + this.debouncer = new Debouncer(this.update.bind(this)); + this.elem.classList.add(this.classes.initial); + + // defer event registration to handle browser + // potentially restoring previous scroll position + setTimeout(this.attachEvent.bind(this), 100); + + return this; + }, + + /** + * Unattaches events and removes any classes that were added + */ + destroy : function() { + var classes = this.classes; + + this.initialised = false; + + for (var key in classes) { + if(classes.hasOwnProperty(key)) { + this.elem.classList.remove(classes[key]); + } + } + + this.scroller.removeEventListener('scroll', this.debouncer, false); + }, + + /** + * Attaches the scroll event + * @private + */ + attachEvent : function() { + if(!this.initialised){ + this.lastKnownScrollY = this.getScrollY(); + this.initialised = true; + this.scroller.addEventListener('scroll', this.debouncer, false); + + this.debouncer.handleEvent(); + } + }, + + /** + * Unpins the header if it's currently pinned + */ + unpin : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(classList.contains(classes.pinned) || !classList.contains(classes.unpinned)) { + classList.add(classes.unpinned); + classList.remove(classes.pinned); + this.onUnpin && this.onUnpin.call(this); + } + }, + + /** + * Pins the header if it's currently unpinned + */ + pin : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(classList.contains(classes.unpinned)) { + classList.remove(classes.unpinned); + classList.add(classes.pinned); + this.onPin && this.onPin.call(this); + } + }, + + /** + * Handles the top states + */ + top : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(!classList.contains(classes.top)) { + classList.add(classes.top); + classList.remove(classes.notTop); + this.onTop && this.onTop.call(this); + } + }, + + /** + * Handles the not top state + */ + notTop : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(!classList.contains(classes.notTop)) { + classList.add(classes.notTop); + classList.remove(classes.top); + this.onNotTop && this.onNotTop.call(this); + } + }, + + bottom : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(!classList.contains(classes.bottom)) { + classList.add(classes.bottom); + classList.remove(classes.notBottom); + this.onBottom && this.onBottom.call(this); + } + }, + + /** + * Handles the not top state + */ + notBottom : function() { + var classList = this.elem.classList, + classes = this.classes; + + if(!classList.contains(classes.notBottom)) { + classList.add(classes.notBottom); + classList.remove(classes.bottom); + this.onNotBottom && this.onNotBottom.call(this); + } + }, + + /** + * Gets the Y scroll position + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY + * @return {Number} pixels the page has scrolled along the Y-axis + */ + getScrollY : function() { + return (this.scroller.pageYOffset !== undefined) + ? this.scroller.pageYOffset + : (this.scroller.scrollTop !== undefined) + ? this.scroller.scrollTop + : (document.documentElement || document.body.parentNode || document.body).scrollTop; + }, + + /** + * Gets the height of the viewport + * @see http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript + * @return {int} the height of the viewport in pixels + */ + getViewportHeight : function () { + return window.innerHeight + || document.documentElement.clientHeight + || document.body.clientHeight; + }, + + /** + * Gets the physical height of the DOM element + * @param {Object} elm the element to calculate the physical height of which + * @return {int} the physical height of the element in pixels + */ + getElementPhysicalHeight : function (elm) { + return Math.max( + elm.offsetHeight, + elm.clientHeight + ); + }, + + /** + * Gets the physical height of the scroller element + * @return {int} the physical height of the scroller element in pixels + */ + getScrollerPhysicalHeight : function () { + return (this.scroller === window || this.scroller === document.body) + ? this.getViewportHeight() + : this.getElementPhysicalHeight(this.scroller); + }, + + /** + * Gets the height of the document + * @see http://james.padolsey.com/javascript/get-document-height-cross-browser/ + * @return {int} the height of the document in pixels + */ + getDocumentHeight : function () { + var body = document.body, + documentElement = document.documentElement; + + return Math.max( + body.scrollHeight, documentElement.scrollHeight, + body.offsetHeight, documentElement.offsetHeight, + body.clientHeight, documentElement.clientHeight + ); + }, + + /** + * Gets the height of the DOM element + * @param {Object} elm the element to calculate the height of which + * @return {int} the height of the element in pixels + */ + getElementHeight : function (elm) { + return Math.max( + elm.scrollHeight, + elm.offsetHeight, + elm.clientHeight + ); + }, + + /** + * Gets the height of the scroller element + * @return {int} the height of the scroller element in pixels + */ + getScrollerHeight : function () { + return (this.scroller === window || this.scroller === document.body) + ? this.getDocumentHeight() + : this.getElementHeight(this.scroller); + }, + + /** + * determines if the scroll position is outside of document boundaries + * @param {int} currentScrollY the current y scroll position + * @return {bool} true if out of bounds, false otherwise + */ + isOutOfBounds : function (currentScrollY) { + var pastTop = currentScrollY < 0, + pastBottom = currentScrollY + this.getScrollerPhysicalHeight() > this.getScrollerHeight(); + + return pastTop || pastBottom; + }, + + /** + * determines if the tolerance has been exceeded + * @param {int} currentScrollY the current scroll y position + * @return {bool} true if tolerance exceeded, false otherwise + */ + toleranceExceeded : function (currentScrollY, direction) { + return Math.abs(currentScrollY-this.lastKnownScrollY) >= this.tolerance[direction]; + }, + + /** + * determine if it is appropriate to unpin + * @param {int} currentScrollY the current y scroll position + * @param {bool} toleranceExceeded has the tolerance been exceeded? + * @return {bool} true if should unpin, false otherwise + */ + shouldUnpin : function (currentScrollY, toleranceExceeded) { + var scrollingDown = currentScrollY > this.lastKnownScrollY, + pastOffset = currentScrollY >= this.offset; + + return scrollingDown && pastOffset && toleranceExceeded; + }, + + /** + * determine if it is appropriate to pin + * @param {int} currentScrollY the current y scroll position + * @param {bool} toleranceExceeded has the tolerance been exceeded? + * @return {bool} true if should pin, false otherwise + */ + shouldPin : function (currentScrollY, toleranceExceeded) { + var scrollingUp = currentScrollY < this.lastKnownScrollY, + pastOffset = currentScrollY <= this.offset; + + return (scrollingUp && toleranceExceeded) || pastOffset; + }, + + /** + * Handles updating the state of the widget + */ + update : function() { + var currentScrollY = this.getScrollY(), + scrollDirection = currentScrollY > this.lastKnownScrollY ? 'down' : 'up', + toleranceExceeded = this.toleranceExceeded(currentScrollY, scrollDirection); + + if(this.isOutOfBounds(currentScrollY)) { // Ignore bouncy scrolling in OSX + return; + } + + if (currentScrollY <= this.offset ) { + this.top(); + } else { + this.notTop(); + } + + if(currentScrollY + this.getViewportHeight() >= this.getScrollerHeight()) { + this.bottom(); + } + else { + this.notBottom(); + } + + if(this.shouldUnpin(currentScrollY, toleranceExceeded)) { + this.unpin(); + } + else if(this.shouldPin(currentScrollY, toleranceExceeded)) { + this.pin(); + } + + this.lastKnownScrollY = currentScrollY; + } + }; + /** + * Default options + * @type {Object} + */ + Headroom.options = { + tolerance : { + up : 0, + down : 0 + }, + offset : 0, + scroller: window, + classes : { + pinned : 'headroom--pinned', + unpinned : 'headroom--unpinned', + top : 'headroom--top', + notTop : 'headroom--not-top', + bottom : 'headroom--bottom', + notBottom : 'headroom--not-bottom', + initial : 'headroom' + } + }; + Headroom.cutsTheMustard = typeof features !== 'undefined' && features.rAF && features.bind && features.classList; + + return Headroom; +}));
\ No newline at end of file diff --git a/assets/src/scripts/_external/lazyload.js b/assets/src/scripts/_external/lazyload.js new file mode 100644 index 0000000..3f3d322 --- /dev/null +++ b/assets/src/scripts/_external/lazyload.js @@ -0,0 +1,422 @@ +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +(function (global, factory) { + (typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.LazyLoad = factory(); +})(this, function () { + 'use strict'; + + var defaultSettings = { + elements_selector: "img", + container: document, + threshold: 300, + thresholds: null, + data_src: "src", + data_srcset: "srcset", + data_sizes: "sizes", + data_bg: "bg", + class_loading: "loading", + class_loaded: "loaded", + class_error: "error", + load_delay: 0, + callback_load: null, + callback_error: null, + callback_set: null, + callback_enter: null, + to_webp: false + }; + + var getInstanceSettings = function getInstanceSettings(customSettings) { + return _extends({}, defaultSettings, customSettings); + }; + + var dataPrefix = "data-"; + var processedDataName = "was-processed"; + var timeoutDataName = "ll-timeout"; + var trueString = "true"; + + var getData = function getData(element, attribute) { + return element.getAttribute(dataPrefix + attribute); + }; + + var setData = function setData(element, attribute, value) { + var attrName = dataPrefix + attribute; + if (value === null) { + element.removeAttribute(attrName); + return; + } + element.setAttribute(attrName, value); + }; + + var setWasProcessedData = function setWasProcessedData(element) { + return setData(element, processedDataName, trueString); + }; + + var getWasProcessedData = function getWasProcessedData(element) { + return getData(element, processedDataName) === trueString; + }; + + var setTimeoutData = function setTimeoutData(element, value) { + return setData(element, timeoutDataName, value); + }; + + var getTimeoutData = function getTimeoutData(element) { + return getData(element, timeoutDataName); + }; + + function purgeElements(elements) { + return elements.filter(function (element) { + return !getWasProcessedData(element); + }); + } + + /* Creates instance and notifies it through the window element */ + var createInstance = function createInstance(classObj, options) { + var event; + var eventString = "LazyLoad::Initialized"; + var instance = new classObj(options); + try { + // Works in modern browsers + event = new CustomEvent(eventString, { detail: { instance: instance } }); + } catch (err) { + // Works in Internet Explorer (all versions) + event = document.createEvent("CustomEvent"); + event.initCustomEvent(eventString, false, false, { instance: instance }); + } + window.dispatchEvent(event); + }; + + /* Auto initialization of one or more instances of lazyload, depending on the + options passed in (plain object or an array) */ + function autoInitialize(classObj, options) { + if (!options) { + return; + } + if (!options.length) { + // Plain object + createInstance(classObj, options); + } else { + // Array of objects + for (var i = 0, optionsItem; optionsItem = options[i]; i += 1) { + createInstance(classObj, optionsItem); + } + } + } + + var replaceExtToWebp = function replaceExtToWebp(value, condition) { + return condition ? value.replace(/\.(jpe?g|png)/gi, ".webp") : value; + }; + + var detectWebp = function detectWebp() { + var webpString = "image/webp"; + var canvas = document.createElement("canvas"); + + if (canvas.getContext && canvas.getContext("2d")) { + return canvas.toDataURL(webpString).indexOf('data:' + webpString) === 0; + } + + return false; + }; + + var runningOnBrowser = typeof window !== "undefined"; + + var isBot = runningOnBrowser && !("onscroll" in window) || /(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent); + + var supportsIntersectionObserver = runningOnBrowser && "IntersectionObserver" in window; + + var supportsClassList = runningOnBrowser && "classList" in document.createElement("p"); + + var supportsWebp = runningOnBrowser && detectWebp(); + + var setSourcesInChildren = function setSourcesInChildren(parentTag, attrName, dataAttrName, toWebpFlag) { + for (var i = 0, childTag; childTag = parentTag.children[i]; i += 1) { + if (childTag.tagName === "SOURCE") { + var attrValue = getData(childTag, dataAttrName); + setAttributeIfValue(childTag, attrName, attrValue, toWebpFlag); + } + } + }; + + var setAttributeIfValue = function setAttributeIfValue(element, attrName, value, toWebpFlag) { + if (!value) { + return; + } + element.setAttribute(attrName, replaceExtToWebp(value, toWebpFlag)); + }; + + var setSourcesImg = function setSourcesImg(element, settings) { + var toWebpFlag = supportsWebp && settings.to_webp; + var srcsetDataName = settings.data_srcset; + var parent = element.parentNode; + + if (parent && parent.tagName === "PICTURE") { + setSourcesInChildren(parent, "srcset", srcsetDataName, toWebpFlag); + } + var sizesDataValue = getData(element, settings.data_sizes); + setAttributeIfValue(element, "sizes", sizesDataValue); + var srcsetDataValue = getData(element, srcsetDataName); + setAttributeIfValue(element, "srcset", srcsetDataValue, toWebpFlag); + var srcDataValue = getData(element, settings.data_src); + setAttributeIfValue(element, "src", srcDataValue, toWebpFlag); + }; + + var setSourcesIframe = function setSourcesIframe(element, settings) { + var srcDataValue = getData(element, settings.data_src); + + setAttributeIfValue(element, "src", srcDataValue); + }; + + var setSourcesVideo = function setSourcesVideo(element, settings) { + var srcDataName = settings.data_src; + var srcDataValue = getData(element, srcDataName); + + setSourcesInChildren(element, "src", srcDataName); + setAttributeIfValue(element, "src", srcDataValue); + element.load(); + }; + + var setSourcesBgImage = function setSourcesBgImage(element, settings) { + var toWebpFlag = supportsWebp && settings.to_webp; + var srcDataValue = getData(element, settings.data_src); + var bgDataValue = getData(element, settings.data_bg); + + if (srcDataValue) { + var setValue = replaceExtToWebp(srcDataValue, toWebpFlag); + element.style.backgroundImage = 'url("' + setValue + '")'; + } + + if (bgDataValue) { + var _setValue = replaceExtToWebp(bgDataValue, toWebpFlag); + element.style.backgroundImage = _setValue; + } + }; + + var setSourcesFunctions = { + IMG: setSourcesImg, + IFRAME: setSourcesIframe, + VIDEO: setSourcesVideo + }; + + var setSources = function setSources(element, settings) { + var tagName = element.tagName; + var setSourcesFunction = setSourcesFunctions[tagName]; + if (setSourcesFunction) { + setSourcesFunction(element, settings); + return; + } + setSourcesBgImage(element, settings); + }; + + var addClass = function addClass(element, className) { + if (supportsClassList) { + element.classList.add(className); + return; + } + element.className += (element.className ? " " : "") + className; + }; + + var removeClass = function removeClass(element, className) { + if (supportsClassList) { + element.classList.remove(className); + return; + } + element.className = element.className.replace(new RegExp("(^|\\s+)" + className + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, ""); + }; + + var callbackIfSet = function callbackIfSet(callback, argument) { + if (callback) { + callback(argument); + } + }; + + var genericLoadEventName = "load"; + var mediaLoadEventName = "loadeddata"; + var errorEventName = "error"; + + var addEventListener = function addEventListener(element, eventName, handler) { + element.addEventListener(eventName, handler); + }; + + var removeEventListener = function removeEventListener(element, eventName, handler) { + element.removeEventListener(eventName, handler); + }; + + var addAllEventListeners = function addAllEventListeners(element, loadHandler, errorHandler) { + addEventListener(element, genericLoadEventName, loadHandler); + addEventListener(element, mediaLoadEventName, loadHandler); + addEventListener(element, errorEventName, errorHandler); + }; + + var removeAllEventListeners = function removeAllEventListeners(element, loadHandler, errorHandler) { + removeEventListener(element, genericLoadEventName, loadHandler); + removeEventListener(element, mediaLoadEventName, loadHandler); + removeEventListener(element, errorEventName, errorHandler); + }; + + var eventHandler = function eventHandler(event, success, settings) { + var className = success ? settings.class_loaded : settings.class_error; + var callback = success ? settings.callback_load : settings.callback_error; + var element = event.target; + + removeClass(element, settings.class_loading); + addClass(element, className); + callbackIfSet(callback, element); + }; + + var addOneShotEventListeners = function addOneShotEventListeners(element, settings) { + var loadHandler = function loadHandler(event) { + eventHandler(event, true, settings); + removeAllEventListeners(element, loadHandler, errorHandler); + }; + var errorHandler = function errorHandler(event) { + eventHandler(event, false, settings); + removeAllEventListeners(element, loadHandler, errorHandler); + }; + addAllEventListeners(element, loadHandler, errorHandler); + }; + + var managedTags = ["IMG", "IFRAME", "VIDEO"]; + + var loadAndUnobserve = function loadAndUnobserve(element, observer, settings) { + revealElement(element, settings); + observer.unobserve(element); + }; + + var cancelDelayLoad = function cancelDelayLoad(element) { + var timeoutId = getTimeoutData(element); + if (!timeoutId) { + return; // do nothing if timeout doesn't exist + } + clearTimeout(timeoutId); + setTimeoutData(element, null); + }; + + var delayLoad = function delayLoad(element, observer, settings) { + var loadDelay = settings.load_delay; + var timeoutId = getTimeoutData(element); + if (timeoutId) { + return; // do nothing if timeout already set + } + timeoutId = setTimeout(function () { + loadAndUnobserve(element, observer, settings); + cancelDelayLoad(element); + }, loadDelay); + setTimeoutData(element, timeoutId); + }; + + function revealElement(element, settings, force) { + if (!force && getWasProcessedData(element)) { + return; // element has already been processed and force wasn't true + } + callbackIfSet(settings.callback_enter, element); + if (managedTags.indexOf(element.tagName) > -1) { + addOneShotEventListeners(element, settings); + addClass(element, settings.class_loading); + } + setSources(element, settings); + setWasProcessedData(element); + callbackIfSet(settings.callback_set, element); + } + + /* entry.isIntersecting needs fallback because is null on some versions of MS Edge, and + entry.intersectionRatio is not enough alone because it could be 0 on some intersecting elements */ + var isIntersecting = function isIntersecting(entry) { + return entry.isIntersecting || entry.intersectionRatio > 0; + }; + + var getObserverSettings = function getObserverSettings(settings) { + return { + root: settings.container === document ? null : settings.container, + rootMargin: settings.thresholds || settings.threshold + "px" + }; + }; + + var LazyLoad = function LazyLoad(customSettings, elements) { + this._settings = getInstanceSettings(customSettings); + this._setObserver(); + this.update(elements); + }; + + LazyLoad.prototype = { + _manageIntersection: function _manageIntersection(entry) { + var observer = this._observer; + var settings = this._settings; + var loadDelay = this._settings.load_delay; + var element = entry.target; + if (isIntersecting(entry)) { + if (!loadDelay) { + loadAndUnobserve(element, observer, settings); + } else { + delayLoad(element, observer, settings); + } + } + + // Writes in and outs in a data-attribute + if (!isIntersecting(entry)) { + cancelDelayLoad(element); + } + }, + _onIntersection: function _onIntersection(entries) { + entries.forEach(this._manageIntersection.bind(this)); + this._elements = purgeElements(this._elements); + }, + _setObserver: function _setObserver() { + if (!supportsIntersectionObserver) { + return; + } + this._observer = new IntersectionObserver(this._onIntersection.bind(this), getObserverSettings(this._settings)); + }, + + loadAll: function loadAll() { + var _this = this; + + this._elements.forEach(function (element) { + _this.load(element); + }); + this._elements = purgeElements(this._elements); + }, + + update: function update(elements) { + var _this2 = this; + + var settings = this._settings; + var nodeSet = elements || settings.container.querySelectorAll(settings.elements_selector); + + this._elements = purgeElements(Array.prototype.slice.call(nodeSet)); // nodeset to array for IE compatibility + + if (isBot || !this._observer) { + this.loadAll(); + return; + } + + this._elements.forEach(function (element) { + _this2._observer.observe(element); + }); + }, + + destroy: function destroy() { + var _this3 = this; + + if (this._observer) { + purgeElements(this._elements).forEach(function (element) { + _this3._observer.unobserve(element); + }); + this._observer = null; + } + this._elements = null; + this._settings = null; + }, + + load: function load(element, force) { + revealElement(element, this._settings, force); + } + }; + + /* Automatic instances creation if required (useful for async script loading) */ + if (runningOnBrowser) { + autoInitialize(LazyLoad, window.lazyLoadOptions); + } + + return LazyLoad; +});
\ No newline at end of file diff --git a/assets/src/styles/_external/baguetteBox.css b/assets/src/styles/_external/baguetteBox.css new file mode 100644 index 0000000..109a512 --- /dev/null +++ b/assets/src/styles/_external/baguetteBox.css @@ -0,0 +1,198 @@ +/*! + * baguetteBox.js + * @author feimosi + * @version 1.11.0 + * @url https://github.com/feimosi/baguetteBox.js + */ +#baguetteBox-overlay { + display: none; + opacity: 0; + position: fixed; + overflow: hidden; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1000000; + background-color: #222; + background-color: rgba(0, 0, 0, 0.8); + -webkit-transition: opacity .5s ease; + transition: opacity .5s ease; } + #baguetteBox-overlay.visible { + opacity: 1; } + #baguetteBox-overlay .full-image { + display: inline-block; + position: relative; + width: 100%; + height: 100%; + text-align: center; } + #baguetteBox-overlay .full-image figure { + display: inline; + margin: 0; + height: 100%; } + #baguetteBox-overlay .full-image img { + display: inline-block; + width: auto; + height: auto; + max-height: 100%; + max-width: 100%; + vertical-align: middle; + -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); } + #baguetteBox-overlay .full-image figcaption { + display: block; + position: absolute; + bottom: 0; + width: 100%; + text-align: center; + line-height: 1.8; + white-space: normal; + color: #ccc; + background-color: #000; + background-color: rgba(0, 0, 0, 0.6); + font-family: sans-serif; } + #baguetteBox-overlay .full-image:before { + content: ""; + display: inline-block; + height: 50%; + width: 1px; + margin-right: -1px; } + +#baguetteBox-slider { + position: absolute; + left: 0; + top: 0; + height: 100%; + width: 100%; + white-space: nowrap; + -webkit-transition: left .4s ease, -webkit-transform .4s ease; + transition: left .4s ease, -webkit-transform .4s ease; + transition: left .4s ease, transform .4s ease; + transition: left .4s ease, transform .4s ease, -webkit-transform .4s ease, -moz-transform .4s ease; } + #baguetteBox-slider.bounce-from-right { + -webkit-animation: bounceFromRight .4s ease-out; + animation: bounceFromRight .4s ease-out; } + #baguetteBox-slider.bounce-from-left { + -webkit-animation: bounceFromLeft .4s ease-out; + animation: bounceFromLeft .4s ease-out; } + +@-webkit-keyframes bounceFromRight { + 0% { + margin-left: 0; } + 50% { + margin-left: -30px; } + 100% { + margin-left: 0; } } + +@keyframes bounceFromRight { + 0% { + margin-left: 0; } + 50% { + margin-left: -30px; } + 100% { + margin-left: 0; } } + +@-webkit-keyframes bounceFromLeft { + 0% { + margin-left: 0; } + 50% { + margin-left: 30px; } + 100% { + margin-left: 0; } } + +@keyframes bounceFromLeft { + 0% { + margin-left: 0; } + 50% { + margin-left: 30px; } + 100% { + margin-left: 0; } } + +.baguetteBox-button#next-button, .baguetteBox-button#previous-button { + top: 50%; + top: calc(50% - 30px); + width: 44px; + height: 60px; } + +.baguetteBox-button { + position: absolute; + cursor: pointer; + outline: none; + padding: 0; + margin: 0; + border: 0; + -moz-border-radius: 15%; + border-radius: 15%; + background-color: #323232; + background-color: rgba(50, 50, 50, 0.5); + color: #ddd; + font: 1.6em sans-serif; + -webkit-transition: background-color .4s ease; + transition: background-color .4s ease; } + .baguetteBox-button:focus, .baguetteBox-button:hover { + background-color: rgba(50, 50, 50, 0.9); } + .baguetteBox-button#next-button { + right: 2%; } + .baguetteBox-button#previous-button { + left: 2%; } + .baguetteBox-button#close-button { + top: 20px; + right: 2%; + right: calc(2% + 6px); + width: 30px; + height: 30px; } + .baguetteBox-button svg { + position: absolute; + left: 0; + top: 0; } + +/* + Preloader + Borrowed from http://tobiasahlin.com/spinkit/ +*/ +.baguetteBox-spinner { + width: 40px; + height: 40px; + display: inline-block; + position: absolute; + top: 50%; + left: 50%; + margin-top: -20px; + margin-left: -20px; } + +.baguetteBox-double-bounce1, +.baguetteBox-double-bounce2 { + width: 100%; + height: 100%; + -moz-border-radius: 50%; + border-radius: 50%; + background-color: #fff; + opacity: .6; + position: absolute; + top: 0; + left: 0; + -webkit-animation: bounce 2s infinite ease-in-out; + animation: bounce 2s infinite ease-in-out; } + +.baguetteBox-double-bounce2 { + -webkit-animation-delay: -1s; + animation-delay: -1s; } + +@-webkit-keyframes bounce { + 0%, 100% { + -webkit-transform: scale(0); + transform: scale(0); } + 50% { + -webkit-transform: scale(1); + transform: scale(1); } } + +@keyframes bounce { + 0%, 100% { + -webkit-transform: scale(0); + -moz-transform: scale(0); + transform: scale(0); } + 50% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + transform: scale(1); } } diff --git a/assets/src/styles/_external/milligram.css b/assets/src/styles/_external/milligram.css new file mode 100644 index 0000000..d253355 --- /dev/null +++ b/assets/src/styles/_external/milligram.css @@ -0,0 +1,602 @@ +/*! + * Milligram v1.3.0 + * https://milligram.github.io + * + * Copyright (c) 2017 CJ Patoilo + * Licensed under the MIT license + */ + +*, +*:after, +*:before { + box-sizing: inherit; +} + +html { + box-sizing: border-box; + font-size: 62.5%; +} + +body { + color: #606c76; + font-family: 'Roboto', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; + font-size: 1.6em; + font-weight: 300; + letter-spacing: .01em; + line-height: 1.6; +} + +blockquote { + border-left: 0.3rem solid #d1d1d1; + margin-left: 0; + margin-right: 0; + padding: 1rem 1.5rem; +} + +blockquote *:last-child { + margin-bottom: 0; +} + +.button, +button, +input[type='button'], +input[type='reset'], +input[type='submit'] { + background-color: #9b4dca; + border: 0.1rem solid #9b4dca; + border-radius: .4rem; + color: #fff; + cursor: pointer; + display: inline-block; + font-size: 1.1rem; + font-weight: 700; + height: 3.8rem; + letter-spacing: .1rem; + line-height: 3.8rem; + padding: 0 3.0rem; + text-align: center; + text-decoration: none; + text-transform: uppercase; + white-space: nowrap; +} + +.button:focus, .button:hover, +button:focus, +button:hover, +input[type='button']:focus, +input[type='button']:hover, +input[type='reset']:focus, +input[type='reset']:hover, +input[type='submit']:focus, +input[type='submit']:hover { + background-color: #606c76; + border-color: #606c76; + color: #fff; + outline: 0; +} + +.button[disabled], +button[disabled], +input[type='button'][disabled], +input[type='reset'][disabled], +input[type='submit'][disabled] { + cursor: default; + opacity: .5; +} + +.button[disabled]:focus, .button[disabled]:hover, +button[disabled]:focus, +button[disabled]:hover, +input[type='button'][disabled]:focus, +input[type='button'][disabled]:hover, +input[type='reset'][disabled]:focus, +input[type='reset'][disabled]:hover, +input[type='submit'][disabled]:focus, +input[type='submit'][disabled]:hover { + background-color: #9b4dca; + border-color: #9b4dca; +} + +.button.button-outline, +button.button-outline, +input[type='button'].button-outline, +input[type='reset'].button-outline, +input[type='submit'].button-outline { + background-color: transparent; + color: #9b4dca; +} + +.button.button-outline:focus, .button.button-outline:hover, +button.button-outline:focus, +button.button-outline:hover, +input[type='button'].button-outline:focus, +input[type='button'].button-outline:hover, +input[type='reset'].button-outline:focus, +input[type='reset'].button-outline:hover, +input[type='submit'].button-outline:focus, +input[type='submit'].button-outline:hover { + background-color: transparent; + border-color: #606c76; + color: #606c76; +} + +.button.button-outline[disabled]:focus, .button.button-outline[disabled]:hover, +button.button-outline[disabled]:focus, +button.button-outline[disabled]:hover, +input[type='button'].button-outline[disabled]:focus, +input[type='button'].button-outline[disabled]:hover, +input[type='reset'].button-outline[disabled]:focus, +input[type='reset'].button-outline[disabled]:hover, +input[type='submit'].button-outline[disabled]:focus, +input[type='submit'].button-outline[disabled]:hover { + border-color: inherit; + color: #9b4dca; +} + +.button.button-clear, +button.button-clear, +input[type='button'].button-clear, +input[type='reset'].button-clear, +input[type='submit'].button-clear { + background-color: transparent; + border-color: transparent; + color: #9b4dca; +} + +.button.button-clear:focus, .button.button-clear:hover, +button.button-clear:focus, +button.button-clear:hover, +input[type='button'].button-clear:focus, +input[type='button'].button-clear:hover, +input[type='reset'].button-clear:focus, +input[type='reset'].button-clear:hover, +input[type='submit'].button-clear:focus, +input[type='submit'].button-clear:hover { + background-color: transparent; + border-color: transparent; + color: #606c76; +} + +.button.button-clear[disabled]:focus, .button.button-clear[disabled]:hover, +button.button-clear[disabled]:focus, +button.button-clear[disabled]:hover, +input[type='button'].button-clear[disabled]:focus, +input[type='button'].button-clear[disabled]:hover, +input[type='reset'].button-clear[disabled]:focus, +input[type='reset'].button-clear[disabled]:hover, +input[type='submit'].button-clear[disabled]:focus, +input[type='submit'].button-clear[disabled]:hover { + color: #9b4dca; +} + +code { + background: #f4f5f6; + border-radius: .4rem; + font-size: 86%; + margin: 0 .2rem; + padding: .2rem .5rem; + white-space: nowrap; +} + +pre { + background: #f4f5f6; + border-left: 0.3rem solid #9b4dca; + overflow-y: hidden; +} + +pre > code { + border-radius: 0; + display: block; + padding: 1rem 1.5rem; + white-space: pre; +} + +hr { + border: 0; + border-top: 0.1rem solid #f4f5f6; + margin: 3.0rem 0; +} + +input[type='email'], +input[type='number'], +input[type='password'], +input[type='search'], +input[type='tel'], +input[type='text'], +input[type='url'], +textarea, +select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: transparent; + border: 0.1rem solid #d1d1d1; + border-radius: .4rem; + box-shadow: none; + box-sizing: inherit; + height: 3.8rem; + padding: .6rem 1.0rem; + width: 100%; +} + +input[type='email']:focus, +input[type='number']:focus, +input[type='password']:focus, +input[type='search']:focus, +input[type='tel']:focus, +input[type='text']:focus, +input[type='url']:focus, +textarea:focus, +select:focus { + border-color: #9b4dca; + outline: 0; +} + +select { + background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="14" viewBox="0 0 29 14" width="29"><path fill="#d1d1d1" d="M9.37727 3.625l5.08154 6.93523L19.54036 3.625"/></svg>') center right no-repeat; + padding-right: 3.0rem; +} + +select:focus { + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="14" viewBox="0 0 29 14" width="29"><path fill="#9b4dca" d="M9.37727 3.625l5.08154 6.93523L19.54036 3.625"/></svg>'); +} + +textarea { + min-height: 6.5rem; +} + +label, +legend { + display: block; + font-size: 1.6rem; + font-weight: 700; + margin-bottom: .5rem; +} + +fieldset { + border-width: 0; + padding: 0; +} + +input[type='checkbox'], +input[type='radio'] { + display: inline; +} + +.label-inline { + display: inline-block; + font-weight: normal; + margin-left: .5rem; +} + +.container { + margin: 0 auto; + max-width: 112.0rem; + padding: 0 2.0rem; + position: relative; + width: 100%; +} + +.row { + display: flex; + flex-direction: column; + padding: 0; + width: 100%; +} + +.row.row-no-padding { + padding: 0; +} + +.row.row-no-padding > .column { + padding: 0; +} + +.row.row-wrap { + flex-wrap: wrap; +} + +.row.row-top { + align-items: flex-start; +} + +.row.row-bottom { + align-items: flex-end; +} + +.row.row-center { + align-items: center; +} + +.row.row-stretch { + align-items: stretch; +} + +.row.row-baseline { + align-items: baseline; +} + +.row .column { + display: block; + flex: 1 1 auto; + margin-left: 0; + max-width: 100%; + width: 100%; +} + +.row .column.column-offset-10 { + margin-left: 10%; +} + +.row .column.column-offset-20 { + margin-left: 20%; +} + +.row .column.column-offset-25 { + margin-left: 25%; +} + +.row .column.column-offset-33, .row .column.column-offset-34 { + margin-left: 33.3333%; +} + +.row .column.column-offset-50 { + margin-left: 50%; +} + +.row .column.column-offset-66, .row .column.column-offset-67 { + margin-left: 66.6666%; +} + +.row .column.column-offset-75 { + margin-left: 75%; +} + +.row .column.column-offset-80 { + margin-left: 80%; +} + +.row .column.column-offset-90 { + margin-left: 90%; +} + +.row .column.column-10 { + flex: 0 0 10%; + max-width: 10%; +} + +.row .column.column-20 { + flex: 0 0 20%; + max-width: 20%; +} + +.row .column.column-25 { + flex: 0 0 25%; + max-width: 25%; +} + +.row .column.column-33, .row .column.column-34 { + flex: 0 0 33.3333%; + max-width: 33.3333%; +} + +.row .column.column-40 { + flex: 0 0 40%; + max-width: 40%; +} + +.row .column.column-50 { + flex: 0 0 50%; + max-width: 50%; +} + +.row .column.column-60 { + flex: 0 0 60%; + max-width: 60%; +} + +.row .column.column-66, .row .column.column-67 { + flex: 0 0 66.6666%; + max-width: 66.6666%; +} + +.row .column.column-75 { + flex: 0 0 75%; + max-width: 75%; +} + +.row .column.column-80 { + flex: 0 0 80%; + max-width: 80%; +} + +.row .column.column-90 { + flex: 0 0 90%; + max-width: 90%; +} + +.row .column .column-top { + align-self: flex-start; +} + +.row .column .column-bottom { + align-self: flex-end; +} + +.row .column .column-center { + -ms-grid-row-align: center; + align-self: center; +} + +@media (min-width: 40rem) { + .row { + flex-direction: row; + margin-left: -1.0rem; + width: calc(100% + 2.0rem); + } + .row .column { + margin-bottom: inherit; + padding: 0 1.0rem; + } +} + +a { + color: #9b4dca; + text-decoration: none; +} + +a:focus, a:hover { + color: #606c76; +} + +dl, +ol, +ul { + list-style: none; + margin-top: 0; + padding-left: 0; +} + +dl dl, +dl ol, +dl ul, +ol dl, +ol ol, +ol ul, +ul dl, +ul ol, +ul ul { + font-size: 90%; + margin: 1.5rem 0 1.5rem 3.0rem; +} + +ol { + list-style: decimal inside; +} + +ul { + list-style: circle inside; +} + +.button, +button, +dd, +dt, +li { + margin-bottom: 1.0rem; +} + +fieldset, +input, +select, +textarea { + margin-bottom: 1.5rem; +} + +blockquote, +dl, +figure, +form, +ol, +p, +pre, +table, +ul { + margin-bottom: 2.5rem; +} + +table { + border-spacing: 0; + width: 100%; +} + +td, +th { + border-bottom: 0.1rem solid #e1e1e1; + padding: 1.2rem 1.5rem; + text-align: left; +} + +td:first-child, +th:first-child { + padding-left: 0; +} + +td:last-child, +th:last-child { + padding-right: 0; +} + +b, +strong { + font-weight: bold; +} + +p { + margin-top: 0; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 300; + letter-spacing: -.1rem; + margin-bottom: 2.0rem; + margin-top: 0; +} + +h1 { + font-size: 4.6rem; + line-height: 1.2; +} + +h2 { + font-size: 3.6rem; + line-height: 1.25; +} + +h3 { + font-size: 2.8rem; + line-height: 1.3; +} + +h4 { + font-size: 2.2rem; + letter-spacing: -.08rem; + line-height: 1.35; +} + +h5 { + font-size: 1.8rem; + letter-spacing: -.05rem; + line-height: 1.5; +} + +h6 { + font-size: 1.6rem; + letter-spacing: 0; + line-height: 1.4; +} + +img { + max-width: 100%; +} + +.clearfix:after { + clear: both; + content: ' '; + display: table; +} + +.float-left { + float: left; +} + +.float-right { + float: right; +} + +/*# sourceMappingURL=milligram.css.map */
\ No newline at end of file diff --git a/assets/src/styles/_external/normalize.css b/assets/src/styles/_external/normalize.css new file mode 100644 index 0000000..47b010e --- /dev/null +++ b/assets/src/styles/_external/normalize.css @@ -0,0 +1,341 @@ +/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/assets/src/styles/styles.scss b/assets/src/styles/styles.scss index f1c0b3f..afc723c 100644 --- a/assets/src/styles/styles.scss +++ b/assets/src/styles/styles.scss @@ -1,4 +1,3 @@ -@import "baguetteBox.js/src/baguetteBox"; @import "chroma_friendly"; @import "settings"; @import "_components/base"; diff --git a/assets/yarn.lock b/assets/yarn.lock deleted file mode 100644 index 02c6213..0000000 --- a/assets/yarn.lock +++ /dev/null @@ -1,35 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -baguettebox.js@^1.11.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/baguettebox.js/-/baguettebox.js-1.11.0.tgz#38b4e478dc91cad9e19060a15b19aae94724728d" - integrity sha512-4IEXDE2Yje3o8nOdGoonxOfpiveXfF6YV4ggV04ky/pMquH/cKM1Tv7LeD3QPH6RK72V6c+oRFFLnrMc4xO5Cg== - -headroom.js@^0.9.4: - version "0.9.4" - resolved "https://registry.yarnpkg.com/headroom.js/-/headroom.js-0.9.4.tgz#0c4e6b4563bb69df55aecdefaba3227566f2df5a" - integrity sha1-DE5rRWO7ad9Vrs3vq6MidWby31o= - -milligram@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/milligram/-/milligram-1.3.0.tgz#a5d980ef8eaf79337c96a8d7c7e176764931042c" - integrity sha1-pdmA746veTN8lqjXx+F2dkkxBCw= - dependencies: - normalize.css "~5.0.0" - -normalize.css@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-8.0.0.tgz#14ac5e461612538a4ce9be90a7da23f86e718493" - integrity sha512-iXcbM3NWr0XkNyfiSBsoPezi+0V92P9nj84yVV1/UZxRUrGczgX/X91KMAGM0omWLY2+2Q1gKD/XRn4gQRDB2A== - -normalize.css@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-5.0.0.tgz#7cec875ce8178a5333c4de80b68ea9c18b9d7c37" - integrity sha1-fOyHXOgXilMzxN6Ato6pwYudfDc= - -vanilla-lazyload@^10.18.0: - version "10.18.0" - resolved "https://registry.yarnpkg.com/vanilla-lazyload/-/vanilla-lazyload-10.18.0.tgz#55b262d9221ed160bba11587e6ec851a37ac30e6" - integrity sha512-PX8SuHCPzjL7B3ral1WhCtYNYwB2jqPF26TQ68xtW6TAPezYiCnugZWkFF5xSWG4zTcIMUIPXGSw564mxw6Pnw== diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 99f7352..fd0556d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,9 +12,9 @@ {{ partial "footer.html" . }} {{ end }} <!-- JS --> - {{ $baguetteBox := resources.Get "/node_modules/baguetteBox.js/src/baguetteBox.js" }} - {{ $headroom := resources.Get "/node_modules/headroom.js/dist/headroom.js" }} - {{ $lazyload := resources.Get "/node_modules/vanilla-lazyload/dist/lazyload.js" }} + {{ $baguetteBox := resources.Get "/src/scripts/_external/baguetteBox.js" }} + {{ $headroom := resources.Get "/src/scripts/_external/headroom.js" }} + {{ $lazyload := resources.Get "/src/scripts/_external/lazyload.js" }} {{ $main := resources.Get "/src/scripts/main.js" }} {{ $scripts := slice $baguetteBox $headroom $lazyload $main | resources.Concat "assets/js/scripts.js" | resources.Minify }} <script src="{{ $scripts.RelPermalink }}"></script> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index ca98d6e..a292cf3 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -8,15 +8,18 @@ {{ .Hugo.Generator }} <!-- CSS --> - {{ $normalize := slice (resources.Get "/node_modules/normalize.css/normalize.css") | resources.Concat "assets/css/normalize.css" | resources.Minify }} - {{ $milligram := resources.Get "/node_modules/milligram/src/milligram.sass" | resources.ToCSS (dict "targetPath" "assets/css/milligram.css" "outputStyle" "compressed" "enableSourceMap" true) }} + {{ $normalize := resources.Get "/src/styles/_external/normalize.css" }} + {{ $milligram := resources.Get "/src/styles/_external/milligram.css" }} + {{ $baguetteBox := resources.Get "/src/styles/_external/baguetteBox.css" }} + {{ $external := slice $normalize $milligram $baguetteBox | resources.Concat "assets/css/external.css" | resources.Minify }} + <link rel="stylesheet" href="{{ $external.RelPermalink }}" media="screen"> + {{ $options := (dict "targetPath" "assets/css/styles.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "assets/node_modules")) }} {{ $styles := resources.Get "/src/styles/styles.scss" | resources.ToCSS $options }} - <link href="//fonts.googleapis.com/css?family=Roboto:400" rel="stylesheet"> - <link rel="stylesheet" href="{{ $normalize.RelPermalink }}" media="screen"> - <link rel="stylesheet" href="{{ $milligram.RelPermalink }}" media="screen"> <link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen"> + <link href="//fonts.googleapis.com/css?family=Roboto:400" rel="stylesheet"> + <!-- Icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ print "/assets/img/apple-touch-icon.png" | relURL }}"> <link rel="shortcut icon" href="{{ print "/assets/img/favicon.ico" | relURL }}"> diff --git a/resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.content b/resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.content new file mode 100644 index 0000000..f19142c --- /dev/null +++ b/resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.content @@ -0,0 +1,8 @@ +/*!normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:0;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}/*!* Milligram v1.3.0 +* https://milligram.github.io +* +* Copyright (c) 2017 CJ Patoilo +* Licensed under the MIT license*/*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#606c76;font-family:roboto,helvetica neue,helvetica,arial,sans-serif;font-size:1.6em;font-weight:300;letter-spacing:.01em;line-height:1.6}blockquote{border-left:.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote *:last-child{margin-bottom:0}.button,button,input[type=button],input[type=reset],input[type=submit]{background-color:#9b4dca;border:.1rem solid #9b4dca;border-radius:.4rem;color:#fff;cursor:pointer;display:inline-block;font-size:1.1rem;font-weight:700;height:3.8rem;letter-spacing:.1rem;line-height:3.8rem;padding:0 3rem;text-align:center;text-decoration:none;text-transform:uppercase;white-space:nowrap}.button:focus,.button:hover,button:focus,button:hover,input[type=button]:focus,input[type=button]:hover,input[type=reset]:focus,input[type=reset]:hover,input[type=submit]:focus,input[type=submit]:hover{background-color:#606c76;border-color:#606c76;color:#fff;outline:0}.button[disabled],button[disabled],input[type=button][disabled],input[type=reset][disabled],input[type=submit][disabled]{cursor:default;opacity:.5}.button[disabled]:focus,.button[disabled]:hover,button[disabled]:focus,button[disabled]:hover,input[type=button][disabled]:focus,input[type=button][disabled]:hover,input[type=reset][disabled]:focus,input[type=reset][disabled]:hover,input[type=submit][disabled]:focus,input[type=submit][disabled]:hover{background-color:#9b4dca;border-color:#9b4dca}.button.button-outline,button.button-outline,input[type=button].button-outline,input[type=reset].button-outline,input[type=submit].button-outline{background-color:transparent;color:#9b4dca}.button.button-outline:focus,.button.button-outline:hover,button.button-outline:focus,button.button-outline:hover,input[type=button].button-outline:focus,input[type=button].button-outline:hover,input[type=reset].button-outline:focus,input[type=reset].button-outline:hover,input[type=submit].button-outline:focus,input[type=submit].button-outline:hover{background-color:transparent;border-color:#606c76;color:#606c76}.button.button-outline[disabled]:focus,.button.button-outline[disabled]:hover,button.button-outline[disabled]:focus,button.button-outline[disabled]:hover,input[type=button].button-outline[disabled]:focus,input[type=button].button-outline[disabled]:hover,input[type=reset].button-outline[disabled]:focus,input[type=reset].button-outline[disabled]:hover,input[type=submit].button-outline[disabled]:focus,input[type=submit].button-outline[disabled]:hover{border-color:inherit;color:#9b4dca}.button.button-clear,button.button-clear,input[type=button].button-clear,input[type=reset].button-clear,input[type=submit].button-clear{background-color:transparent;border-color:transparent;color:#9b4dca}.button.button-clear:focus,.button.button-clear:hover,button.button-clear:focus,button.button-clear:hover,input[type=button].button-clear:focus,input[type=button].button-clear:hover,input[type=reset].button-clear:focus,input[type=reset].button-clear:hover,input[type=submit].button-clear:focus,input[type=submit].button-clear:hover{background-color:transparent;border-color:transparent;color:#606c76}.button.button-clear[disabled]:focus,.button.button-clear[disabled]:hover,button.button-clear[disabled]:focus,button.button-clear[disabled]:hover,input[type=button].button-clear[disabled]:focus,input[type=button].button-clear[disabled]:hover,input[type=reset].button-clear[disabled]:focus,input[type=reset].button-clear[disabled]:hover,input[type=submit].button-clear[disabled]:focus,input[type=submit].button-clear[disabled]:hover{color:#9b4dca}code{background:#f4f5f6;border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}pre{background:#f4f5f6;border-left:.3rem solid #9b4dca;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:.1rem solid #f4f5f6;margin:3rem 0}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1rem;width:100%}input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,textarea:focus,select:focus{border-color:#9b4dca;outline:0}select{background:url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAyOSAxNCIgd2lkdGg9IjI5Ij48cGF0aCBmaWxsPSIjZDFkMWQxIiBkPSJNOS4zNzcyNyAzLjYyNWw1LjA4MTU0IDYuOTM1MjNMMTkuNTQwMzYgMy42MjUiLz48L3N2Zz4=) center right no-repeat;padding-right:3rem}select:focus{background-image:url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAyOSAxNCIgd2lkdGg9IjI5Ij48cGF0aCBmaWxsPSIjOWI0ZGNhIiBkPSJNOS4zNzcyNyAzLjYyNWw1LjA4MTU0IDYuOTM1MjNMMTkuNTQwMzYgMy42MjUiLz48L3N2Zz4=)}textarea{min-height:6.5rem}label,legend{display:block;font-size:1.6rem;font-weight:700;margin-bottom:.5rem}fieldset{border-width:0;padding:0}input[type=checkbox],input[type=radio]{display:inline}.label-inline{display:inline-block;font-weight:400;margin-left:.5rem}.container{margin:0 auto;max-width:112rem;padding:0 2rem;position:relative;width:100%}.row{display:flex;flex-direction:column;padding:0;width:100%}.row.row-no-padding{padding:0}.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{-ms-grid-row-align:center;align-self:center}@media(min-width:40rem){.row{flex-direction:row;margin-left:-1rem;width:calc(100% + 2.0rem)}.row .column{margin-bottom:inherit;padding:0 1rem}}a{color:#9b4dca;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}table{border-spacing:0;width:100%}td,th{border-bottom:.1rem solid #e1e1e1;padding:1.2rem 1.5rem;text-align:left}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}b,strong{font-weight:700}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-.1rem;margin-bottom:2rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h6{font-size:1.6rem;letter-spacing:0;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:' ';display:table}.float-left{float:left}.float-right{float:right}/*!* baguetteBox.js +* @author feimosi +* @version 1.11.0 +* @url https://github.com/feimosi/baguetteBox.js*/#baguetteBox-overlay{display:none;opacity:0;position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:1000000;background-color:#222;background-color:rgba(0,0,0,.8);-webkit-transition:opacity .5s ease;transition:opacity .5s ease}#baguetteBox-overlay.visible{opacity:1}#baguetteBox-overlay .full-image{display:inline-block;position:relative;width:100%;height:100%;text-align:center}#baguetteBox-overlay .full-image figure{display:inline;margin:0;height:100%}#baguetteBox-overlay .full-image img{display:inline-block;width:auto;height:auto;max-height:100%;max-width:100%;vertical-align:middle;-webkit-box-shadow:0 0 8px rgba(0,0,0,.6);-moz-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6)}#baguetteBox-overlay .full-image figcaption{display:block;position:absolute;bottom:0;width:100%;text-align:center;line-height:1.8;white-space:normal;color:#ccc;background-color:#000;background-color:rgba(0,0,0,.6);font-family:sans-serif}#baguetteBox-overlay .full-image:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#baguetteBox-slider{position:absolute;left:0;top:0;height:100%;width:100%;white-space:nowrap;-webkit-transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,transform .4s ease;transition:left .4s ease,transform .4s ease,-webkit-transform .4s ease,-moz-transform .4s ease}#baguetteBox-slider.bounce-from-right{-webkit-animation:bounceFromRight .4s ease-out;animation:bounceFromRight .4s ease-out}#baguetteBox-slider.bounce-from-left{-webkit-animation:bounceFromLeft .4s ease-out;animation:bounceFromLeft .4s ease-out}@-webkit-keyframes bounceFromRight{0%{margin-left:0}50%{margin-left:-30px}100%{margin-left:0}}@keyframes bounceFromRight{0%{margin-left:0}50%{margin-left:-30px}100%{margin-left:0}}@-webkit-keyframes bounceFromLeft{0%{margin-left:0}50%{margin-left:30px}100%{margin-left:0}}@keyframes bounceFromLeft{0%{margin-left:0}50%{margin-left:30px}100%{margin-left:0}}.baguetteBox-button#next-button,.baguetteBox-button#previous-button{top:50%;top:calc(50% - 30px);width:44px;height:60px}.baguetteBox-button{position:absolute;cursor:pointer;outline:0;padding:0;margin:0;border:0;-moz-border-radius:15%;border-radius:15%;background-color:#323232;background-color:rgba(50,50,50,.5);color:#ddd;font:1.6em sans-serif;-webkit-transition:background-color .4s ease;transition:background-color .4s ease}.baguetteBox-button:focus,.baguetteBox-button:hover{background-color:rgba(50,50,50,.9)}.baguetteBox-button#next-button{right:2%}.baguetteBox-button#previous-button{left:2%}.baguetteBox-button#close-button{top:20px;right:2%;right:calc(2% + 6px);width:30px;height:30px}.baguetteBox-button svg{position:absolute;left:0;top:0}.baguetteBox-spinner{width:40px;height:40px;display:inline-block;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px}.baguetteBox-double-bounce1,.baguetteBox-double-bounce2{width:100%;height:100%;-moz-border-radius:50%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.baguetteBox-double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounce{0%,100%{-webkit-transform:scale(0);-moz-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);-moz-transform:scale(1);transform:scale(1)}}
\ No newline at end of file diff --git a/resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.json b/resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.json new file mode 100644 index 0000000..489162a --- /dev/null +++ b/resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.json @@ -0,0 +1 @@ +{"Target":"assets/css/external.min.css","MediaType":"text/css","Data":{}}
\ No newline at end of file diff --git a/resources/_gen/assets/js/assets/js/scripts.js_d3f53f09220d597dac26fe7840c31fc9.content b/resources/_gen/assets/js/assets/js/scripts.js_d3f53f09220d597dac26fe7840c31fc9.content index db46183..5b35975 100644 --- a/resources/_gen/assets/js/assets/js/scripts.js_d3f53f09220d597dac26fe7840c31fc9.content +++ b/resources/_gen/assets/js/assets/js/scripts.js_d3f53f09220d597dac26fe7840c31fc9.content @@ -1,7 +1,7 @@ /*! * baguetteBox.js * @author feimosi -* @version %%INJECT_VERSION%% +* @version 1.11.0 * @url https://github.com/feimosi/baguetteBox.js */(function(root,factory){'use strict';if(typeof define==='function'&&define.amd){define(factory);}else if(typeof exports==='object'){module.exports=factory();}else{root.baguetteBox=factory();}}(this,function(){'use strict';var leftArrow='<svg width="44" height="60">'+ '<polyline points="30 10 10 30 30 50" stroke="rgba(255,255,255,0.5)" stroke-width="4"'+ diff --git a/resources/_gen/assets/scss/src/styles/styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.content b/resources/_gen/assets/scss/src/styles/styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.content index a95d5bb..55bd52b 100644 --- a/resources/_gen/assets/scss/src/styles/styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.content +++ b/resources/_gen/assets/scss/src/styles/styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.content @@ -1,8 +1,3 @@ -/*! - * baguetteBox.js - * @author feimosi - * @version %%INJECT_VERSION%% - * @url https://github.com/feimosi/baguetteBox.js - */#baguetteBox-overlay{display:none;opacity:0;position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:1000000;background-color:#222;background-color:rgba(0,0,0,0.8);transition:opacity .5s ease}#baguetteBox-overlay.visible{opacity:1}#baguetteBox-overlay .full-image{display:inline-block;position:relative;width:100%;height:100%;text-align:center}#baguetteBox-overlay .full-image figure{display:inline;margin:0;height:100%}#baguetteBox-overlay .full-image img{display:inline-block;width:auto;height:auto;max-height:100%;max-width:100%;vertical-align:middle;box-shadow:0 0 8px rgba(0,0,0,0.6)}#baguetteBox-overlay .full-image figcaption{display:block;position:absolute;bottom:0;width:100%;text-align:center;line-height:1.8;white-space:normal;color:#ccc;background-color:#000;background-color:rgba(0,0,0,0.6);font-family:sans-serif}#baguetteBox-overlay .full-image:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#baguetteBox-slider{position:absolute;left:0;top:0;height:100%;width:100%;white-space:nowrap;transition:left .4s ease, transform .4s ease}#baguetteBox-slider.bounce-from-right{animation:bounceFromRight .4s ease-out}#baguetteBox-slider.bounce-from-left{animation:bounceFromLeft .4s ease-out}@keyframes bounceFromRight{0%{margin-left:0}50%{margin-left:-30px}100%{margin-left:0}}@keyframes bounceFromLeft{0%{margin-left:0}50%{margin-left:30px}100%{margin-left:0}}.baguetteBox-button#next-button,.baguetteBox-button#previous-button{top:50%;top:calc(50% - 30px);width:44px;height:60px}.baguetteBox-button{position:absolute;cursor:pointer;outline:none;padding:0;margin:0;border:0;border-radius:15%;background-color:#323232;background-color:rgba(50,50,50,0.5);color:#ddd;font:1.6em sans-serif;transition:background-color .4s ease}.baguetteBox-button:focus,.baguetteBox-button:hover{background-color:rgba(50,50,50,0.9)}.baguetteBox-button#next-button{right:2%}.baguetteBox-button#previous-button{left:2%}.baguetteBox-button#close-button{top:20px;right:2%;right:calc(2% + 6px);width:30px;height:30px}.baguetteBox-button svg{position:absolute;left:0;top:0}.baguetteBox-spinner{width:40px;height:40px;display:inline-block;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px}.baguetteBox-double-bounce1,.baguetteBox-double-bounce2{width:100%;height:100%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;animation:bounce 2s infinite ease-in-out}.baguetteBox-double-bounce2{animation-delay:-1s}@keyframes bounce{0%,100%{transform:scale(0)}50%{transform:scale(1)}}.chroma{background-color:#f0f0f0}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:#ffffcc}.chroma .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em}.chroma .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em}.chroma .k{color:#007020;font-weight:bold}.chroma .kc{color:#007020;font-weight:bold}.chroma .kd{color:#007020;font-weight:bold}.chroma .kn{color:#007020;font-weight:bold}.chroma .kp{color:#007020}.chroma .kr{color:#007020;font-weight:bold}.chroma .kt{color:#902000}.chroma .na{color:#4070a0}.chroma .nb{color:#007020}.chroma .nc{color:#0e84b5;font-weight:bold}.chroma .no{color:#60add5}.chroma .nd{color:#555555;font-weight:bold}.chroma .ni{color:#d55537;font-weight:bold}.chroma .ne{color:#007020}.chroma .nf{color:#06287e}.chroma .nl{color:#002070;font-weight:bold}.chroma .nn{color:#0e84b5;font-weight:bold}.chroma .nt{color:#062873;font-weight:bold}.chroma .nv{color:#bb60d5}.chroma .s{color:#4070a0}.chroma .sa{color:#4070a0}.chroma .sb{color:#4070a0}.chroma .sc{color:#4070a0}.chroma .dl{color:#4070a0}.chroma .sd{color:#4070a0;font-style:italic}.chroma .s2{color:#4070a0}.chroma .se{color:#4070a0;font-weight:bold}.chroma .sh{color:#4070a0}.chroma .si{color:#70a0d0;font-style:italic}.chroma .sx{color:#c65d09}.chroma .sr{color:#235388}.chroma .s1{color:#4070a0}.chroma .ss{color:#517918}.chroma .m{color:#40a070}.chroma .mb{color:#40a070}.chroma .mf{color:#40a070}.chroma .mh{color:#40a070}.chroma .mi{color:#40a070}.chroma .il{color:#40a070}.chroma .mo{color:#40a070}.chroma .o{color:#666666}.chroma .ow{color:#007020;font-weight:bold}.chroma .c{color:#60a0b0;font-style:italic}.chroma .ch{color:#60a0b0;font-style:italic}.chroma .cm{color:#60a0b0;font-style:italic}.chroma .c1{color:#60a0b0;font-style:italic}.chroma .cs{color:#60a0b0;background-color:#fff0f0}.chroma .cp{color:#007020}.chroma .cpf{color:#007020}.chroma .gd{color:#a00000}.chroma .ge{font-style:italic}.chroma .gr{color:#ff0000}.chroma .gh{color:#000080;font-weight:bold}.chroma .gi{color:#00a000}.chroma .go{color:#888888}.chroma .gp{color:#c65d09;font-weight:bold}.chroma .gs{font-weight:bold}.chroma .gu{color:#800080;font-weight:bold}.chroma .gt{color:#0044dd}.chroma .gl{text-decoration:underline}.chroma .w{color:#bbbbbb}html,body{background-color:#fefefe;font-family:Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;height:100%;margin:0;text-rendering:optimizeLegibility}body{display:grid;grid-gap:1rem;grid-template-areas:"nav" "main" "footer";grid-template-columns:1fr;height:100%;grid-template-rows:5rem 1fr 3rem}@media screen and (max-width: 800px){body{grid-template-rows:5rem 1fr 5rem}}body a{color:#39f;text-decoration:none}body a:hover,body a:active,body a:visited{text-decoration:underline}body nav{grid-area:nav}body main{grid-area:main;justify-self:center;grid-column:1 / -1;max-width:80rem !important;padding-bottom:3rem !important;padding-top:3rem !important}body main.home{align-items:center;display:flex;flex-direction:column;justify-content:center;text-align:center}body footer{grid-area:footer}body main article header{margin-bottom:5rem;text-align:center}body main article header time{color:silver}body main article section figure.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section figure img{display:block;height:auto;margin:0 auto;max-width:100%;padding:0}body main article section figure img.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section figure figcaption{text-align:center}body main article section table tbody tr td[align="left"]{text-align:left}body main article section table tbody tr td[align="right"]{text-align:right}body main article section table tbody tr td[align="center"]{text-align:center}body main article section div.highlight pre{border-left:0.3rem solid #39f}body main article section iframe.instagram-media{margin-left:auto !important;margin-right:auto !important}body main article section img{display:block;height:auto;margin:2.5rem auto;max-width:100%;padding:0}body main article section img.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section p code{background-color:#f8f8f8;color:#f0506e}body main article section ul.task-list{list-style:none;padding:0}body main article section video{display:block;width:100%}body main article section .embed-container{height:0;max-width:100%;overflow:hidden;padding-bottom:56.25%;position:relative}body main article section .embed-container embed,body main article section .embed-container iframe,body main article section .embed-container object{height:100%;left:0;position:absolute;top:0;width:100%}body main article section .speakerdeck{margin-left:auto !important;margin-right:auto !important}body main article section .twitter-tweet{margin-left:auto !important;margin-right:auto !important}@media (max-width: 550px){body main article section .twitter-tweet{width:0 !important}}body main article footer{text-align:center}body main article footer .meta .tags a span{color:silver}body main article footer #disqus_thread{margin-left:auto !important;margin-right:auto !important}ul.posts-list{list-style:none}ul.posts-list li .date{color:silver;font-size:0.8em;display:block}ul.posts-list li .lang{color:silver;font-size:0.7em;text-transform:uppercase}ul.posts-list li .lang a{color:silver;text-decoration:none}ul.posts-list li .lang a:hover,ul.posts-list li .lang a:active,ul.posts-list li .lang a:visited{text-decoration:underline}body>footer{align-items:right;color:#000;display:flex;font-size:0.8em;justify-content:space-between;padding:0.5rem;text-align:center}body>footer p{margin-bottom:0}@media screen and (max-width: 800px){body>footer{flex-direction:column}body>footer p:first-of-type{margin-bottom:0.1rem}body>footer p:last-of-type{margin-top:0.1rem}}body main .homepage-avatar{border-radius:50%;margin-bottom:2rem}body nav{align-items:center;background-color:#f4f5f6;color:#000;display:flex;height:5rem;justify-content:space-between;left:0;padding:0.1rem 1rem;position:fixed;right:0;top:0;z-index:10;border-bottom:.1rem solid #d1d1d1}body nav a{color:#000;text-decoration:none}body nav a:hover,body nav a:active,body nav a:visited{text-decoration:none}body nav.animated{animation-duration:0.5s;animation-fill-mode:both;will-change:transform, opacity}body nav.animated.slideDown{animation-name:slideDown}body nav.animated.slideUp{animation-name:slideUp}@-webkit-keyframes slideUp{0%{-webkit-transform:translateY(0)}100%{-webkit-transform:translateY(-100%)}}@-moz-keyframes slideUp{0%{-moz-transform:translateY(0)}100%{-moz-transform:translateY(-100%)}}@-o-keyframes slideUp{0%{-o-transform:translateY(0)}100%{-o-transform:translateY(-100%)}}@keyframes slideUp{0%{transform:translateY(0)}100%{transform:translateY(-100%)}}@-webkit-keyframes slideDown{0%{-webkit-transform:translateY(-100%)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes slideDown{0%{-moz-transform:translateY(-100%)}100%{-moz-transform:translateY(0)}}@-o-keyframes slideDown{0%{-o-transform:translateY(-100%)}100%{-o-transform:translateY(0)}}@keyframes slideDown{0%{transform:translateY(-100%)}100%{transform:translateY(0)}} +.chroma{background-color:#f0f0f0}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:#ffffcc}.chroma .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em}.chroma .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em}.chroma .k{color:#007020;font-weight:bold}.chroma .kc{color:#007020;font-weight:bold}.chroma .kd{color:#007020;font-weight:bold}.chroma .kn{color:#007020;font-weight:bold}.chroma .kp{color:#007020}.chroma .kr{color:#007020;font-weight:bold}.chroma .kt{color:#902000}.chroma .na{color:#4070a0}.chroma .nb{color:#007020}.chroma .nc{color:#0e84b5;font-weight:bold}.chroma .no{color:#60add5}.chroma .nd{color:#555555;font-weight:bold}.chroma .ni{color:#d55537;font-weight:bold}.chroma .ne{color:#007020}.chroma .nf{color:#06287e}.chroma .nl{color:#002070;font-weight:bold}.chroma .nn{color:#0e84b5;font-weight:bold}.chroma .nt{color:#062873;font-weight:bold}.chroma .nv{color:#bb60d5}.chroma .s{color:#4070a0}.chroma .sa{color:#4070a0}.chroma .sb{color:#4070a0}.chroma .sc{color:#4070a0}.chroma .dl{color:#4070a0}.chroma .sd{color:#4070a0;font-style:italic}.chroma .s2{color:#4070a0}.chroma .se{color:#4070a0;font-weight:bold}.chroma .sh{color:#4070a0}.chroma .si{color:#70a0d0;font-style:italic}.chroma .sx{color:#c65d09}.chroma .sr{color:#235388}.chroma .s1{color:#4070a0}.chroma .ss{color:#517918}.chroma .m{color:#40a070}.chroma .mb{color:#40a070}.chroma .mf{color:#40a070}.chroma .mh{color:#40a070}.chroma .mi{color:#40a070}.chroma .il{color:#40a070}.chroma .mo{color:#40a070}.chroma .o{color:#666666}.chroma .ow{color:#007020;font-weight:bold}.chroma .c{color:#60a0b0;font-style:italic}.chroma .ch{color:#60a0b0;font-style:italic}.chroma .cm{color:#60a0b0;font-style:italic}.chroma .c1{color:#60a0b0;font-style:italic}.chroma .cs{color:#60a0b0;background-color:#fff0f0}.chroma .cp{color:#007020}.chroma .cpf{color:#007020}.chroma .gd{color:#a00000}.chroma .ge{font-style:italic}.chroma .gr{color:#ff0000}.chroma .gh{color:#000080;font-weight:bold}.chroma .gi{color:#00a000}.chroma .go{color:#888888}.chroma .gp{color:#c65d09;font-weight:bold}.chroma .gs{font-weight:bold}.chroma .gu{color:#800080;font-weight:bold}.chroma .gt{color:#0044dd}.chroma .gl{text-decoration:underline}.chroma .w{color:#bbbbbb}html,body{background-color:#fefefe;font-family:Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;height:100%;margin:0;text-rendering:optimizeLegibility}body{display:grid;grid-gap:1rem;grid-template-areas:"nav" "main" "footer";grid-template-columns:1fr;height:100%;grid-template-rows:5rem 1fr 3rem}@media screen and (max-width: 800px){body{grid-template-rows:5rem 1fr 5rem}}body a{color:#39f;text-decoration:none}body a:hover,body a:active,body a:visited{text-decoration:underline}body nav{grid-area:nav}body main{grid-area:main;justify-self:center;grid-column:1 / -1;max-width:80rem !important;padding-bottom:3rem !important;padding-top:3rem !important}body main.home{align-items:center;display:flex;flex-direction:column;justify-content:center;text-align:center}body footer{grid-area:footer}body main article header{margin-bottom:5rem;text-align:center}body main article header time{color:silver}body main article section figure{margin:2.5rem 0}body main article section figure.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section figure img{display:block;height:auto;margin:0 auto;max-width:100%;padding:0}body main article section figure img.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section figure figcaption{text-align:center}body main article section table tbody tr td[align="left"]{text-align:left}body main article section table tbody tr td[align="right"]{text-align:right}body main article section table tbody tr td[align="center"]{text-align:center}body main article section div.highlight pre{border-left:0.3rem solid #39f}body main article section iframe.instagram-media{margin-left:auto !important;margin-right:auto !important}body main article section img{display:block;height:auto;margin:2.5rem auto;max-width:100%;padding:0}body main article section img.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section p code{background-color:#f8f8f8;color:#f0506e}body main article section ul.task-list{list-style:none;padding:0}body main article section video{display:block;width:100%}body main article section .embed-container{height:0;max-width:100%;overflow:hidden;padding-bottom:56.25%;position:relative}body main article section .embed-container embed,body main article section .embed-container iframe,body main article section .embed-container object{height:100%;left:0;position:absolute;top:0;width:100%}body main article section .speakerdeck{margin-left:auto !important;margin-right:auto !important}body main article section .twitter-tweet{margin-left:auto !important;margin-right:auto !important}@media (max-width: 550px){body main article section .twitter-tweet{width:0 !important}}body main article footer{text-align:center}body main article footer .meta .tags a span{color:silver}body main article footer #disqus_thread{margin-left:auto !important;margin-right:auto !important}ul.posts-list{list-style:none}ul.posts-list li .date{color:silver;font-size:0.8em;display:block}ul.posts-list li .lang{color:silver;font-size:0.7em;text-transform:uppercase}ul.posts-list li .lang a{color:silver;text-decoration:none}ul.posts-list li .lang a:hover,ul.posts-list li .lang a:active,ul.posts-list li .lang a:visited{text-decoration:underline}body>footer{align-items:right;color:#000;display:flex;font-size:0.8em;justify-content:space-between;padding:0.5rem;text-align:center}body>footer p{margin-bottom:0}@media screen and (max-width: 800px){body>footer{flex-direction:column}body>footer p:first-of-type{margin-bottom:0.1rem}body>footer p:last-of-type{margin-top:0.1rem}}body main .homepage-avatar{border-radius:50%;margin-bottom:2rem}body nav{align-items:center;background-color:#f4f5f6;color:#000;display:flex;height:5rem;justify-content:space-between;left:0;padding:0.1rem 1rem;position:fixed;right:0;top:0;z-index:10;border-bottom:.1rem solid #d1d1d1}body nav a{color:#000;text-decoration:none}body nav a:hover,body nav a:active,body nav a:visited{text-decoration:none}body nav.animated{animation-duration:0.5s;animation-fill-mode:both;will-change:transform, opacity}body nav.animated.slideDown{animation-name:slideDown}body nav.animated.slideUp{animation-name:slideUp}@-webkit-keyframes slideUp{0%{-webkit-transform:translateY(0)}100%{-webkit-transform:translateY(-100%)}}@-moz-keyframes slideUp{0%{-moz-transform:translateY(0)}100%{-moz-transform:translateY(-100%)}}@-o-keyframes slideUp{0%{-o-transform:translateY(0)}100%{-o-transform:translateY(-100%)}}@keyframes slideUp{0%{transform:translateY(0)}100%{transform:translateY(-100%)}}@-webkit-keyframes slideDown{0%{-webkit-transform:translateY(-100%)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes slideDown{0%{-moz-transform:translateY(-100%)}100%{-moz-transform:translateY(0)}}@-o-keyframes slideDown{0%{-o-transform:translateY(-100%)}100%{-o-transform:translateY(0)}}@keyframes slideDown{0%{transform:translateY(-100%)}100%{transform:translateY(0)}} /*# sourceMappingURL=styles.css.map */
\ No newline at end of file |