diff --git a/helpers/fetch-json.js b/helpers/fetch-json.js new file mode 100644 index 000000000..962062b34 --- /dev/null +++ b/helpers/fetch-json.js @@ -0,0 +1,20 @@ +/** + * An asynchronous helper function that wraps the standard node.js fetch API. + * This function calls an API url passed as the first and mandatory parameter, + * there is an optional payload parameter to send a json object, eg. a filter. + * It then calls the API and returns the response body parsed as a json object. + * @example fetchJson as returning function using the await keyword + * const data = await fetchJson('https://api-url.com/endpoint/') + * @example fetchJson as oneliner using the then() structure. + * fetchJson('https://api-url.com/endpoint/').then((data)=>{ + * // use data... + * }) + * @param {string} url the api endpoint to address + * @param {object} [payload] the payload to send to the API + * @returns the response from the API endpoint parsed as a json object + */ +export default async function fetchJson(url, payload = {}) { + return await fetch(url, payload) + .then((response) => response.json()) + .catch((error) => error) +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..eed2e69fb --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1190 @@ +{ + "name": "pleasurable-ui", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "pleasurable-ui", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "ejs": "^3.1.10", + "express": "^4.19.2" + }, + "devDependencies": { + "nodemon": "^3.1.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true, + "license": "ISC" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jake": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.1.tgz", + "integrity": "sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w==", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nodemon": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz", + "integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/nodemon/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/nodemon/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "license": "ISC", + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/package.json b/package.json index a09003bcc..96a9119cb 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "doc": "docs" }, "scripts": { - "start": "node server.js" + "start": "node server.js", + "dev": "nodemon server.js" }, "repository": { "type": "git", @@ -27,6 +28,7 @@ "homepage": "https://github.com/fdnd-task/pleasurable-ui#readme", "dependencies": { "ejs": "^3.1.10", - "express": "^4.19.2" + "express": "^4.19.2", + "nodemon": "^3.1.0" } } diff --git a/public/assets/favicon.png b/public/assets/favicon.png new file mode 100644 index 000000000..ba0c8fc93 Binary files /dev/null and b/public/assets/favicon.png differ diff --git a/public/assets/font/ProximaNova-Black.woff b/public/assets/font/ProximaNova-Black.woff new file mode 100644 index 000000000..794921ac6 Binary files /dev/null and b/public/assets/font/ProximaNova-Black.woff differ diff --git a/public/assets/font/ProximaNova-Black.woff2 b/public/assets/font/ProximaNova-Black.woff2 new file mode 100644 index 000000000..173cce598 Binary files /dev/null and b/public/assets/font/ProximaNova-Black.woff2 differ diff --git a/public/assets/font/ProximaNova-BlackIt.woff b/public/assets/font/ProximaNova-BlackIt.woff new file mode 100644 index 000000000..3ad23f13f Binary files /dev/null and b/public/assets/font/ProximaNova-BlackIt.woff differ diff --git a/public/assets/font/ProximaNova-BlackIt.woff2 b/public/assets/font/ProximaNova-BlackIt.woff2 new file mode 100644 index 000000000..5db7303a4 Binary files /dev/null and b/public/assets/font/ProximaNova-BlackIt.woff2 differ diff --git a/public/assets/font/ProximaNova-Bold.woff b/public/assets/font/ProximaNova-Bold.woff new file mode 100644 index 000000000..13f808cab Binary files /dev/null and b/public/assets/font/ProximaNova-Bold.woff differ diff --git a/public/assets/font/ProximaNova-Bold.woff2 b/public/assets/font/ProximaNova-Bold.woff2 new file mode 100644 index 000000000..b201aa6d4 Binary files /dev/null and b/public/assets/font/ProximaNova-Bold.woff2 differ diff --git a/public/assets/font/ProximaNova-BoldIt.woff b/public/assets/font/ProximaNova-BoldIt.woff new file mode 100644 index 000000000..1f0a49489 Binary files /dev/null and b/public/assets/font/ProximaNova-BoldIt.woff differ diff --git a/public/assets/font/ProximaNova-BoldIt.woff2 b/public/assets/font/ProximaNova-BoldIt.woff2 new file mode 100644 index 000000000..7c8b833c3 Binary files /dev/null and b/public/assets/font/ProximaNova-BoldIt.woff2 differ diff --git a/public/assets/font/ProximaNova-Extrabld.woff b/public/assets/font/ProximaNova-Extrabld.woff new file mode 100644 index 000000000..8cedbbeb0 Binary files /dev/null and b/public/assets/font/ProximaNova-Extrabld.woff differ diff --git a/public/assets/font/ProximaNova-Extrabld.woff2 b/public/assets/font/ProximaNova-Extrabld.woff2 new file mode 100644 index 000000000..cf983630a Binary files /dev/null and b/public/assets/font/ProximaNova-Extrabld.woff2 differ diff --git a/public/assets/font/ProximaNova-ExtrabldIt.woff b/public/assets/font/ProximaNova-ExtrabldIt.woff new file mode 100644 index 000000000..8ef7b63dd Binary files /dev/null and b/public/assets/font/ProximaNova-ExtrabldIt.woff differ diff --git a/public/assets/font/ProximaNova-ExtrabldIt.woff2 b/public/assets/font/ProximaNova-ExtrabldIt.woff2 new file mode 100644 index 000000000..7665296b1 Binary files /dev/null and b/public/assets/font/ProximaNova-ExtrabldIt.woff2 differ diff --git a/public/assets/font/ProximaNova-Light.woff b/public/assets/font/ProximaNova-Light.woff new file mode 100644 index 000000000..38ef3a4d6 Binary files /dev/null and b/public/assets/font/ProximaNova-Light.woff differ diff --git a/public/assets/font/ProximaNova-Light.woff2 b/public/assets/font/ProximaNova-Light.woff2 new file mode 100644 index 000000000..9162a066c Binary files /dev/null and b/public/assets/font/ProximaNova-Light.woff2 differ diff --git a/public/assets/font/ProximaNova-LightIt.woff b/public/assets/font/ProximaNova-LightIt.woff new file mode 100644 index 000000000..9f23d6339 Binary files /dev/null and b/public/assets/font/ProximaNova-LightIt.woff differ diff --git a/public/assets/font/ProximaNova-LightIt.woff2 b/public/assets/font/ProximaNova-LightIt.woff2 new file mode 100644 index 000000000..54361cded Binary files /dev/null and b/public/assets/font/ProximaNova-LightIt.woff2 differ diff --git a/public/assets/font/ProximaNova-Medium.woff b/public/assets/font/ProximaNova-Medium.woff new file mode 100644 index 000000000..3bda6d7b3 Binary files /dev/null and b/public/assets/font/ProximaNova-Medium.woff differ diff --git a/public/assets/font/ProximaNova-Medium.woff2 b/public/assets/font/ProximaNova-Medium.woff2 new file mode 100644 index 000000000..5e8332d20 Binary files /dev/null and b/public/assets/font/ProximaNova-Medium.woff2 differ diff --git a/public/assets/font/ProximaNova-MediumIt.woff b/public/assets/font/ProximaNova-MediumIt.woff new file mode 100644 index 000000000..b91d928f8 Binary files /dev/null and b/public/assets/font/ProximaNova-MediumIt.woff differ diff --git a/public/assets/font/ProximaNova-MediumIt.woff2 b/public/assets/font/ProximaNova-MediumIt.woff2 new file mode 100644 index 000000000..8ac96d037 Binary files /dev/null and b/public/assets/font/ProximaNova-MediumIt.woff2 differ diff --git a/public/assets/font/ProximaNova-Regular.woff b/public/assets/font/ProximaNova-Regular.woff new file mode 100644 index 000000000..912d8d3fb Binary files /dev/null and b/public/assets/font/ProximaNova-Regular.woff differ diff --git a/public/assets/font/ProximaNova-Regular.woff2 b/public/assets/font/ProximaNova-Regular.woff2 new file mode 100644 index 000000000..a1f589685 Binary files /dev/null and b/public/assets/font/ProximaNova-Regular.woff2 differ diff --git a/public/assets/font/ProximaNova-RegularIt.woff b/public/assets/font/ProximaNova-RegularIt.woff new file mode 100644 index 000000000..ead931039 Binary files /dev/null and b/public/assets/font/ProximaNova-RegularIt.woff differ diff --git a/public/assets/font/ProximaNova-RegularIt.woff2 b/public/assets/font/ProximaNova-RegularIt.woff2 new file mode 100644 index 000000000..a03020181 Binary files /dev/null and b/public/assets/font/ProximaNova-RegularIt.woff2 differ diff --git a/public/assets/font/ProximaNova-Semibold.woff b/public/assets/font/ProximaNova-Semibold.woff new file mode 100644 index 000000000..96fcc5f03 Binary files /dev/null and b/public/assets/font/ProximaNova-Semibold.woff differ diff --git a/public/assets/font/ProximaNova-Semibold.woff2 b/public/assets/font/ProximaNova-Semibold.woff2 new file mode 100644 index 000000000..30b3b93e5 Binary files /dev/null and b/public/assets/font/ProximaNova-Semibold.woff2 differ diff --git a/public/assets/font/ProximaNova-SemiboldIt.woff b/public/assets/font/ProximaNova-SemiboldIt.woff new file mode 100644 index 000000000..bd2fa5a9a Binary files /dev/null and b/public/assets/font/ProximaNova-SemiboldIt.woff differ diff --git a/public/assets/font/ProximaNova-SemiboldIt.woff2 b/public/assets/font/ProximaNova-SemiboldIt.woff2 new file mode 100644 index 000000000..924c7de31 Binary files /dev/null and b/public/assets/font/ProximaNova-SemiboldIt.woff2 differ diff --git a/public/assets/font/ProximaNova-ThinIt.woff b/public/assets/font/ProximaNova-ThinIt.woff new file mode 100644 index 000000000..3529452ee Binary files /dev/null and b/public/assets/font/ProximaNova-ThinIt.woff differ diff --git a/public/assets/font/ProximaNova-ThinIt.woff2 b/public/assets/font/ProximaNova-ThinIt.woff2 new file mode 100644 index 000000000..3ec2b1d9a Binary files /dev/null and b/public/assets/font/ProximaNova-ThinIt.woff2 differ diff --git a/public/assets/font/ProximaNovaT-Thin.woff b/public/assets/font/ProximaNovaT-Thin.woff new file mode 100644 index 000000000..1f4c13369 Binary files /dev/null and b/public/assets/font/ProximaNovaT-Thin.woff differ diff --git a/public/assets/font/ProximaNovaT-Thin.woff2 b/public/assets/font/ProximaNovaT-Thin.woff2 new file mode 100644 index 000000000..fdbaff8d5 Binary files /dev/null and b/public/assets/font/ProximaNovaT-Thin.woff2 differ diff --git a/public/assets/font/stylesheet.css b/public/assets/font/stylesheet.css new file mode 100644 index 000000000..3ab69ebb4 --- /dev/null +++ b/public/assets/font/stylesheet.css @@ -0,0 +1,198 @@ +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-BoldIt.woff2') format('woff2'), + url('ProximaNova-BoldIt.woff') format('woff'); + font-weight: bold; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Extrabld.woff2') format('woff2'), + url('ProximaNova-Extrabld.woff') format('woff'); + font-weight: 800; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Bold.woff2') format('woff2'), + url('ProximaNova-Bold.woff') format('woff'); + font-weight: bold; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Black.woff2') format('woff2'), + url('ProximaNova-Black.woff') format('woff'); + font-weight: 900; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Light.woff2') format('woff2'), + url('ProximaNova-Light.woff') format('woff'); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-ExtrabldIt.woff2') format('woff2'), + url('ProximaNova-ExtrabldIt.woff') format('woff'); + font-weight: 800; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-LightIt.woff2') format('woff2'), + url('ProximaNova-LightIt.woff') format('woff'); + font-weight: 300; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-BlackIt.woff2') format('woff2'), + url('ProximaNova-BlackIt.woff') format('woff'); + font-weight: 900; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Medium.woff2') format('woff2'), + url('ProximaNova-Medium.woff') format('woff'); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Regular.woff2') format('woff2'), + url('ProximaNova-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Regular.woff2') format('woff2'), + url('ProximaNova-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Semibold.woff2') format('woff2'), + url('ProximaNova-Semibold.woff') format('woff'); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-RegularIt.woff2') format('woff2'), + url('ProximaNova-RegularIt.woff') format('woff'); + font-weight: normal; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Semibold.woff2') format('woff2'), + url('ProximaNova-Semibold.woff') format('woff'); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-SemiboldIt.woff2') format('woff2'), + url('ProximaNova-SemiboldIt.woff') format('woff'); + font-weight: 600; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Semibold.woff2') format('woff2'), + url('ProximaNova-Semibold.woff') format('woff'); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNovaT-Thin.woff2') format('woff2'), + url('ProximaNovaT-Thin.woff') format('woff'); + font-weight: 100; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-MediumIt.woff2') format('woff2'), + url('ProximaNova-MediumIt.woff') format('woff'); + font-weight: 500; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-ThinIt.woff2') format('woff2'), + url('ProximaNova-ThinIt.woff') format('woff'); + font-weight: 100; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-RegularIt.woff2') format('woff2'), + url('ProximaNova-RegularIt.woff') format('woff'); + font-weight: normal; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-SemiboldIt.woff2') format('woff2'), + url('ProximaNova-SemiboldIt.woff') format('woff'); + font-weight: 600; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Proxima Nova'; + src: url('ProximaNova-Regular.woff2') format('woff2'), + url('ProximaNova-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + diff --git a/public/assets/icons/agent-img.svg b/public/assets/icons/agent-img.svg new file mode 100644 index 000000000..bb5f4e8b2 --- /dev/null +++ b/public/assets/icons/agent-img.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/icon-close.svg b/public/assets/icons/icon-close.svg new file mode 100644 index 000000000..bad950953 --- /dev/null +++ b/public/assets/icons/icon-close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/icon-energy.svg b/public/assets/icons/icon-energy.svg new file mode 100644 index 000000000..0492c5986 --- /dev/null +++ b/public/assets/icons/icon-energy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/icon-garden.svg b/public/assets/icons/icon-garden.svg new file mode 100644 index 000000000..6c9102f00 --- /dev/null +++ b/public/assets/icons/icon-garden.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/icon-room.svg b/public/assets/icons/icon-room.svg new file mode 100644 index 000000000..5233c661c --- /dev/null +++ b/public/assets/icons/icon-room.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/icon-size.svg b/public/assets/icons/icon-size.svg new file mode 100644 index 000000000..0a7e04436 --- /dev/null +++ b/public/assets/icons/icon-size.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/icon-sort.svg b/public/assets/icons/icon-sort.svg new file mode 100644 index 000000000..20e4f0e32 --- /dev/null +++ b/public/assets/icons/icon-sort.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/icon-user-2.svg b/public/assets/icons/icon-user-2.svg new file mode 100644 index 000000000..69822bf36 --- /dev/null +++ b/public/assets/icons/icon-user-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/icon-user.svg b/public/assets/icons/icon-user.svg new file mode 100644 index 000000000..d6248b207 --- /dev/null +++ b/public/assets/icons/icon-user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/fonts/ProximaNova-Bold_1760577842[2252].otf b/public/fonts/ProximaNova-Bold_1760577842[2252].otf new file mode 100644 index 000000000..9d9115acb Binary files /dev/null and b/public/fonts/ProximaNova-Bold_1760577842[2252].otf differ diff --git a/public/fonts/ProximaNova-Medium_2770618388[2258].otf b/public/fonts/ProximaNova-Medium_2770618388[2258].otf new file mode 100644 index 000000000..3dec3bf33 Binary files /dev/null and b/public/fonts/ProximaNova-Medium_2770618388[2258].otf differ diff --git a/public/fonts/ProximaNova-Regular_2607783814.otf b/public/fonts/ProximaNova-Regular_2607783814.otf new file mode 100644 index 000000000..5ff48703b Binary files /dev/null and b/public/fonts/ProximaNova-Regular_2607783814.otf differ diff --git a/public/fonts/ProximaNova-Semibold_3872794340.otf b/public/fonts/ProximaNova-Semibold_3872794340.otf new file mode 100644 index 000000000..eec985975 Binary files /dev/null and b/public/fonts/ProximaNova-Semibold_3872794340.otf differ diff --git a/public/scripts/detail.js b/public/scripts/detail.js new file mode 100644 index 000000000..372e08243 --- /dev/null +++ b/public/scripts/detail.js @@ -0,0 +1,10 @@ +const price = document.querySelector(".house-price span"); +const priceValue = parseInt(price.textContent, 10); +const priceFormatted = priceValue.toLocaleString("nl-NL"); +const formattedPrice = formatPrice(priceValue); + +function formatPrice(priceValue) { + return new Intl.NumberFormat("nl-NL").format(priceValue); +} + +price.textContent = formattedPrice; diff --git a/public/scripts/favorieten.js b/public/scripts/favorieten.js new file mode 100644 index 000000000..52dc7eda7 --- /dev/null +++ b/public/scripts/favorieten.js @@ -0,0 +1,189 @@ +// Houd de positie van de cursor bij. Zet dit om naar een waarde tussen 0 en 1 & zet dit in een globaal variabel +let normalizedX = 0; +let normalizedY = 0; + +document.addEventListener("mousemove", function (e) { + normalizedX = e.clientX / window.innerWidth; + normalizedY = e.clientY / window.innerHeight; +}); + +// ---- Prijzen conversie ---- + +// Functie om nummers te converteren voor leesbaarheid (30000 -> 30.000) +const numberWithPeriods = (value) => { + return value.replace(/\B(?=(\d{3})+(?!\d))/g, "."); +}; + +// Zoek alle prijzen op de pagina en voer de eerdere functie hierop uit +prices = document.querySelectorAll(".price"); + +prices.forEach((price) => { + // Haal eerst het euroteken weg, zodat we enkel de waarde overhouden + // Deze zetten we hierna weer terug met een template literal + const priceValue = price.innerHTML.toString().replace("€", ""); + price.innerHTML = `€${numberWithPeriods(priceValue)}`; +}); + +// ---- Confetti effect ---- + +// Configureer de confetti +const confettiDefaults = { + spread: 120, + // ticks: 20, + // gravity: 0, + // decay: 0.97, + startVelocity: 10, + shapes: ["star"], + colors: ["FFE400", "FFBD00", "E89400", "FFCA6C", "FDFFB8"], +}; + +function shootConfetti() { + confetti({ + ...confettiDefaults, + particleCount: 15, + scalar: 0.8, + shapes: ["star"], + origin: { x: normalizedX, y: normalizedY }, + }); + + confetti({ + ...confettiDefaults, + particleCount: 4, + scalar: 0.4, + shapes: ["circle"], + origin: { x: normalizedX, y: normalizedY }, + }); +} + +// ---- Rating form ---- + +// Zorg ervoor dat de success states weer verdwijnen na de animatie +document.querySelectorAll(".rating-success .tick").forEach((successEl) => { + successEl.addEventListener("animationend", () => { + successEl.classList.remove("draw"); + }); +}); + +// Onderdeel van de Progressive Enhancement feature voor het submitten op de eventListener van de radio buttons, verbergt de submit knop +// Verberg alle submit knoppen op de rating forms +document.querySelectorAll(".rating-form button").forEach((button) => { + button.classList.add("hidden"); +}); + +// Rating form logica +document.querySelectorAll(".rating-form").forEach((form) => { + const radios = form.querySelectorAll("input[type=radio]"); + + // Voeg een eventListener toe aan elke radio button + radios.forEach((radio) => { + radio.addEventListener("change", (event) => { + const id = form.dataset.id; + const rating = event.target.value; + const loaderEl = form.querySelector(".loader"); + const successEl = form.querySelector(".rating-success .tick"); + + // Als de radio button gecheckt is (want de 'change' event wordt ook uitgevoerd als een radio button unchecked wordt) + if (event.target.checked) { + // Als de rating 5 is, schiet dan confetti + if (rating == 5) { + shootConfetti(); + } + // Roep de RatingHandler functie aan met de juiste parameters + ratingHandler(id, rating, loaderEl, successEl); + } + }); + }); +}); + +// Verberg alle submit knoppen op de rating forms +document.querySelectorAll(".rating-form button").forEach((button) => { + button.classList.add("hidden"); +}); + +// POST request handler voor het sturen van een rating +function ratingHandler(id, rating, loaderEl, successEl) { + // Toon de loading state + if (loaderEl.classList.contains("hidden")) { + loaderEl.classList.remove("hidden"); + } + try { + // POST request naar de server met de rating + // (URL: "/rate/:id/:rating", e.g. "/rate/6/5") + + // throw "Debug error"; + fetch(`/rate/${id}/${rating}`, { + method: "POST", + }) + .then((response) => response.json()) + .then((data) => { + // Verberg de loader en toon de success state + loaderEl.classList.add("hidden"); + successEl.classList.add("draw"); + }); + } catch (error) { + // Log eventuele errors en verberg de loader + console.error(error); + loaderEl.classList.add("hidden"); + // Gebruik Toastify om een toast notificatie te weergeven als error state + Toastify({ + text: "Beoordeling niet opgeslagen. Probeer het later nog eens. ", + duration: 3000, + close: true, + gravity: "top", + position: "right", + stopOnFocus: true, + style: { + background: "linear-gradient(to right, #ad2429, #9e181c)", + }, + }).showToast(); + } +} + +// ---- Dialog venster ---- +const dialogList = document.querySelector("#dialog-list"); +const dialogLeden = document.querySelector("#dialog-leden"); +const btnDialogs = document.querySelectorAll(".btn-dialog"); +const btnCloseDialogs = document.querySelectorAll(".btn-close-dialog"); + +btnDialogs.forEach((btnDialog, index) => { + btnDialog.addEventListener("click", () => { + // console.log(index); + if (index == 1) { + dialogLeden.showModal(); + } else { + dialogList.showModal(); + } + }); +}); + +btnCloseDialogs.forEach((btnClose, index) => { + btnClose.addEventListener("click", () => { + // console.log(index); + if (index == 1) { + dialogLeden.close(); + } else { + dialogList.close(); + } + }) +}); + +/* ---- Footer ---- */ + +// Voeg een class toe aan de ul elementen om ze zichtbaar te maken als JS werkt +document.addEventListener("DOMContentLoaded", function () { + document.querySelectorAll(".footer-col ul").forEach(function (ul) { + ul.classList.add("js-enabled"); + }); + + // Voeg click event listeners toe aan de titels + document.querySelectorAll(".footer-title").forEach(function (button) { + button.addEventListener("click", function () { + let ul = this.nextElementSibling; + if (ul.style.display === "block") { + ul.style.display = "none"; + } else { + ul.style.display = "block"; + } + }); + }); +}); diff --git a/public/styles/detail.css b/public/styles/detail.css new file mode 100644 index 000000000..11bedcd94 --- /dev/null +++ b/public/styles/detail.css @@ -0,0 +1,51 @@ +img { + width: 100%; + height: auto; + object-fit: cover; +} + +.house-container { + margin-top: 1rem; + padding-left: 1rem; + padding-right: 1rem; +} + +.house-name { + font-size: 1.5rem; +} + +.house-code { + color: #999; + font-size: 1rem; +} + +.house-width { + margin-top: 5px; + color: orange; +} + +.house-agent { + color: #0071b3; + margin-top: 5px; +} + +.house-price { + margin-top: 10px; + font-size: 1.25rem; + font-weight: 700; +} + +.house-price::after { + content: ""; + display: block; + width: 100%; + height: 1px; + margin-top: 10px; + background-color: rgb(218, 218, 218); +} + +.heading { + margin-top: 10px; + font-size: 1.25rem; + font-weight: 700; +} diff --git a/public/styles/style.css b/public/styles/style.css new file mode 100644 index 000000000..2e1b0e881 --- /dev/null +++ b/public/styles/style.css @@ -0,0 +1,1029 @@ +/* ---- Global styles ---- */ + +:root { + /* colors */ + --white: #ffffff; + --web-orange: #f7a100; + --regent-blue: #e6f2f7; + --lochmara: #0071b3; + --mine-shaft: #333333; + --neutral: #999999; + --neutral-2: #666666; + --silver: #cccccc; + --orange-darker: #de9000; + --bahama-blue: #006199; + --regent-blue-darker: #a2c9da; + + --default-star: url('data:image/svg+xml,'); + --active-star: url('data:image/svg+xml,'); + --hover-star: url('data:image/svg+xml,'); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: "Proxima Nova", sans-serif; + font-size: 16px; + line-height: 1.5; + color: #333; +} + +/* ---- Utility classes ---- */ + +.underlined { + text-decoration: underline; +} + +.layout-container { + max-width: 1032px; + padding: 1rem; + /* padding-top: 4.76rem; */ + margin: auto; +} + +.hidden { + display: none !important; +} + +h1, +h2, +h3 { + color: var(--mine-shaft); +} + +/* ======================================= */ +/* member section */ +/* ======================================= */ +section p { + color: var(--neutral-2); + margin-bottom: 0; +} + +.member-list { + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + list-style-type: none; + overflow-x: scroll; + padding: 1rem 0; +} + +.member-list .member-item { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin-right: 1rem; + position: relative; + width: 5rem; + transition: 0.2s ease-in; +} + +.member-list .member-item picture { + border-radius: 50%; + width: 3rem; + height: 3rem; + background-color: var(--web-orange); + overflow: hidden; +} + +.member-list .member-item picture img { + width: 100%; + height: auto; + object-fit: cover; +} + +.member-list .member-item:hover { + scale: 1.2; +} + +.option-row { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + margin-bottom: 1rem; +} + +.option-row .btn-blue { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + background-color: var(--regent-blue); + margin-right: 1rem; + flex: 1; + outline: none; + border: 0.1rem solid var(--regent-blue); + padding: 0.5rem; + color: var(--lochmara); + border-radius: 0.25rem; + transition: 0.2s ease-in; +} + +.option-row .btn-blue:hover { + border: 0.1rem solid var(--regent-blue-darker); + outline-offset: 1rem; +} + +.option-row .btn-blue:last-child { + margin-right: 0; +} + +.option-row .btn-blue:nth-child(2)::before { + content: url('../assets/icons/icon-sort.svg'); + margin-right: 0.25rem; + width: 24px; + height: 24px; +} + +.option-row .btn-blue:nth-child(3)::before { + content: url('../assets/icons/icon-user-2.svg'); + margin-right: 0.25rem; + width: 24px; + height: 24px; +} +/* ======================================= */ +/* Dialog +/* ======================================= */ +#dialog-list { + top: 16.2rem; +} + +#dialog-leden { + top: 7.5rem; +} + +dialog { + position: fixed; + /* bottom: 0; */ + left: 50%; + transform: translateX(-50%); + width: 100%; + border-radius: 0.75rem 0.75rem 0 0; + border: none; + box-shadow: 0 -0.25rem 0.75rem rgb(0 0 0 / 0.2); + padding: 1rem; + z-index: 2; + overflow: hidden; +} + +dialog::backdrop { + background-color: rgb(0 0 0 / 0.5); +} + +dialog hr { + height: 0.1rem; + background-color: var(--silver); + outline: none; + border: none; + margin: 1rem 0; +} + +dialog .title-row { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} + +dialog .title-row button { + background: none; + padding: 1rem; + color: var(--lochmara); + outline: none; + border: none; + font-size: 1rem; + border-radius: 50%; + width: 1rem; + height: 1rem; + display: flex; + align-items: center; + justify-content: center; +} + +dialog .title-row button:hover { + background-color: var(--silver); +} + +dialog input { + width: 100%; + padding: 0.75rem; + border: 0.1rem solid var(--lochmara); + border-radius: 0.25rem; + margin-bottom: 1rem; +} + +dialog input:focus, +dialog button:focus { + border: 0.05rem solid var(--web-orange); + outline: 0.05rem solid var(--web-orange); +} + +dialog .btn-primary-solid { + width: 100%; + background-color: var(--web-orange); + border: 0.1rem solid var(--web-orange); + color: var(--white); + padding: 0.75rem; + border-radius: 0.25rem; + margin-bottom: 1rem; +} + +dialog .btn-primary-solid:hover { + background-color: var(--orange-darker); + border: 0.1rem solid var(--orange-darker); +} + +dialog .btn-secondary-outline { + width: 100%; + background-color: var(--white); + border: 0.1rem solid var(--lochmara); + color: var(--lochmara); + padding: 0.75rem; + border-radius: 0.25rem; + margin-bottom: 1rem; +} + +dialog .btn-secondary-outline:hover { + background-color: var(--regent-blue); +} + +dialog .title-row .btn-close-dialog { + background-image: url('../assets/icons/icon-close.svg'); + background-repeat: no-repeat; + background-position: center; + background-size: contain; + width: 24px; + height: 24px; +} + +/* ---- Header / Nav ---- */ + +header { + background-color: var(--web-orange); + color: #fff; + display: flex; + /* width: 100vw; */ + justify-content: center; + align-items: center; + flex-shrink: 0; +} + +nav { + width: 100%; + display: flex; + justify-content: center; +} + +/* Navbar layout */ + +ul.nav { + list-style: none; + display: flex; + max-width: 61.5rem; + padding: 0rem 0.5rem; + justify-content: space-between; + align-items: center; + flex: 1 0 0; + width: 100%; +} + +.nav-left { + display: flex; + height: 3.75rem; + justify-content: center; + align-items: center; +} + +.nav-right { + display: flex; + height: 3.75rem; + justify-content: center; + align-items: center; +} + +/* Nav items */ + +nav li { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + padding: 0 0.75rem; +} + +.left-item { + display: none; +} + +nav a, +nav button { + color: #fff; + text-decoration: none; + + font-style: normal; + font-weight: 400; + line-height: normal; +} + +nav button { + background-color: transparent; + border: none; + cursor: pointer; +} + +.nav-right a, +nav button { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 0.5rem; +} + +nav span { + font-size: 0.75rem; + margin-top: -0.2rem; + margin-bottom: 0.2rem; +} + +/* Mobile nav */ + +#mobile-menu-check { + display: none; +} + +.li-menu label { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 0.5rem; + cursor: pointer; +} + +.li-menu input[type="checkbox"] { + display: none; +} + +.li-menu:has(input[type="checkbox"]:checked) { + background-color: var(--primary-color-2); +} + +.nav-left:has(input[type="checkbox"]:checked) .mobile-nav { + height: 100vh; +} + +.nav-left:has(input[type="checkbox"]:checked) .mobile-nav li { + opacity: 1; + height: 4rem; +} + +.mobile-nav { + position: fixed; + width: 100vw; + height: 0vh; + top: 3.76rem; + background: white; + text-align: left; + transition: all 0.5s; + z-index: 1; + left: 0; +} + +.mobile-nav > li { + opacity: 0; + line-height: 1.875rem; + height: 0; +} + +.mobile-nav > li:hover { + background-color: var(--blue-light) !important; +} + +.mobile-nav > li a { + color: black; +} + +/* Logo & icons */ + +nav svg { + width: 1.5rem; + height: 1.5rem; +} + +.li-logo svg { + margin-top: 0.3rem; + height: auto; + width: 5.625rem; +} + +/* Hover */ + +nav li:not(.li-logo):hover { + cursor: pointer; + background-color: var(--orange-darker); +} + +/* Breadcumbs */ + +.breadcrumbs { + display: flex; + align-items: center; + list-style-type: none; +} + +.breadcrumbs > li { + color: var(--gray); +} + +.breadcrumbs:last-child { + color: var(--lightgray); +} + +.breadcrumbs > li::after { + content: ">"; + width: 1em; + height: 1em; + margin: 0 0.75em; + color: var(--lightgray); +} + +.breadcrumbs > li:last-child::after { + content: ""; +} + +/* ---- Footer ---- */ + +.footer-container { + max-width: 95rem; + margin: auto; + padding: 0 4rem 2rem; +} + +.row { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.footer { + font-family: "Proxima Nova", sans-serif; + background-color: var(--color-footer); + padding: 4.375rem 0 0 0; + margin: 4.375rem 0 0 0; +} + +.footer-col { + width: 25%; + padding: 0 15px; +} + +.footer-col .footer-title { + display: flex; + align-items: center; + background: none; + border: none; + font-size: 1.125rem; + white-space: nowrap; + text-transform: capitalize; + font-weight: 500; + color: var(--color-black); + margin-bottom: 2.188rem; + position: relative; + cursor: pointer; +} + +.footer-col .footer-title::before { + content: ""; + position: absolute; + left: 0; + bottom: -10px; + background-color: var(--primary-color); + height: 2px; + box-sizing: border-box; + width: 3.125rem; +} + +.footer-col .footer-title svg { + fill: var(--blue); +} + +.footer-col ul { + text-decoration: none; + list-style: none; +} + +.footer-col ul li:not(:last-child) { + margin-bottom: 10px; +} + +.footer-col ul li a { + font-size: 1rem; + text-transform: capitalize; + text-decoration: none; + font-weight: 300; + color: var(--blue); + display: block; + transition: all 0.3s ease; +} + +.footer-col ul li a:hover { + color: var(--malibu); + padding-left: 8px; +} + +.second-footer { + padding: 0 4rem; + background-color: var(--gray); + display: flex; + justify-content: space-between; + align-items: center; +} + +.second-footer .social-links { + display: flex; + padding: 0 15px; +} + +.second-footer .social-links a { + display: flex; + justify-content: center; + align-items: center; + height: 2.5rem; + width: 2.5rem; + padding: 1rem 0; + margin: 0.5rem; + background-color: var(--border-color); + text-align: center; + line-height: 2.5rem; + border-radius: 50%; + color: var(--primary-color-light); + transition: all 0.5s ease; +} + +.second-footer .social-links svg { + fill: var(--blue); +} + +.second-footer .social-links a:first-child { + margin: 0.5rem 0.5rem 0.5rem 0; +} + +.second-footer .social-links a:hover { + color: var(--color-black); + background-color: var(--malibu); +} + +.second-footer p, +.second-footer a { + padding: 1rem 15px; + font-size: 0.75rem; + display: flex; + align-items: center; +} + +.second-footer a.privacy-statement { + color: var(--blue-light); + transition: all 0.5s ease; + cursor: pointer; +} + +.second-footer a.privacy-statement:hover { + color: var(--malibu); + transition: all 0.5s ease; +} + +.second-footer a.language span { + margin-left: 5px; + text-align: center; + color: var(--blue-light); +} + +.second-footer a.language svg { + fill: var(--malibu); +} + +/* ---- Footer breakpoints ---- */ + +@media (min-width: 768px) { + .footer-col .footer-title { + cursor: default; + } + + .footer-col .footer-title svg { + display: none; + } +} + +@media (max-width: 768px) { + .footer-container { + padding: 0 4rem 2rem; + } + .footer-col { + width: 50%; + margin-bottom: 1.875rem; + } +} + +@media (max-width: 575px) { + .footer-col { + width: 100%; + padding: 0 4rem; + } + + .second-footer { + padding: 0 4rem; + background-color: var(--gray); + display: flex; + flex-direction: column; + } +} + +/* ---- JS ENABLED/DISABLED ---- */ + +@media (max-width: 768px) { + .footer-col ul { + display: block; + } + + .footer-col ul.js-enabled { + display: none; + } +} + +/* ---- Favourites page ---- */ + +.page-favourites h1 { + font-size: 3rem; + font-weight: 600; + margin-top: 1rem; + margin-bottom: 1rem; +} + +.page-favourites h1::after { + content: ""; + display: block; + width: 2.5rem; + height: 0.25rem; + background-color: var(--web-orange); + margin-top: -0.5rem; +} + +.page-favourites p { + font-size: 1rem; + font-weight: 400; + color: var(--neutral-2); + margin-bottom: 0.5rem; +} + +.favourites-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(10rem, 20.15rem)); + grid-template-rows: auto; + justify-content: center; + /* align-items: center; */ + gap: 1rem; + /* padding: 1rem; */ + width: 100%; +} + +.house-card { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border: 1px solid var(--silver); + border-radius: 0.75rem; + width: 100%; + position: relative; + overflow: hidden; + background-color: white; + padding-bottom: 1rem; +} + +.house-card .card-container { + display: flex; + flex-direction: column; + padding: 0 1rem; + width: 100%; + height: 100%; +} + +.house-card .card-container .price { + font-weight: 600; +} + +.house-card .card-container .info-list { + display: flex; + flex-direction: row; + align-items: center; + justify-content: start; + list-style-type: none; + margin-bottom: 1rem; +} + +.house-card .card-container .info-list .info-item { + margin-right: 1rem; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.house-card .card-container .info-list .info-item:nth-child(1)::before { + content: url('../assets/icons/icon-size.svg'); + width: 24px; + height: 24px; +} + +.house-card .card-container .info-list .info-item:nth-child(2)::before { + content: url('../assets/icons/icon-room.svg'); + width: 24px; + height: 24px; +} + +.house-card .card-container .info-list .info-item:nth-child(3)::before { + content: url('../assets/icons/icon-garden.svg'); + width: 24px; + height: 24px; +} + +.house-card a { + text-decoration: none; + cursor: pointer; +} + +.house-card img { + width: auto; + height: 15rem; +} + +.house-card h2 { + font-size: 1rem; + font-weight: 700; + color: var(--lochmara); +} + +.house-card span { + /* width: 100%; */ + font-weight: 400; + color: black; + + text-overflow: ellipsis; + white-space: nowrap; + + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.delete-house { + position: absolute; + top: 0.3rem; + right: 0.3rem; + border-radius: 50%; + background-color: white; + color: var(--neutral-2); + font-size: 1rem; + width: 1.5rem; + height: 1.5rem; + border: 1px solid var(--white); + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; +} + +.delete-house > svg { + width: 0.7rem; + height: 0.7rem; + color: var(--neutral-2); +} + +.delete-house:hover { + background-color: var(--white); + border: 1px solid var(--silver); +} + +.agent-card { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border: 1px solid var(--regent-blue-darker); + border-radius: 0.75rem; + width: 100%; + overflow: hidden; + background-color: var(--regent-blue); + padding: 1rem; + text-align: center; +} + +.agent-card h2 { + font-size: 1.3rem; +} + +.agent-card .btn-agent { + background-color: var(--white); + border: 0.1rem solid var(--lochmara); + color: var(--lochmara); + border-radius: 0.25rem; + text-decoration: none; + padding: 0.5rem; +} + +.agent-card .btn-agent:hover { + background-color: var(--regent-blue); +} + +/* Ratings */ + +.rating-form { + display: flex; + position: relative; + justify-content: center; + align-items: center; + width: 100%; + border-top: 1px solid var(--silver); + padding-top: 1rem; + margin-top: 0.5rem; +} + +.rating-form input[type="radio"] { + appearance: none; + display: block; + background-image: var(--default-star); + background-repeat: no-repeat; + background-size: cover; + height: 1.5rem; + width: 1.5rem; + cursor: pointer; + margin: 0; + transition: scale 0.1s ease-in; + transition: background-image 0.08s ease-in; +} + +.rating-form input[type="radio"]:nth-of-type(1) {--i:1;} +.rating-form input[type="radio"]:nth-of-type(2) {--i:2;} +.rating-form input[type="radio"]:nth-of-type(3) {--i:3;} +.rating-form input[type="radio"]:nth-of-type(4) {--i:4;} +.rating-form input[type="radio"]:nth-of-type(5) {--i:5;} + +.rating-form input[type="radio"]:hover, +.rating-form input[type="radio"]:has(~ input[type="radio"]:hover) { + scale: calc(1 + var(--i) * .03); + background-image: var(--active-star); +} + +.rating-form input[type="radio"]:hover ~ input[type="radio"] { + background-image: var(--default-star) !important; +} + +.rating-form input[type="radio"]:checked, +.rating-form input[type="radio"]:has(~ input[type="radio"]:checked) { + background-image: var(--active-star); +} + +/* Rating states */ + +.loader, +.rating-success { + color: var(--neutral-2); + position: absolute; + display: inline-block; + width: 1.5rem; + height: 1.5rem; + left: 0; + top: auto; +} + +.loader:after { + content: " "; + display: block; + width: 1rem; + height: 1rem; + margin: 0.2rem; + border-radius: 50%; + border: 0.2rem solid currentColor; + border-color: currentColor transparent currentColor transparent; + animation: spin 1.2s linear infinite; +} + +.rating-success .tick { + stroke-dasharray: 18; + stroke-dashoffset: 18; +} + +.rating-success .draw { + animation: draw 3s forwards; +} + +/* ---- Breakpoints ---- */ + +@media (min-width: 760px) { + .layout-container { + padding-top: 1rem; + } + + header { + position: relative; + } + + .left-item { + display: flex; + } + + .li-menu { + display: none; + } + + .li-logo { + padding-left: 0; + } + + .li-logo svg { + width: 6.3125rem; + } + + .nav-right span, + .nav-left a:not(.li-logo a, .li-menu a) { + height: 1rem; + } + + .nav-right a, + nav button { + flex-direction: row; + } + + nav span { + font-size: 1rem; + margin-top: 0; + margin-bottom: 0; + } + + dialog { + width: 50%; + border-radius: 0.75rem; + } +} + +/* ---- Footer breakpoints ---- */ + +@media (max-width: 768px) { + .footer-container { + padding: 0 4rem 2rem; + } + .footer-col { + width: 50%; + margin-bottom: 1.875rem; + } +} + +@media (max-width: 575px) { + .footer-col { + width: 100%; + padding: 0 4rem; + } + + .second-footer { + padding: 0 4rem; + background-color: var(--gray); + display: flex; + flex-direction: column; + } +} + +/* ======================================= */ +/* Keyframes +/* ======================================= */ +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +@keyframes draw { + 0% { + stroke-dashoffset: 18; + } + 20% { + stroke-dashoffset: 0; + } + 80% { + stroke-dashoffset: 0; + } + 100% { + stroke-dashoffset: -18; + } +} diff --git a/server.js b/server.js index 562d97a21..6fb1e5564 100644 --- a/server.js +++ b/server.js @@ -1 +1,127 @@ -console.log('Hier komt jullie server') \ No newline at end of file +// Importeer het npm pakket express uit de node_modules map +import express from "express"; + +// Importeer de zelfgemaakte functie fetchJson uit de ./helpers map +import fetchJson from "./helpers/fetch-json.js"; + +// Maak een nieuwe express app aan +const app = express(); + +const apiUrl = "https://fdnd-agency.directus.app/items/"; +const f_houses = apiUrl + "f_houses"; +const f_list = apiUrl + "f_list"; +const f_files = apiUrl + "f_houses_files"; +const f_feedback = apiUrl + "f_feedback"; + +// Stel ejs in als template engine +app.set("view engine", "ejs"); + +// Stel de map met ejs templates in +app.set("views", "./views"); + +// Gebruik de map 'public' voor statische resources, zoals stylesheets, afbeeldingen en client-side JavaScript +app.use(express.static("public")); + +// Zorg dat werken met request data makkelijker wordt +app.use(express.urlencoded({ extended: true })); + +// ---- GET Routes ---- + +// Maak een GET route voor de favorieten pagina +app.get("/", function (request, response) { + // Voer tegelijkertijd een GET request uit naar de API om de huizen, en de ratings op te halen + Promise.all([ + fetch( + `https://fdnd-agency.directus.app/items/f_list/6?fields= + id, + title, + description, + users.id, + users.f_users_id.name, + users.f_users_id.email, + users.f_users_id.avatar, + houses.id, + houses.f_houses_id.id, + houses.f_houses_id.street, + houses.f_houses_id.house_nr, + houses.f_houses_id.city, + houses.f_houses_id.postal_code, + houses.f_houses_id.price, + houses.f_houses_id.m2, + houses.f_houses_id.m2_garden, + houses.f_houses_id.rooms, + houses.f_houses_id.agent, + houses.f_houses_id.poster_image.id, + houses.f_houses_id.poster_image.width, + houses.f_houses_id.poster_image.height` + ), + fetch( + "https://fdnd-agency.directus.app/items/f_feedback?fields=house,rating&filter[list][_eq]=6" + ) + ]).then(function (responses) { + // Maak van beide responses een json object + return Promise.all(responses.map(function (response) { + return response.json(); + })); + }).then(function (data) { + // Maak een nieuwe array aan waarin de huizen en de ratings worden gecombineerd + // data[0] is de response van de huizen fetch + // data[1] is de response van de ratings fetch + const houses = data[0].data; + const ratings = data[1].data.reverse(); + const updatedHousesData = houses.houses.map((house) => { + const foundRating = ratings.find((currentRating) => currentRating.house === house.f_houses_id.id); + return { + ...house, + rating: foundRating ? foundRating.rating.general : 0, + }; + }); + const finalData = { ...houses, houses: updatedHousesData }; + + // Render de favorieten.ejs template en geef de gecombineerde data mee + response.render("favorieten", { data: finalData }); + }).catch(function (error) { + // if there's an error in any of the fetches, it will be caught here + console.error('Error:', error); + }); +}); + +// Get route voor een detailpagina met een request parameter id +app.get("/detail/:id", function (request, response) { + fetchJson(f_houses + "/" + request.params.id + "?fields=*.*.*.*").then( + (housesData) => { + response.render("detail", { house: housesData.data }); + } + ); +}); + +// ---- POST Routes ---- + +app.post("/rate/:id/:rating", function (request, response) { + const id = request.params.id; + const rating = request.params.rating; + + fetch("https://fdnd-agency.directus.app/items/f_feedback", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + house: id, + list: 6, + user: 6, + rating: { general: rating }, + }), + }).then((data) => { + response.json(data); + }); +}); + +// Stel het poortnummer in waar express op moet gaan luisteren +app.set("port", process.env.PORT || 8000); + +// Start express op, haal daarbij het zojuist ingestelde poortnummer op +app.listen(app.get("port"), function () { + // Toon een bericht in de console en geef het poortnummer door + console.log(`Application started on http://localhost:${app.get("port")}`); +}); diff --git a/views/detail.ejs b/views/detail.ejs new file mode 100644 index 000000000..cb2c5dbf0 --- /dev/null +++ b/views/detail.ejs @@ -0,0 +1,22 @@ +<%- include('partials/head', {page: `${house.street} ${house.house_nr}`}) %> <%- include('partials/nav') %> + +
+ Foto van het huis +
+
+

