diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..e5a678e46d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,18 @@ +## Describe your changes: +[//]: <> (Which files were changed? What changes were made?) + + + +## Checklist: + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my code +- [ ] I have tested the functionality of any new or updated features in the browser, if applicable +- [ ] I have added two or more people as "Reviewers" to review & merge +- [ ] If applicable, my code passes all tests + +## Bugs/Issues +- [ ] No bugs found +- [ ] Bug found + +If bug found, describe and if applicable, include error: diff --git a/.idea/fitlit-starter-kit.iml b/.idea/fitlit-starter-kit.iml new file mode 100644 index 0000000000..24643cc374 --- /dev/null +++ b/.idea/fitlit-starter-kit.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000000..03d9549ea8 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..1dcd8fb782 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..35eb1ddfbb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..31016c4c24 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + project + + $PROJECT_DIR$/node_modules/mocha + $PROJECT_DIR$ + true + bdd + + TEST + $PROJECT_DIR$/test/user-hydration-test.js + + + + + + + + + + + + + + + + + 1680448928836 + + + + + + + + + + file://$PROJECT_DIR$/src/userHydration.js + 26 + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 0ccaeef0f0..93ac3ee4e2 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,40 @@ -# FitLit Starter Kit - -The details of this project are outline in [this project spec](http://frontend.turing.io/projects/fitlit.html). - -## Setup - -1. Within your group, decide on one person to have the project repository (repo) on their GitHub account. Then, that person should fork this repo - on the top right corner of this page, click the **Fork** button. -1. Both memebers of the group should clone down the _forked_ repo. Since you don't want to name your project "activity-tracker-starter", you can use an optional argument when you run git clone (you replace the [...] with the terminal command arguments): `git clone [remote-address] [what you want to name the repo]` -1. Once you have cloned the repo, change into the directory and install the project dependencies. Run `npm install` to install project dependencies. -1. Run `npm start` in the terminal to see the HTML page (you should see some boilerplate HTML displayed on the page). `Control + C` is the command to stop running the local server. Closing the terminal without stopping the server first could allow the server to continue to run in the background and cause problems. This command is not specific to Webpack; make note of it for future use. -1. Make sure both members of your team are collaborators on the forked repo. -1. Do not run `npm audit fix --force`. This will update to the latest version of packages. We need to be using `webpack-dev-server@3.11.2` which is not the latest version. If you start to run into Webpack errors, first check that all group members are using the correct version. - -## Testing - -There is no boilerplate for testing in this starter-kit repo. You will need to set this up yourself. However, if you ran `npm install`, then the tooling you need to start testing is already installed (`mocha` and `chai`). - - -## Data Model - -**Users** - -``` -[ - { - "id": [number], - "name": [string], - "address": [string], - "email": [string], - "strideLength": [number - feet], - "dailyStepGoal": [number - steps], - "friends": [array - one-way connection to other user(s)] - }, - ...more user data -] -``` - -**Activity** - -``` -[ - { - "userID": [number], - "date": [string YYYY/MM/DD], - "numSteps": [number - steps], - "minutesActive": [number - minutes], - "flightsOfStairs": [number - flights] - }, - ...more activity data -] -``` - -**Hydration** - -``` -[ - { - "userID": [number], - "date": [string YYYY/MM/DD], - "numOunces": [number - ounces] - }, - ...more hydration data -] -``` - -**Sleep** - -``` -[ - { - "userID": [number], - "date": [string YYYY/MM/DD], - "hoursSlept": [number - hours], - "sleepQuality": [number - unitless] - }, - ...more sleep data -] -``` +# README + +## Description + +Description: For this project our group built an application we named 'Git Fit'. It currently shows a randomized user and all that users data for different aspects of 'Getting Fit'. For each user there is a sleep column that displays the quality of sleep throughout the week and how many hours. The second column will deal with how many ounces have been drank by week and day. The final column displays the users activity levels, showing if they met their step goals for each week. + +## Installation / Usage + +Installation steps: + +1. Fork the GitHub Repository file (the word file should be a hyperlink). + +2. After initializing git inside the directory the user wants they can now clone their forked copy to their machine + +3. The user can now type 'npm install' into their terminal and hit enter. + +4. Then type 'npm start' into the same terminal. Now the user can open a new window in their terminal using 'cmd - t'. + +5. The user can now type open '**[http://localhost:8080/](http://localhost:8080/)**' into the new window in terminal to open up the application. + +## Contributor / Links + +Sharie Trashiel + +[https://github.com/sdtrachsel](https://github.com/sdtrachsel) + +Josua Martin + +[https://github.com/jmartin777](https://github.com/jmartin777) + +Johnathan Chaney + +[https://github.com/cadechaney](https://github.com/cadechaney) + +Isaiah Richardson + +[https://github.com/CapCinematic](https://github.com/CapCinematic) + +## Git Fit +![GitFit](dist/images/Gitfit.png) diff --git a/dist/901c1f0e-562a-4c15-b39f-da7851d6ea1f_360.png b/dist/901c1f0e-562a-4c15-b39f-da7851d6ea1f_360.png new file mode 100644 index 0000000000..cc815733c1 Binary files /dev/null and b/dist/901c1f0e-562a-4c15-b39f-da7851d6ea1f_360.png differ diff --git a/dist/Friends-Icon.JPEG b/dist/Friends-Icon.JPEG new file mode 100644 index 0000000000..5df1ba550f Binary files /dev/null and b/dist/Friends-Icon.JPEG differ diff --git a/dist/Gitfit-logo.JPEG b/dist/Gitfit-logo.JPEG new file mode 100644 index 0000000000..5402924e85 Binary files /dev/null and b/dist/Gitfit-logo.JPEG differ diff --git a/dist/Hydration-Icon.PNG b/dist/Hydration-Icon.PNG new file mode 100644 index 0000000000..e4067265c9 Binary files /dev/null and b/dist/Hydration-Icon.PNG differ diff --git a/dist/Sleep-Icon.PNG b/dist/Sleep-Icon.PNG new file mode 100644 index 0000000000..caf75d3eb0 Binary files /dev/null and b/dist/Sleep-Icon.PNG differ diff --git a/dist/activity-icon.png b/dist/activity-icon.png new file mode 100644 index 0000000000..e9506598a0 Binary files /dev/null and b/dist/activity-icon.png differ diff --git a/dist/bundle.js b/dist/bundle.js index 75e39b096b..a5c2487f2a 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,6 +1,1321 @@ /******/ (() => { // webpackBootstrap - var __webpack_exports__ = {}; - alert('hello') - /******/ -})() - ; \ No newline at end of file +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_styles_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); + + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_styles_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_styles_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + +/***/ }), +/* 2 */ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +var isOldIE = function isOldIE() { + var memo; + return function memorize() { + if (typeof memo === 'undefined') { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + memo = Boolean(window && document && document.all && !window.atob); + } + + return memo; + }; +}(); + +var getTarget = function getTarget() { + var memo = {}; + return function memorize(target) { + if (typeof memo[target] === 'undefined') { + var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself + + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch (e) { + // istanbul ignore next + styleTarget = null; + } + } + + memo[target] = styleTarget; + } + + return memo[target]; + }; +}(); + +var stylesInDom = []; + +function getIndexByIdentifier(identifier) { + var result = -1; + + for (var i = 0; i < stylesInDom.length; i++) { + if (stylesInDom[i].identifier === identifier) { + result = i; + break; + } + } + + return result; +} + +function modulesToDom(list, options) { + var idCountMap = {}; + var identifiers = []; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var id = options.base ? item[0] + options.base : item[0]; + var count = idCountMap[id] || 0; + var identifier = "".concat(id, " ").concat(count); + idCountMap[id] = count + 1; + var index = getIndexByIdentifier(identifier); + var obj = { + css: item[1], + media: item[2], + sourceMap: item[3] + }; + + if (index !== -1) { + stylesInDom[index].references++; + stylesInDom[index].updater(obj); + } else { + stylesInDom.push({ + identifier: identifier, + updater: addStyle(obj, options), + references: 1 + }); + } + + identifiers.push(identifier); + } + + return identifiers; +} + +function insertStyleElement(options) { + var style = document.createElement('style'); + var attributes = options.attributes || {}; + + if (typeof attributes.nonce === 'undefined') { + var nonce = true ? __webpack_require__.nc : 0; + + if (nonce) { + attributes.nonce = nonce; + } + } + + Object.keys(attributes).forEach(function (key) { + style.setAttribute(key, attributes[key]); + }); + + if (typeof options.insert === 'function') { + options.insert(style); + } else { + var target = getTarget(options.insert || 'head'); + + if (!target) { + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + } + + target.appendChild(style); + } + + return style; +} + +function removeStyleElement(style) { + // istanbul ignore if + if (style.parentNode === null) { + return false; + } + + style.parentNode.removeChild(style); +} +/* istanbul ignore next */ + + +var replaceText = function replaceText() { + var textStore = []; + return function replace(index, replacement) { + textStore[index] = replacement; + return textStore.filter(Boolean).join('\n'); + }; +}(); + +function applyToSingletonTag(style, index, remove, obj) { + var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE + + /* istanbul ignore if */ + + if (style.styleSheet) { + style.styleSheet.cssText = replaceText(index, css); + } else { + var cssNode = document.createTextNode(css); + var childNodes = style.childNodes; + + if (childNodes[index]) { + style.removeChild(childNodes[index]); + } + + if (childNodes.length) { + style.insertBefore(cssNode, childNodes[index]); + } else { + style.appendChild(cssNode); + } + } +} + +function applyToTag(style, options, obj) { + var css = obj.css; + var media = obj.media; + var sourceMap = obj.sourceMap; + + if (media) { + style.setAttribute('media', media); + } else { + style.removeAttribute('media'); + } + + if (sourceMap && typeof btoa !== 'undefined') { + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); + } // For old IE + + /* istanbul ignore if */ + + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + while (style.firstChild) { + style.removeChild(style.firstChild); + } + + style.appendChild(document.createTextNode(css)); + } +} + +var singleton = null; +var singletonCounter = 0; + +function addStyle(obj, options) { + var style; + var update; + var remove; + + if (options.singleton) { + var styleIndex = singletonCounter++; + style = singleton || (singleton = insertStyleElement(options)); + update = applyToSingletonTag.bind(null, style, styleIndex, false); + remove = applyToSingletonTag.bind(null, style, styleIndex, true); + } else { + style = insertStyleElement(options); + update = applyToTag.bind(null, style, options); + + remove = function remove() { + removeStyleElement(style); + }; + } + + update(obj); + return function updateStyle(newObj) { + if (newObj) { + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { + return; + } + + update(obj = newObj); + } else { + remove(); + } + }; +} + +module.exports = function (list, options) { + options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of