/* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "./src/js/buttonhighlights.js": /*!************************************!*\ !*** ./src/js/buttonhighlights.js ***! \************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"activateButton\": () => (/* binding */ activateButton),\n/* harmony export */ \"deactivateButton\": () => (/* binding */ deactivateButton)\n/* harmony export */ });\n// highlights nav button based on mouse hover \r\n\r\nconst navButtons = document.querySelectorAll(\".nav-link\");\r\n\r\n// turns on highlight\r\nfunction activateButton() {\r\n this.setAttribute('class', this.getAttribute(\"class\") + ' active');\r\n}\r\n\r\n//turns off highlight\r\nfunction deactivateButton() {\r\n this.setAttribute('class', \"nav-link fw-bold\");\r\n}\n\n//# sourceURL=webpack://js-restaurant/./src/js/buttonhighlights.js?"); /***/ }), /***/ "./src/js/contact.js": /*!***************************!*\ !*** ./src/js/contact.js ***! \***************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"makeContactWindow\": () => (/* binding */ makeContactWindow)\n/* harmony export */ });\nfunction makeContactWindow() {\r\n // makes divs\r\n const columnOne = document.createElement('div');\r\n const c1img = document.createElement('img');\r\n const columnTwo = document.createElement('div');\r\n const c21 = document.createElement('div');\r\n const c21Text = document.createElement('div');\r\n const c22 = document.createElement('div');\r\n const c22Text = document.createElement('span');\r\n const c23 = document.createElement('a');\r\n const columnThree = document.createElement('div');\r\n const c3img = document.createElement('img');\r\n\r\n // sets attributes\r\n columnOne.id = \"column-one-contact\";\r\n columnTwo.id = \"column-two-contact\";\r\n columnThree.id = \"column-three-contact\";\r\n c1img.title=\"Photo by Steve Richey on Unsplash\"\r\n c1img.src = \"../src/img/mappin.jpg\"\r\n c3img.title=\"Photo by karl muscat on Unsplash\"\r\n c3img.src = \"../src/img/morefishies.jpg\";\r\n c21Text.textContent = \"contact dee's\";\r\n c21.id = \"c21-contact\";\r\n c22.id = \"c22-contact\";\r\n c22Text.innerHTML = \"You can find us at 123 Joseph Momas Pl., Springfield, IL
(two streets down from the nuclear power plant)\" + \"

\" + \"We are also available over the phone at 1-800-867-5309 and by email at \";\r\n c23.textContent = \"inquiries@deesfish.net\"\r\n const email = \"inquiries@deesfish.net\";\r\n c23.setAttribute('href', \"mailto:\" + email);\r\n\r\n // appends divs\r\n const cardBody = document.querySelector(\".card-body\");\r\n cardBody.appendChild(columnOne);\r\n columnOne.appendChild(c1img);\r\n cardBody.appendChild(columnTwo);\r\n columnTwo.appendChild(c21);\r\n c21.appendChild(c21Text);\r\n columnTwo.appendChild(c22);\r\n c22.appendChild(c22Text);\r\n c22.appendChild(c23);\r\n cardBody.appendChild(columnThree);\r\n columnThree.appendChild(c3img);\r\n}\n\n//# sourceURL=webpack://js-restaurant/./src/js/contact.js?"); /***/ }), /***/ "./src/js/home.js": /*!************************!*\ !*** ./src/js/home.js ***! \************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"makeHomeWindow\": () => (/* binding */ makeHomeWindow)\n/* harmony export */ });\nfunction makeHomeWindow() {\r\n // makes divs\r\n const columnOne = document.createElement('div');\r\n const columnTwo = document.createElement('div');\r\n const columnThree = document.createElement('div');\r\n const columnThreeImage = document.createElement('img');\r\n const squareOne = document.createElement('div');\r\n const squareTwo = document.createElement('div');\r\n const squareTwoText = document.createElement('div');\r\n const sqTwoSpanOne = document.createElement('span');\r\n const sqTwoSpanTwo = document.createElement('span');\r\n const sqTwoSpanThree = document.createElement('span');\r\n const sqTwoSubtitle = document.createElement('p');\r\n const squareFour = document.createElement('div');\r\n const sqFourImage = document.createElement('img');\r\n const squareFive = document.createElement('div');\r\n\r\n // sets attributes\r\n columnOne.id = \"column-one-home\";\r\n columnTwo.id = \"column-two-home\";\r\n columnThree.id = \"column-three-home\";\r\n columnThreeImage.title = \"Photo by Jonas Allert on Unsplash\"\r\n columnThreeImage.src = \"../src/img/fishies.jpg\"\r\n squareOne.id = \"squareone\";\r\n squareTwo.id = \"squaretwo\";\r\n sqTwoSpanTwo.id = \"centerspantwo\";\r\n sqTwoSpanOne.textContent = \"Welcome to \";\r\n sqTwoSpanTwo.textContent = \"dee's\";\r\n sqTwoSpanThree.textContent = \"!\";\r\n sqTwoSubtitle.textContent = \"Home of the Local Fresh Catch Special\"\r\n squareFour.id = \"squarefour\";\r\n sqFourImage.title=\"Image by 8photo on Freepik\"\r\n sqFourImage.src = \"../src/img/panfrying.jpg\"\r\n squareFive.id = 'squarefive';\r\n squareFive.textContent = \"Here at Dee's, we pride ourselves on our freshness. From our daily local catch to our award-winning nuts, all ingredients are sourced right on site, and cooked to perfection by our Michelin-certified chefs. This isn't just any fish restaurant! We strive to provide you a gourmet experience like no other. Come down to Dee's today to see what all the hype is about!\"\r\n\r\n // appends divs to DOM\r\n const cardBody = document.querySelector(\".card-body\");\r\n cardBody.appendChild(columnOne);\r\n columnOne.appendChild(squareOne);\r\n cardBody.appendChild(columnTwo);\r\n columnTwo.appendChild(squareTwo);\r\n squareTwo.appendChild(squareTwoText)\r\n squareTwoText.appendChild(sqTwoSpanOne);\r\n squareTwoText.appendChild(sqTwoSpanTwo);\r\n squareTwoText.appendChild(sqTwoSpanThree);\r\n squareTwoText.appendChild(sqTwoSubtitle);\r\n cardBody.appendChild(columnThree);\r\n columnThree.appendChild(columnThreeImage);\r\n columnOne.appendChild(squareFour);\r\n squareFour.appendChild(sqFourImage);\r\n columnTwo.appendChild(squareFive);\r\n}\n\n//# sourceURL=webpack://js-restaurant/./src/js/home.js?"); /***/ }), /***/ "./src/js/index.js": /*!*************************!*\ !*** ./src/js/index.js ***! \*************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _home__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./home */ \"./src/js/home.js\");\n/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./menu */ \"./src/js/menu.js\");\n/* harmony import */ var _contact__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contact */ \"./src/js/contact.js\");\n/* harmony import */ var _buttonhighlights__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./buttonhighlights */ \"./src/js/buttonhighlights.js\");\n/* harmony import */ var _resizebody__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./resizebody */ \"./src/js/resizebody.js\");\n// imports modules\n\n\n\n\n\n\nconst style = (() => {\n\n // initiates divs\n function init () {\n // creates overlay\n const coverContainer = document.createElement('div');\n coverContainer.className = \"cover-container d-flex w-100 h-100 p-3 mx-auto flex-column\";\n \n // appends overlay to \"content\" div\n document.getElementById(\"content\").appendChild(coverContainer);\n document.getElementById(\"content\").className = \"d-flex text-center text-bg-dark\";\n\n // header encapsulation div\n const headerDiv = document.createElement('div');\n headerDiv.className = \"headerdiv w-100 mx-auto\";\n coverContainer.appendChild(headerDiv);\n\n // creates header div\n const pageHeader = document.createElement('header');\n pageHeader.className = \"mb-3 pageheader\";\n headerDiv.appendChild(pageHeader);\n\n // creates flexbox for the logo\n const logoFlex = document.createElement('div');\n logoFlex.id = 'logobox';\n pageHeader.appendChild(logoFlex);\n\n // creates logo image to go inside logo flexbox\n const logo = document.createElement('img');\n logo.id = \"logo\";\n logo.src = \"../src/img/logo.png\";\n logoFlex.appendChild(logo);\n\n // creates text to go inside logo flexbox\n const logoText = document.createElement('h3');\n logoText.id = \"logotext\"\n logoText.className = \"float-md-start mb-0\";\n logoText.textContent = \"dee's fish house\";\n logoFlex.appendChild(logoText);\n \n // refreshes the page if logo flexbox clicked\n logoFlex.onclick = window.location.reload;\n\n // creates navigation bar to contain navigation buttons\n const pageHeaderNav = document.createElement('nav');\n pageHeaderNav.className = \"nav nav-masthead justify-content-center float-md-end\";\n pageHeader.appendChild(pageHeaderNav);\n\n // creates Home button on navigation bar\n const button1 = document.createElement('a');\n button1.className = \"nav-link fw-bold\";\n button1.textContent = \"Home\";\n pageHeaderNav.appendChild(button1);\n // assigns listener to change out the button highlights and to \"fetch\" a new window\n button1.onclick = () => {\n if (prevButton != button1) {\n _buttonhighlights__WEBPACK_IMPORTED_MODULE_3__.deactivateButton.call(prevButton);\n _buttonhighlights__WEBPACK_IMPORTED_MODULE_3__.activateButton.call(button1);\n prevButton = button1;\n popupWindow('home');\n }\n }\n\n // creates Menu button on navigation bar\n const button2 = document.createElement('a');\n button2.className = \"nav-link fw-bold\";\n button2.textContent = \"Menu\";\n pageHeaderNav.appendChild(button2);\n // assigns listener to change out the button highlights and to \"fetch\" a new window\n button2.onclick = () => {\n if (prevButton != button2) {\n _buttonhighlights__WEBPACK_IMPORTED_MODULE_3__.deactivateButton.call(prevButton);\n _buttonhighlights__WEBPACK_IMPORTED_MODULE_3__.activateButton.call(button2);\n prevButton = button2;\n popupWindow('menu');\n }\n }\n\n // creates Contact button on navigation bar\n const button3 = document.createElement('a');\n button3.className = \"nav-link fw-bold\";\n button3.textContent = \"Contact\";\n pageHeaderNav.appendChild(button3);\n // assigns listener to change out the button highlights and to \"fetch\" a new window\n button3.onclick = () => {\n if (prevButton != button3) {\n _buttonhighlights__WEBPACK_IMPORTED_MODULE_3__.deactivateButton.call(prevButton);\n _buttonhighlights__WEBPACK_IMPORTED_MODULE_3__.activateButton.call(button3);\n prevButton = button3;\n popupWindow('contact');\n }\n }\n\n // modal window popup\n function popupWindow(location) { \n\n // if there's a window open already\n if (coverContainer.children[1]) {\n const cardBody = document.querySelector(\".card-body\");\n // dump the content\n while (cardBody.firstChild) {\n cardBody.removeChild(cardBody.firstChild);\n }\n }\n\n else {\n // sets up the popup\n // makes divs\n const popupCard = document.createElement('div');\n const cardBody = document.createElement('div');\n \n // sets attributes\n popupCard.className = \"card h-100\";\n cardBody.setAttribute('class', \"card-body\");\n\n // appends divs to DOM\n coverContainer.appendChild(popupCard);\n popupCard.appendChild(cardBody);\n }\n\n // if home button clicked\n if (location === 'home') {\n (0,_home__WEBPACK_IMPORTED_MODULE_0__.makeHomeWindow)();\n }\n\n // if menu button clicked\n if (location === 'menu') {\n (0,_menu__WEBPACK_IMPORTED_MODULE_1__.makeMenuWindow)();\n }\n\n if (location === 'contact') {\n (0,_contact__WEBPACK_IMPORTED_MODULE_2__.makeContactWindow)();\n }\n }\n\n // on initializing, defaults to Home\n _buttonhighlights__WEBPACK_IMPORTED_MODULE_3__.activateButton.call(button1);\n let prevButton = button1;\n popupWindow('home');\n \n // resizes the webpage to be the size of the screen pre-emptively\n (0,_resizebody__WEBPACK_IMPORTED_MODULE_4__.resizeBody)();\n\n // then makes listener if the user resizes window later to do the same\n window.onresize = _resizebody__WEBPACK_IMPORTED_MODULE_4__.resizeBody;\n }\n\n // returns init to be available globally\n return {\n init\n }\n})();\n\n// calls on page load\nstyle.init();\n\n//# sourceURL=webpack://js-restaurant/./src/js/index.js?"); /***/ }), /***/ "./src/js/menu.js": /*!************************!*\ !*** ./src/js/menu.js ***! \************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"makeMenuWindow\": () => (/* binding */ makeMenuWindow)\n/* harmony export */ });\nfunction makeMenuWindow() {\r\n // makes divs\r\n const columnOne = document.createElement('div');\r\n const colOneOne = document.createElement('div');\r\n const colOneTwo = document.createElement('div');\r\n const c12Item = document.createElement('div');\r\n const c12Price = document.createElement('div');\r\n const colOneThree = document.createElement('div');\r\n const c13Item = document.createElement('div');\r\n const c13Price = document.createElement('div');\r\n const colOneFour = document.createElement('div');\r\n const c14Image = document.createElement('img');\r\n const columnTwo = document.createElement('div');\r\n const columnTwoHeader = document.createElement('div');\r\n const columnTwoContent = document.createElement('div');\r\n const c22 = document.createElement('div');\r\n const c22Item = document.createElement('div');\r\n const c22Price = document.createElement('div');\r\n const c23 = document.createElement('div');\r\n const c23Item = document.createElement('div');\r\n const c23Price = document.createElement('div');\r\n const c24 = document.createElement('div');\r\n const c24Item = document.createElement('div');\r\n const c24Price = document.createElement('div');\r\n const c25 = document.createElement('div');\r\n const c25Item = document.createElement('div');\r\n const c25Price = document.createElement('div');\r\n const columnThree = document.createElement('div');\r\n const c31 = document.createElement('div');\r\n const columnThreeContent = document.createElement('div');\r\n const c32 = document.createElement('div');\r\n const c32Item = document.createElement('div');\r\n const c32Price = document.createElement('div'); \r\n const c33 = document.createElement('div');\r\n const c33Item = document.createElement('div');\r\n const c33Price = document.createElement('div');\r\n const c34 = document.createElement('div');\r\n const c34Item = document.createElement('div');\r\n const c34Price = document.createElement('div');\r\n const c35 = document.createElement('div');\r\n const c35Item = document.createElement('div');\r\n const c35Price = document.createElement('div');\r\n\r\n // sets attributes\r\n columnOne.id = \"column-one-menu\";\r\n columnTwo.id = \"column-two-menu\";\r\n columnThree.id = \"column-three-menu\";\r\n c12Item.textContent = \"Fresh oysters (12x)\";\r\n c12Price.textContent = \"$19.99\";\r\n c13Item.textContent = \"Cedar plank smoked Terriyaki Salmon with Asian stir fry over white rice\";\r\n c13Price.textContent = \"$29.99\";\r\n c14Image.title = \"Photo by Alice Pasqual on Unsplash\";\r\n c14Image.src = \"../src/img/salmon.jpg\";\r\n c14Image.id = \"c14image\";\r\n columnTwoHeader.textContent = \"menu\";\r\n columnTwoHeader.id = \"columnTwoHeader\";\r\n columnTwoContent.id = \"columnTwoContent\";\r\n c22Item.textContent = \"Beer-battered Fish and Chips\";\r\n c22Price.textContent = \"$19.99\";\r\n c23Item.textContent = \"Baja-style fish tacos (3x)\";\r\n c23Price.textContent = \"$14.99\";\r\n c24Item.textContent = \"Local Sandabs with House Fries and Tartar Sauce\";\r\n c24Price.textContent = \"$24.99\";\r\n c25Item.textContent = \"Seared Ahi Tuna with Asian fusion salad over Japanese-style rice\";\r\n c25Price.textContent = \"$29.99\";\r\n columnThreeContent.id = \"columnThreeContent\";\r\n c32Item.textContent = \"Baked Tilapia with zesty lemon over cauliflower rice and greens\";\r\n c32Price.textContent = \"$24.99\";\r\n c33Item.textContent = \"Halibut with scalloped potatoes and green beans\";\r\n c33Price.textContent = \"$24.99\";\r\n c34Item.textContent = \"Chef's Special\";\r\n c34Price.textContent = \"$29.99\";\r\n c35Item.textContent = \"Catch of the Day\";\r\n c35Price.textContent = \"varies\";\r\n\r\n // appends divs to DOM\r\n const cardBody = document.querySelector(\".card-body\");\r\n cardBody.appendChild(columnOne);\r\n columnOne.appendChild(colOneOne);\r\n columnOne.appendChild(colOneTwo);\r\n colOneTwo.appendChild(c12Item);\r\n colOneTwo.appendChild(c12Price);\r\n columnOne.appendChild(colOneThree);\r\n colOneThree.appendChild(c13Item);\r\n colOneThree.appendChild(c13Price);\r\n columnOne.appendChild(colOneFour);\r\n colOneFour.appendChild(c14Image);\r\n cardBody.appendChild(columnTwo);\r\n columnTwo.appendChild(columnTwoHeader);\r\n columnTwo.appendChild(columnTwoContent);\r\n columnTwoContent.appendChild(c22);\r\n c22.appendChild(c22Item);\r\n c22.appendChild(c22Price);\r\n columnTwoContent.appendChild(c23);\r\n c23.appendChild(c23Item);\r\n c23.appendChild(c23Price);\r\n columnTwoContent.appendChild(c24);\r\n c24.appendChild(c24Item);\r\n c24.appendChild(c24Price);\r\n columnTwoContent.appendChild(c25);\r\n c25.appendChild(c25Item);\r\n c25.appendChild(c25Price);\r\n cardBody.appendChild(columnThree);\r\n columnThree.appendChild(c31);\r\n columnThree.appendChild(columnThreeContent);\r\n columnThreeContent.appendChild(c32);\r\n c32.appendChild(c32Item);\r\n c32.appendChild(c32Price);\r\n columnThreeContent.appendChild(c33);\r\n c33.appendChild(c33Item);\r\n c33.appendChild(c33Price);\r\n columnThreeContent.appendChild(c34);\r\n c34.appendChild(c34Item);\r\n c34.appendChild(c34Price);\r\n columnThreeContent.appendChild(c35);\r\n c35.appendChild(c35Item);\r\n c35.appendChild(c35Price);\r\n}\n\n//# sourceURL=webpack://js-restaurant/./src/js/menu.js?"); /***/ }), /***/ "./src/js/resizebody.js": /*!******************************!*\ !*** ./src/js/resizebody.js ***! \******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"resizeBody\": () => (/* binding */ resizeBody)\n/* harmony export */ });\n// resizes the body of the webpage to match screen height when user adjusts it - with offsets for padding and margins\r\nfunction resizeBody() {\r\n const headerHeight = document.querySelector(\".headerdiv\").offsetHeight + 16;\r\n const newCardHeight = window.innerHeight - headerHeight - 16;\r\n document.querySelector(\".card\").setAttribute(\"style\", \"height: \" + newCardHeight + \"px!important\");\r\n\r\n const newCoverContainerHeight = window.innerHeight;\r\n document.querySelector(\".cover-container\").setAttribute(\"style\", \"height: \" + newCoverContainerHeight + \"px!important\");\r\n \r\n document.getElementById(\"content\").setAttribute(\"style\", \"height: \" + window.innerHeight +\"px;!important\");\r\n\r\n}\n\n//# sourceURL=webpack://js-restaurant/./src/js/resizebody.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/index.js"); /******/ /******/ })() ;