<%= house.street %> <%= house.house_nr %> <%= house.nr_addition %>

+

<%= house.postal_code%> <%= house.city %>

+

<%= house.m2 %> m² / <%= house.m2_garden %> m² <%= house.rooms %> kamers

+

<%= house.agent %>

+

<%= house.price %> k.k. +

Omschrijving

+

<%- house.description %>

+
+ + + +<%- include('partials/foot') %> \ No newline at end of file diff --git a/views/favorieten.ejs b/views/favorieten.ejs new file mode 100644 index 000000000..767087d6c --- /dev/null +++ b/views/favorieten.ejs @@ -0,0 +1,105 @@ +<%- include('partials/head', {page: 'Favorieten'}) %> <%- +include('partials/nav') %> + +
+ <%- include('partials/breadcrumbs', {items: ['Home', 'Mijn Account', + 'Favorieten']}) %> +

Favorieten

+

+ In dit overzicht vind je al je favoriete huizen terug. Maak het jezelf + makkelijker door huizen te bewaren en notities toe te voegen over het + huis, de buurt en andere belangrijke details voor je zoektocht. +

+ + + + +
+ +

Leden

+

Alle leden van de favorieten lijst.

+ + + +
+ + + +
+
+ + + + + +
+

<%= data.title %>

+ +
+

