1/******/ (function (modules) { 2 // webpackBootstrap 3 /******/ // The module cache 4 /******/ var installedModules = {}; 5 /******/ 6 /******/ // The require function 7 /******/ function __webpack_require__(moduleId) { 8 /******/ 9 /******/ // Check if module is in cache 10 /******/ if (installedModules[moduleId]) { 11 /******/ return installedModules[moduleId].exports; 12 /******/ 13 } 14 /******/ // Create a new module (and put it into the cache) 15 /******/ var module = (installedModules[moduleId] = { 16 /******/ i: moduleId, 17 /******/ l: false, 18 /******/ exports: {}, 19 /******/ 20 }); 21 /******/ 22 /******/ // Execute the module function 23 /******/ modules[moduleId].call( 24 module.exports, 25 module, 26 module.exports, 27 __webpack_require__ 28 ); 29 /******/ 30 /******/ // Flag the module as loaded 31 /******/ module.l = true; 32 /******/ 33 /******/ // Return the exports of the module 34 /******/ return module.exports; 35 /******/ 36 } 37 /******/ 38 /******/ 39 /******/ // expose the modules object (__webpack_modules__) 40 /******/ __webpack_require__.m = modules; 41 /******/ 42 /******/ // expose the module cache 43 /******/ __webpack_require__.c = installedModules; 44 /******/ 45 /******/ // define getter function for harmony exports 46 /******/ __webpack_require__.d = function (exports, name, getter) { 47 /******/ if (!__webpack_require__.o(exports, name)) { 48 /******/ Object.defineProperty(exports, name, { 49 /******/ configurable: false, 50 /******/ enumerable: true, 51 /******/ get: getter, 52 /******/ 53 }); 54 /******/ 55 } 56 /******/ 57 }; 58 /******/ 59 /******/ // getDefaultExport function for compatibility with non-harmony modules 60 /******/ __webpack_require__.n = function (module) { 61 /******/ var getter = 62 module && module.__esModule 63 ? /******/ function getDefault() { 64 return module["default"]; 65 } 66 : /******/ function getModuleExports() { 67 return module; 68 }; 69 /******/ __webpack_require__.d(getter, "a", getter); 70 /******/ return getter; 71 /******/ 72 }; 73 /******/ 74 /******/ // Object.prototype.hasOwnProperty.call 75 /******/ __webpack_require__.o = function (object, property) { 76 return Object.prototype.hasOwnProperty.call(object, property); 77 }; 78 /******/ 79 /******/ // __webpack_public_path__ 80 /******/ __webpack_require__.p = ""; 81 /******/ 82 /******/ // Load entry module and return exports 83 /******/ return __webpack_require__((__webpack_require__.s = 0)); 84 /******/ 85})( 86 /************************************************************************/ 87 /******/ [ 88 /* 0 */ 89 /***/ function (module, exports, __webpack_require__) { 90 __webpack_require__(1); 91 module.exports = __webpack_require__(3); 92 93 /***/ 94 }, 95 /* 1 */ 96 /***/ function (module, exports, __webpack_require__) { 97 "use strict"; 98 99 var _jump = __webpack_require__(2); 100 101 var _jump2 = _interopRequireDefault(_jump); 102 103 function _interopRequireDefault(obj) { 104 return obj && obj.__esModule ? obj : { default: obj }; 105 } 106 107 var doc = document.documentElement; 108 var nav = document.getElementById("navigation-menu"); 109 var snowflakes = document.getElementById("snowflakes"); 110 var santa = document.getElementById("santa"); 111 var reindeer = document.getElementById("reindeer"); 112 113 114 115 var menuToggleHandler = function menuToggleHandler(e) { 116 e.preventDefault(); 117 nav.classList.toggle("active"); 118 if (nav.classList.contains("active")) { 119 e.currentTarget.style.color = "#111"; 120 e.currentTarget.style.backgroundColor = "rgba(219, 219, 219, 0.6)"; 121 } else { 122 e.currentTarget.style.color = "#677179"; 123 e.currentTarget.style.backgroundColor = "none"; 124 } 125 }; 126 var onScrollEventHandler = function onScrollEventHandler(e) { 127 var top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0); 128 if (top > 0) { 129 if ( 130 document.getElementById("santa-container").getBoundingClientRect() 131 .top < -140 132 ) { 133 santa.classList.remove("animated", "slideInRight"); 134 santa.classList.add("animated", "slideOutRight"); 135 } else { 136 santa.classList.remove("animated", "slideOutRight"); 137 santa.classList.add("animated", "slideInRight"); 138 } 139 140 if (snowflakes.getBoundingClientRect().top < 0) { 141 snowflakes.classList.add("animated", "fadeOutDown"); 142 } 143 144 console.log( 145 "getBoundingClientRect" + reindeer.getBoundingClientRect().top 146 ); 147 148 if (reindeer.getBoundingClientRect().top < 120) { 149 //console.log("hide deer"); 150 reindeer.classList.remove("animated", "slideInLeft"); 151 reindeer.classList.add("animated", "slideOutLeft"); 152 } else { 153 //console.log("show deer"); 154 reindeer.classList.remove("animated", "slideOutLeft"); 155 reindeer.classList.add("animated", "slideInLeft"); 156 } 157 } 158 }; 159 var scrollButtonHander = function scrollButtonHander(e) { 160 e.preventDefault(); 161 santa.style.display = "none"; 162 var targetY = document 163 .getElementById(e.currentTarget.hash.substr(1)) 164 .getBoundingClientRect().top; 165 (0, _jump2.default)(targetY - 60, { 166 callback: function callback() { 167 santa.style.display = "block"; 168 }, 169 }); 170 }; 171 172 173 document.getElementById("navigation-menu-icon").onclick = 174 menuToggleHandler; 175 document.getElementById("scrollButton").onclick = scrollButtonHander; 176 document.getElementById("scrollButton2").onclick = scrollButtonHander; 177 // document.getElementById("scrollButton_temoignages").onclick = scrollButtonHander; 178 // document.getElementById("scrollButton_blog").onclick = scrollButtonHander; 179 180 window.onscroll = onScrollEventHandler; 181 182 //SLIDER CODE 183 184 (function () { 185 var sliderImages = document.querySelectorAll(".image"), 186 arrowLeft = document.querySelector("#left-arrow"), 187 arrowRight = document.querySelector("#right-arrow"), 188 currentImg = 0; 189 190 function initSlider() { 191 resetSlider(); 192 193 sliderImages[0].style.display = "block"; 194 } 195 196 function resetSlider() { 197 for (var i = 0; i < sliderImages.length; i++) { 198 sliderImages[i].style.display = "none"; 199 } 200 } 201 202 function toLeft() { 203 resetSlider(); 204 sliderImages[currentImg - 1].style.display = "block"; 205 currentImg--; 206 } 207 208 function toRight() { 209 resetSlider(); 210 sliderImages[currentImg + 1].style.display = "block"; 211 currentImg++; 212 } 213 214 /*arrowLeft.addEventListener('click', function () { 215 if (currentImg === 0) { 216 currentImg = sliderImages.length; 217 } 218 219 toLeft(); 220 });*/ 221 222 /*arrowRight.addEventListener('click', function () { 223 if (currentImg === sliderImages.length - 1) { 224 currentImg = -1; 225 } 226 227 toRight(); 228 });*/ 229 230 //initSlider(); 231 })(); 232 233 /***/ 234 }, 235 /* 2 */ 236 /***/ function (module, __webpack_exports__, __webpack_require__) { 237 "use strict"; 238 Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 239 // Robert Penner's easeInOutQuad 240 241 // find the rest of his easing functions here: http://robertpenner.com/easing/ 242 // find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js 243 244 var easeInOutQuad = function easeInOutQuad(t, b, c, d) { 245 t /= d / 2; 246 if (t < 1) return (c / 2) * t * t + b; 247 t--; 248 return (-c / 2) * (t * (t - 2) - 1) + b; 249 }; 250 251 var _typeof = 252 typeof Symbol === "function" && typeof Symbol.iterator === "symbol" 253 ? function (obj) { 254 return typeof obj; 255 } 256 : function (obj) { 257 return obj && 258 typeof Symbol === "function" && 259 obj.constructor === Symbol && 260 obj !== Symbol.prototype 261 ? "symbol" 262 : typeof obj; 263 }; 264 265 var jumper = function jumper() {
266 // private variable cache 267 // no variables are created during a jump, preventing memory leaks 268 269 var element = void 0; // element to scroll to (node) 270 271 var start = void 0; // where scroll starts (px) 272 var stop = void 0; // where scroll stops (px) 273 274 var offset = void 0; // adjustment from the stop position (px) 275 var easing = void 0; // easing function (function) 276 var a11y = void 0; // accessibility support flag (boolean) 277 278 var distance = void 0; // distance of scroll (px) 279 var duration = void 0; // scroll duration (ms) 280 281 var timeStart = void 0; // time scroll started (ms) 282 var timeElapsed = void 0; // time spent scrolling thus far (ms) 283 284 var next = void 0; // next scroll position (px) 285 286 var callback = void 0; // to call when done scrolling (function) 287 288 // scroll position helper 289 290 function location() { 291 return window.scrollY || window.pageYOffset; 292 } 293 294 // element offset helper 295 296 function top(element) { 297 return element.getBoundingClientRect().top + start; 298 } 299 300 // rAF loop helper 301 302 function loop(timeCurrent) { 303 // store time scroll started, if not started already 304 if (!timeStart) { 305 timeStart = timeCurrent; 306 } 307 308 // determine time spent scrolling so far 309 timeElapsed = timeCurrent - timeStart; 310 311 // calculate next scroll position 312 next = easing(timeElapsed, start, distance, duration); 313 314 // scroll to it 315 window.scrollTo(0, next); 316 317 // check progress 318 timeElapsed < duration 319 ? window.requestAnimationFrame(loop) // continue scroll loop 320 : done(); // scrolling is done 321 } 322 323 // scroll finished helper 324 325 function done() { 326 // account for rAF time rounding inaccuracies 327 window.scrollTo(0, start + distance); 328 329 // if scrolling to an element, and accessibility is enabled 330 if (element && a11y) { 331 // add tabindex indicating programmatic focus 332 element.setAttribute("tabindex", "-1"); 333 334 // focus the element 335 element.focus(); 336 } 337 338 // if it exists, fire the callback 339 if (typeof callback === "function") { 340 callback(); 341 } 342 343 // reset time for next jump 344 timeStart = false;
345 } 346 347 // API 348 349 function jump(target) { 350 var options = 351 arguments.length > 1 && arguments[1] !== undefined 352 ? arguments[1] 353 : {}; 354 355 // resolve options, or use defaults 356 duration = options.duration || 1000; 357 offset = options.offset || 0; 358 callback = options.callback; // "undefined" is a suitable default, and won't be called 359 easing = options.easing || easeInOutQuad; 360 a11y = options.a11y || false; 361 362 // cache starting position 363 start = location(); 364 365 // resolve target 366 switch ( 367 typeof target === "undefined" ? "undefined" : _typeof(target) 368 ) { 369 // scroll from current position 370 case "number": 371 element = undefined; // no element to scroll to 372 a11y = false; // make sure accessibility is off 373 stop = start + target; 374 break; 375 376 // scroll to element (node) 377 // bounding rect is relative to the viewport 378 case "object": 379 element = target; 380 stop = top(element); 381 break; 382 383 // scroll to element (selector) 384 // bounding rect is relative to the viewport 385 case "string": 386 element = document.querySelector(target); 387 stop = top(element); 388 break; 389 } 390 391 // resolve scroll distance, accounting for offset 392 distance = stop - start + offset; 393 394 // resolve duration 395 switch (_typeof(options.duration)) { 396 // number in ms 397 case "number": 398 duration = options.duration; 399 break; 400 401 // function passed the distance of the scroll 402 case "function": 403 duration = options.duration(distance); 404 break; 405 } 406 407 // start the loop 408 window.requestAnimationFrame(loop); 409 } 410 411 // expose only the jump method 412 return jump; 413 }; 414 415 // export singleton 416 417 var singleton = jumper(); 418 419 /* harmony default export */ __webpack_exports__["default"] = singleton; 420 421 /***/ 422 }, 423 /* 3 */ 424 /***/ function (module, exports) { 425 // removed by extract-text-webpack-plugin 426 /***/ 427 }, 428 /******/ 429 ] 430); 431
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.