UNPKG

@meese-os/old-site

Version:
926 lines (803 loc) 1.91 MB
/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "../../common/temp/node_modules/.pnpm/@react-hook+event@1.2.6/node_modules/@react-hook/event/dist/module/index.js": /*!************************************************************************************************************************!*\ !*** ../../common/temp/node_modules/.pnpm/@react-hook+event@1.2.6/node_modules/@react-hook/event/dist/module/index.js ***! \************************************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); function useEvent(target, type, listener, cleanup) { const storedListener = react__WEBPACK_IMPORTED_MODULE_0__.useRef(listener); const storedCleanup = react__WEBPACK_IMPORTED_MODULE_0__.useRef(cleanup); react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { storedListener.current = listener; storedCleanup.current = cleanup; }); react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { const targetEl = target && 'current' in target ? target.current : target; if (!targetEl) return; let didUnsubscribe = 0; function listener(...args) { if (didUnsubscribe) return; storedListener.current.apply(this, args); } targetEl.addEventListener(type, listener); const cleanup = storedCleanup.current; return () => { didUnsubscribe = 1; targetEl.removeEventListener(type, listener); cleanup && cleanup(); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [target, type]); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useEvent); /***/ }), /***/ "../../common/temp/node_modules/.pnpm/@react-hook+latest@1.0.3/node_modules/@react-hook/latest/dist/module/index.js": /*!**************************************************************************************************************************!*\ !*** ../../common/temp/node_modules/.pnpm/@react-hook+latest@1.0.3/node_modules/@react-hook/latest/dist/module/index.js ***! \**************************************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); const useLatest = current => { const storedValue = react__WEBPACK_IMPORTED_MODULE_0__.useRef(current); react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => { storedValue.current = current; }); return storedValue; }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useLatest); /***/ }), /***/ "../../common/temp/node_modules/.pnpm/@react-hook+throttle@2.2.0/node_modules/@react-hook/throttle/dist/module/index.js": /*!******************************************************************************************************************************!*\ !*** ../../common/temp/node_modules/.pnpm/@react-hook+throttle@2.2.0/node_modules/@react-hook/throttle/dist/module/index.js ***! \******************************************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ useThrottle: () => (/* binding */ useThrottle), /* harmony export */ useThrottleCallback: () => (/* binding */ useThrottleCallback) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _react_hook_latest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hook/latest */ "../../common/temp/node_modules/.pnpm/@react-hook+latest@1.0.3/node_modules/@react-hook/latest/dist/module/index.js"); const perf = typeof performance !== 'undefined' ? performance : Date; const now = () => perf.now(); function useThrottleCallback(callback, fps = 30, leading = false) { const storedCallback = (0,_react_hook_latest__WEBPACK_IMPORTED_MODULE_1__["default"])(callback); const ms = 1000 / fps; const prev = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0); const trailingTimeout = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); const clearTrailing = () => trailingTimeout.current && clearTimeout(trailingTimeout.current); const deps = [fps, leading, storedCallback]; // Reset any time the deps change function _ref() { prev.current = 0; clearTrailing(); } react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => _ref, deps); return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function () { // eslint-disable-next-line prefer-rest-params const args = arguments; const rightNow = now(); const call = () => { prev.current = rightNow; clearTrailing(); storedCallback.current.apply(null, args); }; const current = prev.current; // leading if (leading && current === 0) return call(); // body if (rightNow - current > ms) { if (current > 0) return call(); prev.current = rightNow; } // trailing clearTrailing(); trailingTimeout.current = setTimeout(() => { call(); prev.current = 0; }, ms); }, deps); } function useThrottle(initialState, fps, leading) { const state = react__WEBPACK_IMPORTED_MODULE_0__.useState(initialState); return [state[0], useThrottleCallback(state[1], fps, leading)]; } /***/ }), /***/ "../../common/temp/node_modules/.pnpm/@react-hook+window-size@3.1.1/node_modules/@react-hook/window-size/throttled/dist/module/index.js": /*!**********************************************************************************************************************************************!*\ !*** ../../common/temp/node_modules/.pnpm/@react-hook+window-size@3.1.1/node_modules/@react-hook/window-size/throttled/dist/module/index.js ***! \**********************************************************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ useWindowHeight: () => (/* binding */ useWindowHeight), /* harmony export */ useWindowSize: () => (/* binding */ useWindowSize), /* harmony export */ useWindowWidth: () => (/* binding */ useWindowWidth) /* harmony export */ }); /* harmony import */ var _react_hook_throttle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hook/throttle */ "../../common/temp/node_modules/.pnpm/@react-hook+throttle@2.2.0/node_modules/@react-hook/throttle/dist/module/index.js"); /* harmony import */ var _react_hook_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hook/event */ "../../common/temp/node_modules/.pnpm/@react-hook+event@1.2.6/node_modules/@react-hook/event/dist/module/index.js"); /* eslint-disable import/no-extraneous-dependencies */ const emptyObj = {}; const win = typeof window === 'undefined' ? null : window; const wv = win && typeof win.visualViewport !== 'undefined' ? win.visualViewport : null; const getSize = () => [document.documentElement.clientWidth, document.documentElement.clientHeight]; const useWindowSize = function (options) { if (options === void 0) { options = emptyObj; } const { fps, leading, initialWidth = 0, initialHeight = 0 } = options; const [size, setThrottledSize] = (0,_react_hook_throttle__WEBPACK_IMPORTED_MODULE_0__.useThrottle)( /* istanbul ignore next */ typeof document === 'undefined' ? [initialWidth, initialHeight] : getSize, fps, leading); const setSize = () => setThrottledSize(getSize); (0,_react_hook_event__WEBPACK_IMPORTED_MODULE_1__["default"])(win, 'resize', setSize); // @ts-expect-error (0,_react_hook_event__WEBPACK_IMPORTED_MODULE_1__["default"])(wv, 'resize', setSize); (0,_react_hook_event__WEBPACK_IMPORTED_MODULE_1__["default"])(win, 'orientationchange', setSize); return size; }; const useWindowHeight = options => useWindowSize(options)[1]; const useWindowWidth = options => useWindowSize(options)[0]; /***/ }), /***/ "./lettercrap.js": /*!***********************!*\ !*** ./lettercrap.js ***! \***********************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createLettercrap: () => (/* binding */ createLettercrap) /* harmony export */ }); // Customized from https://github.com/ajmeese7/lettercrap function createLettercrap() { var lettercrapElement = document.querySelector(".lettercrap"); var text = lettercrapElement.getAttribute("data-lettercrap-text"); var imageURL = createImageURL(text); lettercrapElement.setAttribute("data-letter-crap", imageURL); initElement(lettercrapElement); } var charWidth = 6; var charHeight = 10; var updateInterval = 150; var likelihoodOfReplacingWord = 0.05; var likelihoodOfChangingExistingText = 0.1; var randomChoice = function randomChoice(x) { return x[Math.floor(Math.random() * x.length)]; }; function createImageURL(text) { var canvas = document.createElement("canvas"); var context = canvas.getContext("2d"); var fontsize = measureTextBinaryMethod(text, "monospace", 0, 10, canvas.width); canvas.height = fontsize + 1; canvas.width = context.measureText(text).width + 2; context.fillText(text, 1, fontsize); return canvas.toDataURL(); // https://jsfiddle.net/be6ppdre/29/ function measureTextBinaryMethod(text, fontface, min, max, desiredWidth) { if (max - min < 1) return min; var test = min + (max - min) / 2; // Find half interval context.font = "".concat(test, "px ").concat(fontface); var measureTest = context.measureText(text).width; var condition = measureTest > desiredWidth; return measureTextBinaryMethod(text, fontface, condition ? min : test, condition ? test : max, desiredWidth); } } function initElement(element) { var img = new Image(); img.onload = function () { return render(element, img, null); }; img.src = element.getAttribute("data-letter-crap"); img.crossOrigin = "anonymous"; } function render(element, image, prev) { var appWindow = document.getElementsByClassName("Window_old-website")[0]; if (!appWindow) return; var parentElement = window.getComputedStyle(element.parentNode, null); var newWidth = parseInt(parentElement.width); if (element.hasAttribute("data-lettercrap-aspect-ratio")) { var aspect = parseFloat(element.getAttribute("data-lettercrap-aspect-ratio")); element.style.height = newWidth * aspect + "px"; } var newHeight = parseInt(element.style.height); var words = element.hasAttribute("data-lettercrap-words") ? element.getAttribute("data-lettercrap-words").split(" ") : []; var letters = element.hasAttribute("data-lettercrap-letters") ? element.getAttribute("data-lettercrap-letters") : "0101010101_"; var textCondition = prev && prev.width === newWidth && prev.height === newHeight; var text = getTextContentWithImageAtSize(image, newWidth, newHeight, textCondition ? prev.text : null, words, letters); var lettercrap = document.querySelector(".lettercrap"); if (lettercrap) { lettercrap.innerHTML = text; var data = { width: newWidth, height: newHeight, text: text }; setTimeout(function () { return render(element, image, data); }, updateInterval); } } function getTextContentWithImageAtSize(image, width, height, existingText, words, letters) { existingText = existingText ? existingText.replace(/\r?\n|\r/g, "") : null; var shouldReplaceExisting = function shouldReplaceExisting() { return !existingText || Math.random() < likelihoodOfChangingExistingText; }; var canvas = document.createElement("canvas"); canvas.width = parseInt(width / charWidth); canvas.height = parseInt(height / charHeight); canvas.getContext("2d").drawImage(image, 0, 0, canvas.width, canvas.height); if (canvas.getContext("2d").canvas.width === 0) return; var data = canvas.getContext("2d").getImageData(0, 0, canvas.width, canvas.height); var chars = ""; var startOfFilledInSequence = 0; var i = 0; for (var y = 0; y < data.height; y++) { for (var x = 0; x < data.width; x++) { var black = data.data[i * 4] < 120; var transparent = data.data[i * 4 + 3] < 50; if (black && !transparent) { if (startOfFilledInSequence === null) startOfFilledInSequence = i; chars += shouldReplaceExisting() ? randomChoice(letters) : existingText[i]; if (words.length > 0 && Math.random() < likelihoodOfReplacingWord && shouldReplaceExisting()) { var word = randomChoice(words); if (i + 1 - startOfFilledInSequence >= word.length) { chars = chars.substring(0, chars.length - word.length) + word; } } } else { chars += " "; startOfFilledInSequence = null; } i++; } chars += "\n"; startOfFilledInSequence = null; } return chars; } /***/ }), /***/ "./src/App.js": /*!********************!*\ !*** ./src/App.js ***! \********************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var bootstrap_dist_css_bootstrap_min_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! bootstrap/dist/css/bootstrap.min.css */ "../../common/temp/node_modules/.pnpm/bootstrap@5.3.1/node_modules/bootstrap/dist/css/bootstrap.min.css"); /* harmony import */ var bootstrap_dist_js_bootstrap_bundle_min__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bootstrap/dist/js/bootstrap.bundle.min */ "../../common/temp/node_modules/.pnpm/bootstrap@5.3.1/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"); /* harmony import */ var bootstrap_dist_js_bootstrap_bundle_min__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(bootstrap_dist_js_bootstrap_bundle_min__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editable-stuff/configurations.json */ "./src/editable-stuff/configurations.json"); /* harmony import */ var _App_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./App.css */ "./src/App.css"); /* harmony import */ var _components_home_AboutMe__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/home/AboutMe */ "./src/components/home/AboutMe.jsx"); /* harmony import */ var _components_home_Articles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/home/Articles */ "./src/components/home/Articles.jsx"); /* harmony import */ var _components_Footer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/Footer */ "./src/components/Footer.jsx"); /* harmony import */ var _components_home_MainBody__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/home/MainBody */ "./src/components/home/MainBody.jsx"); /* harmony import */ var _components_Navbar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/Navbar */ "./src/components/Navbar.jsx"); /* harmony import */ var _components_home_Project__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/home/Project */ "./src/components/home/Project.jsx"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"); /** * Creates the old site application. * @param {Application} proc MeeseOS Application instance reference * @returns {React.JSX.Element} */ var App = function App(_ref) { var proc = _ref.proc; return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment, { children: [_editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_3__.showNavigationbar && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_Navbar__WEBPACK_IMPORTED_MODULE_9__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_home_MainBody__WEBPACK_IMPORTED_MODULE_8__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_home_AboutMe__WEBPACK_IMPORTED_MODULE_5__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_home_Articles__WEBPACK_IMPORTED_MODULE_6__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_home_Project__WEBPACK_IMPORTED_MODULE_10__["default"], { proc: proc }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_Footer__WEBPACK_IMPORTED_MODULE_7__["default"], {})] }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (App); /***/ }), /***/ "./src/components/Footer.jsx": /*!***********************************!*\ !*** ./src/components/Footer.jsx ***! \***********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../editable-stuff/configurations.json */ "./src/editable-stuff/configurations.json"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"); var Footer = function Footer() { return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("footer", { style: { backgroundColor: "#f5f5f5" }, className: "mt-auto py-3 text-center", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("a", { className: "text-dark", target: "_blank", rel: "noopener noreferrer", href: "https://github.com/meese-os/meeseOS/tree/master/apps/old-site", "aria-label": "Website Code", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("i", { className: "fas fa-code" }) }), " ", "with ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("i", { className: "fas fa-heart" }), " by", " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("a", { className: "badge bg-dark", target: "_blank", rel: "noopener noreferrer", href: "https://github.com/ajmeese7", "aria-label": "My GitHub", children: [_editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_1__.FirstName, " ", _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_1__.LastName] }), " ", "using ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("i", { className: "fab fa-react" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p", { children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("small", { className: "text-muted", children: [" ", "Project code is open source. Feel free to fork and make your own version."] }) })] }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Footer); /***/ }), /***/ "./src/components/Navbar.jsx": /*!***********************************!*\ !*** ./src/components/Navbar.jsx ***! \***********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.22.11/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editable-stuff/configurations.json */ "./src/editable-stuff/configurations.json"); /* harmony import */ var _home_NavItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./home/NavItem */ "./src/components/home/NavItem.jsx"); /* harmony import */ var _editable_stuff_resume_pdf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../editable-stuff/resume.pdf */ "./src/editable-stuff/resume.pdf"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"); var Navbar = function Navbar() { var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), _useState2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState, 2), isTop = _useState2[0], setIsTop = _useState2[1]; (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { document.addEventListener("scroll", function () { var istop = window.scrollY < 200; if (istop !== isTop) setIsTop(istop); }); }, [isTop]); return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("nav", { className: "navbar navbar-expand-md fixed-top navbar-light ".concat(isTop ? "bg-transparent" : "bg-gradient", " "), children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("a", { className: "navbar-brand ms-2", href: "#home", children: "<".concat(_editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.FirstName, " />") }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("button", { className: "navbar-toggler me-3", type: "button", "data-bs-toggle": "collapse", "data-bs-target": "#navbarToggler", "aria-controls": "navbarToggler", "aria-expanded": "false", "aria-label": "Toggle navigation", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("span", { className: "navbar-toggler-icon" }) }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { className: "collapse navbar-collapse", id: "navbarToggler", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("ul", { className: "navbar-nav mr-auto ms-2 mt-2 mt-lg-0", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_home_NavItem__WEBPACK_IMPORTED_MODULE_3__["default"], { name: "About", href: "#aboutme" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_home_NavItem__WEBPACK_IMPORTED_MODULE_3__["default"], { name: "Articles", href: "#articles" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_home_NavItem__WEBPACK_IMPORTED_MODULE_3__["default"], { name: "Popular", href: "#popularProjects" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_home_NavItem__WEBPACK_IMPORTED_MODULE_3__["default"], { name: "Recent", href: "#recentProjects" }), _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.showResume && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_home_NavItem__WEBPACK_IMPORTED_MODULE_3__["default"], { name: "Resume", href: _editable_stuff_resume_pdf__WEBPACK_IMPORTED_MODULE_4__ })] }) })] }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Navbar); /***/ }), /***/ "./src/components/home/AboutMe.jsx": /*!*****************************************!*\ !*** ./src/components/home/AboutMe.jsx ***! \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.22.11/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../editable-stuff/configurations.json */ "./src/editable-stuff/configurations.json"); /* harmony import */ var _react_hook_window_size_throttled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @react-hook/window-size/throttled */ "../../common/temp/node_modules/.pnpm/@react-hook+window-size@3.1.1/node_modules/@react-hook/window-size/throttled/dist/module/index.js"); /* harmony import */ var _editable_stuff_resume_pdf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../editable-stuff/resume.pdf */ "./src/editable-stuff/resume.pdf"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"); var AboutMe = function AboutMe() { var _useWindowSize = (0,_react_hook_window_size_throttled__WEBPACK_IMPORTED_MODULE_5__.useWindowSize)({ fps: 60 }), _useWindowSize2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useWindowSize, 1), width = _useWindowSize2[0]; var profilePic = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", { className: "border border-secondary rounded-circle w-100", src: _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_1__.picture, alt: "profilepicture" }); return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { id: "aboutme", className: "jumbotron jumbotron-fluid m-0 pb-0", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { className: "container container-fluid p-5", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", { className: "row", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { className: "col-5 d-none d-lg-block align-self-center", children: profilePic }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", { className: "col-lg-7", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("h1", { className: "display-4 mb-lg-5 text-center", children: _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_1__.aboutHeading }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { className: "col-7 col-md-5 d-block d-lg-none mx-auto my-4", children: profilePic }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", { className: "lead text-".concat(width < 992 ? "center" : "justify"), children: _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_1__.aboutDescription }), _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_1__.showResume && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", { className: "lead text-center", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", { className: "btn btn-outline-dark btn-lg", href: _editable_stuff_resume_pdf__WEBPACK_IMPORTED_MODULE_2__, target: "_blank", rel: "noreferrer noopener", role: "button", "aria-label": "Resume/CV", children: "Resume" }) })] })] }) }) }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AboutMe); /***/ }), /***/ "./src/components/home/ArticleCard.jsx": /*!*********************************************!*\ !*** ./src/components/home/ArticleCard.jsx ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.22.11/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "../../common/temp/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../editable-stuff/configurations.json */ "./src/editable-stuff/configurations.json"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"); var ArticleCard = function ArticleCard(_ref) { var value = _ref.value, index = _ref.index; var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("0 mints"), _useState2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState, 2), created_at = _useState2[0], setCreatedAt = _useState2[1]; var handleCreatedTime = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) { var date = new Date(value.createdAt); var nowdate = new Date(); var diff = nowdate.getTime() - date.getTime(); var hours = Math.trunc(diff / 1000 / 60 / 60); if (hours < 24) { if (hours < 1) return setCreatedAt("just now"); var measurement = hours === 1 ? "hour" : "hours"; return setCreatedAt("".concat(hours.toString(), " ").concat(measurement, " ago")); } var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var day = date.getDate(); var monthIndex = date.getMonth(); var year = date.getFullYear(); return setCreatedAt("".concat(monthNames[monthIndex], " ").concat(day, ", ").concat(year)); }, [value.createdAt]); (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { return handleCreatedTime(); }, [handleCreatedTime]); return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { className: "col-md-6 ".concat(index > _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.articlesLength - 1 ? "d-none" : ""), children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { className: "card shadow-lg p-3 mb-5 bg-white rounded", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { className: "card-body", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("a", { href: value.url, target: " _blank", className: "text-dark text-decoration-none", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("h5", { className: "card-title d-inline-block mb-3", children: [value.title, " "] }) }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", { className: "medium-image mb-2", src: value.imageUrl, alt: "Article header" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("p", { className: "card-text", children: [value.description, " "] }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("a", { href: value.url, target: " _blank", children: ["Continue reading on", " ", value.publicationName ? value.publicationName : "Medium", "..."] }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("hr", {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { className: "card-text", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("small", { className: "text-muted float-right", children: created_at }) })] }) }) }); }; ArticleCard.propTypes = { value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({ title: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string).isRequired, description: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), url: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string).isRequired, imageUrl: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), publicationName: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), createdAt: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number).isRequired }), index: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number).isRequired }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ArticleCard); /***/ }), /***/ "./src/components/home/Articles.jsx": /*!******************************************!*\ !*** ./src/components/home/Articles.jsx ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.22.11/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _react_hook_window_size_throttled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @react-hook/window-size/throttled */ "../../common/temp/node_modules/.pnpm/@react-hook+window-size@3.1.1/node_modules/@react-hook/window-size/throttled/dist/module/index.js"); /* harmony import */ var _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../editable-stuff/configurations.json */ "./src/editable-stuff/configurations.json"); /* harmony import */ var _ArticleCard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ArticleCard */ "./src/components/home/ArticleCard.jsx"); /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! axios */ "../../common/temp/node_modules/.pnpm/axios@1.5.0/node_modules/axios/lib/axios.js"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"); var articles = []; var Articles = function Articles() { var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]), _useState2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState, 2), nextArticle = _useState2[0], setNextArticle = _useState2[1]; var _useWindowSize = (0,_react_hook_window_size_throttled__WEBPACK_IMPORTED_MODULE_5__.useWindowSize)({ fps: 60 }), _useWindowSize2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useWindowSize, 1), width = _useWindowSize2[0]; // https://github.com/ajmeese7/medium-feed-json var getMediumData = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) { var url = "https://medium-feed.ajmeese7.workers.dev?next=".concat(nextArticle); axios__WEBPACK_IMPORTED_MODULE_6__["default"].get(url).then(function (response) { return response.data; }).then(function (response) { if (response.data.posts.length === 0) return; articles = articles.concat(response.data.posts); setNextArticle(response.next); })["catch"](function (error) { return console.error(error.message); })["finally"](function () { return articles = articles.sort(function (a, b) { return a.createdAt > b.createdAt ? -1 : 1; }); }); }, [nextArticle]); (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { return getMediumData(); }, [getMediumData]); if (!articles.length || !_editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.showArticles) { document.addEventListener("DOMContentLoaded", function (event) { var articlesNavItem = document.querySelectorAll("a[href*='articles']")[0]; articlesNavItem.parentNode.remove(); }); return null; } return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { id: "articles", className: "jumbotron jumbotron-fluid bg-transparent m-0 pb-0", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", { className: "container container-fluid p-".concat(width > 560 ? "5" : "4"), children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("h1", { className: "display-4 pb-4", children: "Latest Articles" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { className: "row", children: articles.map(function (article, index) { return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_ArticleCard__WEBPACK_IMPORTED_MODULE_3__["default"], { id: index, value: article, index: index }, index); }) })] }) }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Articles); /***/ }), /***/ "./src/components/home/MainBody.jsx": /*!******************************************!*\ !*** ./src/components/home/MainBody.jsx ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.22.11/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.22.11/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../editable-stuff/configurations.json */ "./src/editable-stuff/configurations.json"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var react_type_animation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-type-animation */ "../../common/temp/node_modules/.pnpm/react-type-animation@3.1.0/node_modules/react-type-animation/dist/esm/index.es.js"); /* harmony import */ var _lettercrap__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../lettercrap */ "./lettercrap.js"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "../../common/temp/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"); var MainBody = function MainBody() { /** * Combines the phrases and the delays into a single array. * @link https://stackoverflow.com/a/55387306/6456163 * @param {string[]} phrases The phrases to be typed out * @param {number} delay The delay between each phrase * @returns {(string|number)[]} The combined array of strings and numbers */ var interleave = function interleave(phrases, delay) { var _ref; return (_ref = []).concat.apply(_ref, (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(phrases.map(function (n) { return [n, delay]; }))).slice(0, -1); }; var lastName = _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.LastName.toLowerCase(); var phrases = _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.descWords.map(function (phrase) { return "let ".concat(lastName, " = '").concat(phrase, "';"); }); var typingArray = interleave(phrases, 1750); var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(new Array(_editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.icons.length).fill("socialicons")), _useState2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState, 2), hoverstatus = _useState2[0], setHoverstatus = _useState2[1]; var toggleHover = function toggleHover(data) { var newhoverStatus = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(hoverstatus); if (data.event === "enter") { newhoverStatus[data.icon.id] = "socialiconshover"; return setHoverstatus(newhoverStatus); } else if (data.event === "leave") { newhoverStatus[data.icon.id] = "socialicons"; return setHoverstatus(newhoverStatus); } }; // Runs after the render, so the DOM elements are available (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () { (0,_lettercrap__WEBPACK_IMPORTED_MODULE_5__.createLettercrap)(); }, []); return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", { id: "home", className: "title jumbotron jumbotron-fluid bg-transparent bgstyle text-light min-vh-100 d-flex align-content-center align-items-center flex-wrap m-0", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", { id: "stars" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", { className: "container container-fluid text-center", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("h1", { className: "display-1", style: { lineHeight: "1.1" }, children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", { className: "lettercrap" // TODO: Resize the font and line height to make it prettier on different screen sizes , "data-lettercrap-text": "".concat(_editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.FirstName, " ").concat(_editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.LastName), "data-lettercrap-aspect-ratio": "0.3" }) }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(react_type_animation__WEBPACK_IMPORTED_MODULE_4__.TypeAnimation, { wrapper: "p", sequence: typingArray, repeat: Infinity, className: "lead" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", { className: "p-5", id: "socialIcons", children: _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.icons === null || _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.icons === void 0 ? void 0 : _editable_stuff_configurations_json__WEBPACK_IMPORTED_MODULE_2__.icons.map(function (icon) { return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("a", { target: "_blank", rel: "noopener noreferrer", href: icon.url, "aria-label": "My ".concat(icon.image.split("-")[1]), children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("i", { className: "fab ".concat(icon.image, " fa-3x ").concat(hoverstatus[icon.id]), onMouseOver: function onMouseOver() { toggleHover({ icon: icon, event: "enter" }); }, onFocus: function onFocus() { toggleHover({ icon: icon, event: "enter" }); }, onMouseOut: function onMouseOut() { toggleHover({ icon: icon, event: "leave" }); }, onBlur: function onBlur() { toggleHover({ icon: icon, event: "leave" }); } }) }, icon.id); }) }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("a", { className: "btn btn-outline-light btn-lg", href: "#aboutme", role: "button", "aria-label": "Learn more about me", children: "More about me" })] })] }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MainBody);