<%= data.description %>

+

Leden: <%= data.users %>

+

Huizen: <%= data.houses %>

+
+ + +
+ + + + +
+ +
+

Leden

+ +
+

Alle leden van de favorieten lijst.

+ + +
    + <% data.users.forEach(user => { %> + <%- include('partials/users', {user: user}) %> + <% }) %> +
+
+ +

Nieuwe leden

+

Voeg nieuwe leden toe.

+ +
    +
+ + + +
+
+ + +
+ + + + + + + +<%- include('partials/footer') %> <%- include('partials/foot') %> diff --git a/views/index.ejs b/views/index.ejs new file mode 100644 index 000000000..f6456ec9e --- /dev/null +++ b/views/index.ejs @@ -0,0 +1,6 @@ +<%- include('partials/head') %> +<%- include('partials/nav') %> +

Test

+

Deze pagina komt later pas. Op dit moment is de relevante pagina hier te vinden: Favorieten

+<%- include('partials/footer') %> +<%- include('partials/foot') %> \ No newline at end of file diff --git a/views/partials/breadcrumbs.ejs b/views/partials/breadcrumbs.ejs new file mode 100644 index 000000000..410a1f8c5 --- /dev/null +++ b/views/partials/breadcrumbs.ejs @@ -0,0 +1,15 @@ + + + diff --git a/views/partials/card/house-card.ejs b/views/partials/card/house-card.ejs new file mode 100644 index 000000000..2ca3cb942 --- /dev/null +++ b/views/partials/card/house-card.ejs @@ -0,0 +1,41 @@ +
  • +
    + +
    + + + + + <%= house.title %> + + +
    + +

    <%= house.street %> <%= house.house_nr %>

    +
    +

    <%= house.postal_code + house.city %>

    +

    €<%= house.price %> k.k.

    + +

    <%= house.agent %>

    + + <%- include('./rating-form', {house: house, rating: rating}) %> +
    +
  • diff --git a/views/partials/card/rating-form-old.ejs b/views/partials/card/rating-form-old.ejs new file mode 100644 index 000000000..24d2e9ca9 --- /dev/null +++ b/views/partials/card/rating-form-old.ejs @@ -0,0 +1,21 @@ +
    + + + + + +
    diff --git a/views/partials/card/rating-form.ejs b/views/partials/card/rating-form.ejs new file mode 100644 index 000000000..4e440cf45 --- /dev/null +++ b/views/partials/card/rating-form.ejs @@ -0,0 +1,37 @@ +
    + <%- include('../loader') %> <%- include('../success') %> + + + checked + <% } %> + /> + + checked + <% } %> + /> + + checked + <% } %> + /> + + checked + <% } %> + /> + + checked + <% } %> + /> + + +
    diff --git a/views/partials/foot.ejs b/views/partials/foot.ejs new file mode 100644 index 000000000..b605728ee --- /dev/null +++ b/views/partials/foot.ejs @@ -0,0 +1,2 @@ + + diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs new file mode 100644 index 000000000..9068fc787 --- /dev/null +++ b/views/partials/footer.ejs @@ -0,0 +1,69 @@ + \ No newline at end of file diff --git a/views/partials/head.ejs b/views/partials/head.ejs new file mode 100644 index 000000000..00d6f7df7 --- /dev/null +++ b/views/partials/head.ejs @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + Funda | <%= page %> + + + diff --git a/views/partials/icons/cross-icon.ejs b/views/partials/icons/cross-icon.ejs new file mode 100644 index 000000000..e731cb36e --- /dev/null +++ b/views/partials/icons/cross-icon.ejs @@ -0,0 +1,13 @@ + + + diff --git a/views/partials/icons/house-icon.ejs b/views/partials/icons/house-icon.ejs new file mode 100644 index 000000000..8cba50ff5 --- /dev/null +++ b/views/partials/icons/house-icon.ejs @@ -0,0 +1,12 @@ + + + diff --git a/views/partials/icons/logo-old.ejs b/views/partials/icons/logo-old.ejs new file mode 100644 index 000000000..42d661123 --- /dev/null +++ b/views/partials/icons/logo-old.ejs @@ -0,0 +1,19 @@ + + + + + diff --git a/views/partials/icons/logo.ejs b/views/partials/icons/logo.ejs new file mode 100644 index 000000000..4dc87e013 --- /dev/null +++ b/views/partials/icons/logo.ejs @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/views/partials/icons/menu-icon.ejs b/views/partials/icons/menu-icon.ejs new file mode 100644 index 000000000..1e5e487da --- /dev/null +++ b/views/partials/icons/menu-icon.ejs @@ -0,0 +1,12 @@ + + + diff --git a/views/partials/icons/profile-icon.ejs b/views/partials/icons/profile-icon.ejs new file mode 100644 index 000000000..33ec43c5a --- /dev/null +++ b/views/partials/icons/profile-icon.ejs @@ -0,0 +1,16 @@ + + + + diff --git a/views/partials/icons/star-icon.ejs b/views/partials/icons/star-icon.ejs new file mode 100644 index 000000000..aa2635fc9 --- /dev/null +++ b/views/partials/icons/star-icon.ejs @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/views/partials/loader.ejs b/views/partials/loader.ejs new file mode 100644 index 000000000..0eb150a28 --- /dev/null +++ b/views/partials/loader.ejs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/views/partials/nav.ejs b/views/partials/nav.ejs new file mode 100644 index 000000000..fa252a6c1 --- /dev/null +++ b/views/partials/nav.ejs @@ -0,0 +1,43 @@ +
    + +
    diff --git a/views/partials/success.ejs b/views/partials/success.ejs new file mode 100644 index 000000000..a062528e8 --- /dev/null +++ b/views/partials/success.ejs @@ -0,0 +1,17 @@ + + + diff --git a/views/partials/users.ejs b/views/partials/users.ejs new file mode 100644 index 000000000..3b92545cd --- /dev/null +++ b/views/partials/users.ejs @@ -0,0 +1,11 @@ +
  • + + <% if (user.f_users_id.avatar !== null) { %> + + profile-image + <% } else { %> + profile-image + <% } %> + +

    <%= user.f_users_id.name %>

    +
  • \ No newline at end of file