(() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/js/app.js":
/*!***********************!*\
!*** ./src/js/app.js ***!
\***********************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_functions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/functions.js */ \"./src/js/modules/functions.js\");\n\r\n\r\n_modules_functions_js__WEBPACK_IMPORTED_MODULE_0__.isWebp();\r\n\r\n/*\r\nimport Swiper, { Navigation, Pagination } from 'swiper';\r\nconst swiper = new Swiper();\r\n*/\r\n\r\nconst hamburger = document.querySelector('.hamburger'),\r\n menu = document.querySelector('.menu'),\r\n closeElem = document.querySelector('.menu__close');\r\n\r\n\r\nhamburger.addEventListener('click', () =>{\r\n menu.classList.add('active');\r\n}); \r\n\r\ncloseElem.addEventListener('click', () =>{\r\n menu.classList.remove('active');\r\n}); \r\n\r\n\r\nconst counters = document.querySelectorAll('.progress__percent'),\r\nlines = document.querySelectorAll('.progress__skills span');\r\ncounters.forEach((item, i) =>{\r\nlines[i].style.width = item.innerHTML;\r\n});\n\n//# sourceURL=webpack://gulp-2022/./src/js/app.js?");
/***/ }),
/***/ "./src/js/modules/functions.js":
/*!*************************************!*\
!*** ./src/js/modules/functions.js ***!
\*************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isWebp\": () => (/* binding */ isWebp)\n/* harmony export */ });\n/* Проверка поддержки webp, добавление класса webp или no-webp для HTML */\r\nfunction isWebp() {\r\n\t// Проверка поддержки webp\r\n\tfunction testWebP(callback) {\r\n\t\tlet webP = new Image();\r\n\t\twebP.onload = webP.onerror = function () {\r\n\t\t\tcallback(webP.height == 2);\r\n\t\t};\r\n\t\twebP.src = \"data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA\";\r\n\t}\r\n\t// Добавление класса _webp или _no-webp для HTML\r\n\ttestWebP(function (support) {\r\n\t\tlet className = support === true ? 'webp' : 'no-webp';\r\n\t\tdocument.documentElement.classList.add(className);\r\n\t});\r\n}\n\n//# sourceURL=webpack://gulp-2022/./src/js/modules/functions.js?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./src/js/app.js");
/******/
/******/ })()
;<code lang="javascript">
import * as flsFunctions from "./modules/functions.js";
flsFunctions.isWebp();
/*
import Swiper, { Navigation, Pagination } from 'swiper';
const swiper = new Swiper();
*/
const hamburger = document.querySelector('.hamburger'),
menu = document.querySelector('.menu'),
closeElem = document.querySelector('.menu__close');
hamburger.addEventListener('click', () =>{
menu.classList.add('active');
});
closeElem.addEventListener('click', () =>{
menu.classList.remove('active');
});
const counters = document.querySelectorAll('.progress__percent'),
lines = document.querySelectorAll('.progress__skills span');
counters.forEach((item, i) =>{
lines[i].style.width = item.innerHTML;
});<code lang="php">
<?php
add_action( 'wp_enqueue_scripts', 'portfolio_style' );
function portfolio_style() {
wp_enqueue_style( 'main-style', get_stylesheet_uri() );
wp_enqueue_script( 'script-name', get_template_directory_uri() . '/assets/js/app.min.js', array(), '1.0.0', true );
}
</code>
</code>