From 3f6fb4d77babf47d42fee92d2bbb878c62c2c997 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sat, 30 Sep 2023 14:51:00 +0300 Subject: [PATCH 01/26] some change --- .gitignore | 24 + app.js | 16 + index.html | 13 + package-lock.json | 1478 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 23 + src/counter.ts | 9 + src/index.ts | 16 + src/style.css | 97 +++ src/vite-env.d.ts | 1 + tsconfig.json | 25 + 10 files changed, 1702 insertions(+) create mode 100644 .gitignore create mode 100644 app.js create mode 100644 index.html create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/counter.ts create mode 100644 src/index.ts create mode 100644 src/style.css create mode 100644 src/vite-env.d.ts create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..a547bf36d --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/app.js b/app.js new file mode 100644 index 000000000..5917bdb46 --- /dev/null +++ b/app.js @@ -0,0 +1,16 @@ +const express = require("express"); +const path = require("path"); + +const PORT = 3000; +const app = express(); + +app.use(express.static(path.join(__dirname, "dist"))); + +app.set("view engine", "handlebars"); + +app.get("/", (req, res) => { + res.render("index.html", {title: "Home"}); +}); + +app.listen(process.env.PORT || PORT, () => console.log("success")) + diff --git a/index.html b/index.html new file mode 100644 index 000000000..aa2a19745 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + WF + + +
+ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..2a7b0241c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1478 @@ +{ + "name": "middle.messenger.prakticum.yandex", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "middle.messenger.prakticum.yandex", + "version": "1.0.0", + "dependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5" + }, + "devDependencies": { + "express": "^4.18.2", + "handlebars": "^4.7.8", + "path": "^0.12.7", + "sass": "^1.68.0" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "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==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "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==", + "devOptional": true, + "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==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "devOptional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "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.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "devOptional": true, + "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==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "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" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "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==", + "dev": true + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true + }, + "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==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "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==", + "dev": true + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.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/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==", + "devOptional": true, + "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==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "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==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "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==", + "devOptional": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "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==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/immutable": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", + "devOptional": true + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "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==", + "dev": true, + "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==", + "devOptional": true, + "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==", + "devOptional": true, + "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==", + "devOptional": true, + "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==", + "devOptional": true, + "engines": { + "node": ">=0.12.0" + } + }, + "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==", + "dev": true, + "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==", + "dev": true + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "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==", + "devOptional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "dev": true, + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "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==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "devOptional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "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==", + "dev": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "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==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dev": true, + "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==", + "devOptional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "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==", + "dev": true, + "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==", + "dev": true + }, + "node_modules/sass": { + "version": "1.68.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", + "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", + "devOptional": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "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==", + "dev": true + }, + "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==", + "dev": true, + "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/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.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==", + "devOptional": true, + "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==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "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==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + }, + "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==", + "dev": true, + "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==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..1cddf1e15 --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "middle.messenger.prakticum.yandex", + "private": true, + "version": "1.0.0", + "main": "app.js", + "type": "commonjs", + "scripts": { + "dev": "vite --port 3000", + "start": "node app.js", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "handlebars": "^4.7.8", + "path": "^0.12.7", + "sass": "^1.68.0", + "express": "^4.18.2" + }, + "dependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/src/counter.ts b/src/counter.ts new file mode 100644 index 000000000..7b9e3ff72 --- /dev/null +++ b/src/counter.ts @@ -0,0 +1,9 @@ +// export function setupCounter(element: HTMLButtonElement) { +// let counter = 0 +// const setCounter = (count: number) => { +// counter = count +// element.innerHTML = `count is ${counter}` +// } +// element.addEventListener('click', () => setCounter(counter + 1)) +// setCounter(0) +// } diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 000000000..1e24178c8 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,16 @@ +import './style.css' + + +document.querySelector('#app')!.innerHTML = ` +
+

Vite + TypeScript

+
+ +
+

+ Click on the Vite and TypeScript logos to learn more +

+
+` + +// setupCounter(document.querySelector('#counter')!) diff --git a/src/style.css b/src/style.css new file mode 100644 index 000000000..b528b6cc2 --- /dev/null +++ b/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..f3dac05b2 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": [ + "src" + ] +} From 184438c54de4fa37581f983d563cc76ec5c81ff5 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sat, 30 Sep 2023 14:54:50 +0300 Subject: [PATCH 02/26] added node version file, logo icon --- .nvmrc | 1 + public/logo-icon.svg | 1 + 2 files changed, 2 insertions(+) create mode 100644 .nvmrc create mode 100644 public/logo-icon.svg diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..e44a38e08 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18.12.1 diff --git a/public/logo-icon.svg b/public/logo-icon.svg new file mode 100644 index 000000000..f7eb22e2f --- /dev/null +++ b/public/logo-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file From b88e28da258902df518c3c49b2dd32507154b1b3 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sun, 1 Oct 2023 01:08:06 +0300 Subject: [PATCH 03/26] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BF=D0=B0=D0=BF=D0=BA=D0=B8=20=D1=81=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=D0=BC=D0=B8,=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?= =?UTF-8?q?=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- index.html | 2 +- package-lock.json | 6 ++++ package.json | 5 +-- src/components/header/header.tmpl.ts | 0 src/components/header/index.ts | 0 src/components/input/index.ts | 0 src/components/input/input.tmpl.ts | 0 src/components/link/index.ts | 10 ++++++ src/components/link/link.tmpl.ts | 3 ++ src/components/title/index.ts | 0 src/components/title/title.tmpl.ts | 0 src/counter.ts | 9 ----- src/index.ts | 33 +++++++++++-------- src/pages/auth/index.ts | 9 +++++ src/pages/auth/tmpl/form.tmpl.ts | 3 ++ src/pages/chat/index.ts | 7 ++++ src/pages/chat/tmpl/block.tmpl.ts | 4 +++ src/pages/error/not-found/index.ts | 6 ++++ .../error/not-found/tmpl/description.tmpl.ts | 3 ++ src/pages/error/server-error/index.ts | 6 ++++ .../error/server-error/tmpl/description.ts | 3 ++ src/pages/reg/index.ts | 6 ++++ src/pages/reg/tmpl/form.tmpl.ts | 3 ++ 24 files changed, 94 insertions(+), 26 deletions(-) create mode 100644 src/components/header/header.tmpl.ts create mode 100644 src/components/header/index.ts create mode 100644 src/components/input/index.ts create mode 100644 src/components/input/input.tmpl.ts create mode 100644 src/components/link/index.ts create mode 100644 src/components/link/link.tmpl.ts create mode 100644 src/components/title/index.ts create mode 100644 src/components/title/title.tmpl.ts delete mode 100644 src/counter.ts create mode 100644 src/pages/auth/index.ts create mode 100644 src/pages/auth/tmpl/form.tmpl.ts create mode 100644 src/pages/chat/index.ts create mode 100644 src/pages/chat/tmpl/block.tmpl.ts create mode 100644 src/pages/error/not-found/index.ts create mode 100644 src/pages/error/not-found/tmpl/description.tmpl.ts create mode 100644 src/pages/error/server-error/index.ts create mode 100644 src/pages/error/server-error/tmpl/description.ts create mode 100644 src/pages/reg/index.ts create mode 100644 src/pages/reg/tmpl/form.tmpl.ts diff --git a/app.js b/app.js index 5917bdb46..e5e3acb8c 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,7 @@ app.use(express.static(path.join(__dirname, "dist"))); app.set("view engine", "handlebars"); app.get("/", (req, res) => { - res.render("index.html", {title: "Home"}); + res.render("index.html", {title: "AuthPage"}); }); app.listen(process.env.PORT || PORT, () => console.log("success")) diff --git a/index.html b/index.html index aa2a19745..524c4ace2 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + WF diff --git a/package-lock.json b/package-lock.json index 2a7b0241c..d0a04bf11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "middle.messenger.prakticum.yandex", "version": "1.0.0", "dependencies": { + "@types/node": "^20.8.0", "typescript": "^5.0.2", "vite": "^4.4.5" }, @@ -348,6 +349,11 @@ "node": ">=12" } }, + "node_modules/@types/node": { + "version": "20.8.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.0.tgz", + "integrity": "sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==" + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", diff --git a/package.json b/package.json index 1cddf1e15..c86d2b537 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,13 @@ "preview": "vite preview" }, "devDependencies": { + "express": "^4.18.2", "handlebars": "^4.7.8", "path": "^0.12.7", - "sass": "^1.68.0", - "express": "^4.18.2" + "sass": "^1.68.0" }, "dependencies": { + "@types/node": "^20.8.0", "typescript": "^5.0.2", "vite": "^4.4.5" } diff --git a/src/components/header/header.tmpl.ts b/src/components/header/header.tmpl.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/components/header/index.ts b/src/components/header/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/components/input/index.ts b/src/components/input/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/components/input/input.tmpl.ts b/src/components/input/input.tmpl.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/components/link/index.ts b/src/components/link/index.ts new file mode 100644 index 000000000..0aafd4420 --- /dev/null +++ b/src/components/link/index.ts @@ -0,0 +1,10 @@ +import HandleBars from "handlebars"; +import { link } from "./link.tmpl.ts"; + +type LinkProps = { + to: string; + text: string; +} +export const Link = (props: LinkProps ) => { + return HandleBars.compile(link)(props); +} \ No newline at end of file diff --git a/src/components/link/link.tmpl.ts b/src/components/link/link.tmpl.ts new file mode 100644 index 000000000..98ae7a809 --- /dev/null +++ b/src/components/link/link.tmpl.ts @@ -0,0 +1,3 @@ +export const link = ` + {{ text }} +` \ No newline at end of file diff --git a/src/components/title/index.ts b/src/components/title/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/components/title/title.tmpl.ts b/src/components/title/title.tmpl.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/counter.ts b/src/counter.ts deleted file mode 100644 index 7b9e3ff72..000000000 --- a/src/counter.ts +++ /dev/null @@ -1,9 +0,0 @@ -// export function setupCounter(element: HTMLButtonElement) { -// let counter = 0 -// const setCounter = (count: number) => { -// counter = count -// element.innerHTML = `count is ${counter}` -// } -// element.addEventListener('click', () => setCounter(counter + 1)) -// setCounter(0) -// } diff --git a/src/index.ts b/src/index.ts index 1e24178c8..6e5700869 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,16 +1,23 @@ import './style.css' +import {NotFoundPage} from "./pages/error/not-found"; +import {ServerErrorPage} from "./pages/error/server-error"; +import {AuthPage} from "./pages/auth"; +import {RegPage} from "./pages/reg"; +import {ChatPage} from "./pages/chat"; +const ROUTES: Record = { + 'not-found': NotFoundPage(), + 'server-error': ServerErrorPage(), + 'auth': AuthPage(), + 'reg': RegPage(), + 'chat': ChatPage(), + '/': AuthPage() + +} -document.querySelector('#app')!.innerHTML = ` -
-

Vite + TypeScript

-
- -
-

- Click on the Vite and TypeScript logos to learn more -

-
-` - -// setupCounter(document.querySelector('#counter')!) +window.addEventListener('DOMContentLoaded', () => { + const root = document.getElementById('app'); + + if (root) root.innerHTML = ROUTES[window.location.pathname] || NotFoundPage() + +}) diff --git a/src/pages/auth/index.ts b/src/pages/auth/index.ts new file mode 100644 index 000000000..d5e47ce79 --- /dev/null +++ b/src/pages/auth/index.ts @@ -0,0 +1,9 @@ +import HandleBars from 'handlebars'; +import { form } from "./tmpl/form.tmpl.ts"; +import { Link } from "../../components/link" + +export const AuthPage = () => { + return HandleBars.compile(form)({ + regPageLink: Link({to: '/reg', text: 'Sign Up'}) + }); +} diff --git a/src/pages/auth/tmpl/form.tmpl.ts b/src/pages/auth/tmpl/form.tmpl.ts new file mode 100644 index 000000000..9d6f900df --- /dev/null +++ b/src/pages/auth/tmpl/form.tmpl.ts @@ -0,0 +1,3 @@ + export const form = ` + {{{regPageLink}}} + ` \ No newline at end of file diff --git a/src/pages/chat/index.ts b/src/pages/chat/index.ts new file mode 100644 index 000000000..ed4e19958 --- /dev/null +++ b/src/pages/chat/index.ts @@ -0,0 +1,7 @@ +import HandleBars from "handlebars"; +import {block} from "./tmpl/block.tmpl.ts"; + + +export const ChatPage = () => { + return HandleBars.compile(block)({}); +} \ No newline at end of file diff --git a/src/pages/chat/tmpl/block.tmpl.ts b/src/pages/chat/tmpl/block.tmpl.ts new file mode 100644 index 000000000..2fe5e44a0 --- /dev/null +++ b/src/pages/chat/tmpl/block.tmpl.ts @@ -0,0 +1,4 @@ +export const block = ` +
block
+ some link +` \ No newline at end of file diff --git a/src/pages/error/not-found/index.ts b/src/pages/error/not-found/index.ts new file mode 100644 index 000000000..2e9eb194b --- /dev/null +++ b/src/pages/error/not-found/index.ts @@ -0,0 +1,6 @@ +import HandleBars from "handlebars"; +import {description} from "./tmpl/description.tmpl.ts"; + +export const NotFoundPage = () => { + return HandleBars.compile(description)({}); +} \ No newline at end of file diff --git a/src/pages/error/not-found/tmpl/description.tmpl.ts b/src/pages/error/not-found/tmpl/description.tmpl.ts new file mode 100644 index 000000000..575607398 --- /dev/null +++ b/src/pages/error/not-found/tmpl/description.tmpl.ts @@ -0,0 +1,3 @@ +export const description = ` +
not found
+` \ No newline at end of file diff --git a/src/pages/error/server-error/index.ts b/src/pages/error/server-error/index.ts new file mode 100644 index 000000000..038401482 --- /dev/null +++ b/src/pages/error/server-error/index.ts @@ -0,0 +1,6 @@ +import HandleBars from "handlebars"; +import {description} from "./tmpl/description.ts"; + +export const ServerErrorPage = () => { + return HandleBars.compile(description)({}); +} \ No newline at end of file diff --git a/src/pages/error/server-error/tmpl/description.ts b/src/pages/error/server-error/tmpl/description.ts new file mode 100644 index 000000000..759e7af52 --- /dev/null +++ b/src/pages/error/server-error/tmpl/description.ts @@ -0,0 +1,3 @@ +export const description = ` +
server error
+` \ No newline at end of file diff --git a/src/pages/reg/index.ts b/src/pages/reg/index.ts new file mode 100644 index 000000000..a3c539ec8 --- /dev/null +++ b/src/pages/reg/index.ts @@ -0,0 +1,6 @@ +import HandleBars from "handlebars"; +import {form} from "./tmpl/form.tmpl.ts"; + +export const RegPage = () => { + return HandleBars.compile(form)({}); +} \ No newline at end of file diff --git a/src/pages/reg/tmpl/form.tmpl.ts b/src/pages/reg/tmpl/form.tmpl.ts new file mode 100644 index 000000000..5a4c2c942 --- /dev/null +++ b/src/pages/reg/tmpl/form.tmpl.ts @@ -0,0 +1,3 @@ +export const form = ` +
reg
+` \ No newline at end of file From fe4f57c91e70f191203d1c3ac6e025ebb120fdde Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sun, 1 Oct 2023 01:21:20 +0300 Subject: [PATCH 04/26] updated server file, added vite config, updated index.ts --- app.js | 2 +- src/index.ts | 14 ++++++++------ vite.config.ts | 8 ++++++++ 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 vite.config.ts diff --git a/app.js b/app.js index e5e3acb8c..15a4a0960 100644 --- a/app.js +++ b/app.js @@ -6,7 +6,7 @@ const app = express(); app.use(express.static(path.join(__dirname, "dist"))); -app.set("view engine", "handlebars"); +app.set("view engine", "hbs"); app.get("/", (req, res) => { res.render("index.html", {title: "AuthPage"}); diff --git a/src/index.ts b/src/index.ts index 6e5700869..2f46b922e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,11 +6,11 @@ import {RegPage} from "./pages/reg"; import {ChatPage} from "./pages/chat"; const ROUTES: Record = { - 'not-found': NotFoundPage(), - 'server-error': ServerErrorPage(), - 'auth': AuthPage(), - 'reg': RegPage(), - 'chat': ChatPage(), + '/not-found': NotFoundPage(), + '/server-error': ServerErrorPage(), + '/auth': AuthPage(), + '/reg': RegPage(), + '/chat': ChatPage(), '/': AuthPage() } @@ -18,6 +18,8 @@ const ROUTES: Record = { window.addEventListener('DOMContentLoaded', () => { const root = document.getElementById('app'); - if (root) root.innerHTML = ROUTES[window.location.pathname] || NotFoundPage() + if (root) { + root.innerHTML = ROUTES[window.location.pathname] || NotFoundPage() + } }) diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 000000000..bd02dda71 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from "vite"; +import { resolve } from "path"; + +export default defineConfig ({ + build: { + outDir: resolve(__dirname, 'dist'), + }, +}) \ No newline at end of file From 7154f3731ba7b1c43a1e7c79215ce32acbe3cca0 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sun, 1 Oct 2023 03:07:03 +0300 Subject: [PATCH 05/26] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/header-logo.svg | 3 +++ src/components/button/button.tmpl.ts | 0 src/components/button/index.ts | 0 src/components/header/header.tmpl.ts | 7 +++++++ src/components/header/index.ts | 7 +++++++ src/components/input/index.ts | 12 ++++++++++++ src/components/input/input.tmpl.ts | 14 ++++++++++++++ src/components/title/index.ts | 11 +++++++++++ src/components/title/title.tmpl.ts | 3 +++ src/mock/settings-mock.json | 9 +++++++++ src/pages/auth/index.ts | 19 ++++++++++++++++--- src/pages/auth/tmpl/content.tmpl.ts | 6 ++++++ src/pages/auth/tmpl/form.tmpl.ts | 3 --- 13 files changed, 88 insertions(+), 6 deletions(-) create mode 100644 src/assets/header-logo.svg create mode 100644 src/components/button/button.tmpl.ts create mode 100644 src/components/button/index.ts create mode 100644 src/mock/settings-mock.json create mode 100644 src/pages/auth/tmpl/content.tmpl.ts delete mode 100644 src/pages/auth/tmpl/form.tmpl.ts diff --git a/src/assets/header-logo.svg b/src/assets/header-logo.svg new file mode 100644 index 000000000..949d99406 --- /dev/null +++ b/src/assets/header-logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/button/button.tmpl.ts b/src/components/button/button.tmpl.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/components/button/index.ts b/src/components/button/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/components/header/header.tmpl.ts b/src/components/header/header.tmpl.ts index e69de29bb..cc0de5d91 100644 --- a/src/components/header/header.tmpl.ts +++ b/src/components/header/header.tmpl.ts @@ -0,0 +1,7 @@ +export const header = ` +
+ header-logo +
+ +` + // \ No newline at end of file diff --git a/src/components/header/index.ts b/src/components/header/index.ts index e69de29bb..f12709adb 100644 --- a/src/components/header/index.ts +++ b/src/components/header/index.ts @@ -0,0 +1,7 @@ +import HandleBars from "handlebars"; +import {header} from "./header.tmpl.ts"; + + +export const Header = () => { + return HandleBars.compile(header)({}); +} \ No newline at end of file diff --git a/src/components/input/index.ts b/src/components/input/index.ts index e69de29bb..bfad99238 100644 --- a/src/components/input/index.ts +++ b/src/components/input/index.ts @@ -0,0 +1,12 @@ +import HandleBars from "handlebars"; +import {input} from "./input.tmpl.ts"; + + +type InputParams = { + props: unknown; +} + +export const Input = ({props}: InputParams) => { + console.log(props) + return HandleBars.compile(input)(props); +} \ No newline at end of file diff --git a/src/components/input/input.tmpl.ts b/src/components/input/input.tmpl.ts index e69de29bb..2b36be7c8 100644 --- a/src/components/input/input.tmpl.ts +++ b/src/components/input/input.tmpl.ts @@ -0,0 +1,14 @@ + +export const input = ` + +
+ {{#each people}} + + + + {{/each}} +
+ + + +` diff --git a/src/components/title/index.ts b/src/components/title/index.ts index e69de29bb..ddfdbd7c3 100644 --- a/src/components/title/index.ts +++ b/src/components/title/index.ts @@ -0,0 +1,11 @@ +import HandleBars from "handlebars"; +import {title} from "./title.tmpl.ts"; + +type TitleProps = { + title: string | number, +} +export const Title = (props: TitleProps) => { + return HandleBars.compile(title)({ + title: props.title + }) +} \ No newline at end of file diff --git a/src/components/title/title.tmpl.ts b/src/components/title/title.tmpl.ts index e69de29bb..7b045c299 100644 --- a/src/components/title/title.tmpl.ts +++ b/src/components/title/title.tmpl.ts @@ -0,0 +1,3 @@ +export const title = ` +

{{ title }}

+` \ No newline at end of file diff --git a/src/mock/settings-mock.json b/src/mock/settings-mock.json new file mode 100644 index 000000000..8e029c0ce --- /dev/null +++ b/src/mock/settings-mock.json @@ -0,0 +1,9 @@ +{ + "first_name": "Иван", + "second_name": "Иванов", + "login": "ivanushka", + "password": "neva_piter", + "email": "ivan@mail.ru", + "phone": "+7(123)4567890" + +} \ No newline at end of file diff --git a/src/pages/auth/index.ts b/src/pages/auth/index.ts index d5e47ce79..24ab94e94 100644 --- a/src/pages/auth/index.ts +++ b/src/pages/auth/index.ts @@ -1,9 +1,22 @@ import HandleBars from 'handlebars'; -import { form } from "./tmpl/form.tmpl.ts"; + import { Link } from "../../components/link" +import {Title} from "../../components/title"; +import {Header} from "../../components/header"; +import {content} from "./tmpl/content.tmpl.ts"; +import {Input} from "../../components/input"; +const people = { + people: [ + "Login ", + "Password ", + ] +} export const AuthPage = () => { - return HandleBars.compile(form)({ - regPageLink: Link({to: '/reg', text: 'Sign Up'}) + return HandleBars.compile(content)({ + header: Header(), + regPageLink: Link({to: '/reg', text: 'or Sign Up'}), + title: Title({title: 'Log In'}), + input: Input({props : people}) }); } diff --git a/src/pages/auth/tmpl/content.tmpl.ts b/src/pages/auth/tmpl/content.tmpl.ts new file mode 100644 index 000000000..f8d811a7a --- /dev/null +++ b/src/pages/auth/tmpl/content.tmpl.ts @@ -0,0 +1,6 @@ + export const content = ` + {{{ header }}} + {{{ title }}} +
{{{ input }}}
+ {{{ regPageLink }}} + ` \ No newline at end of file diff --git a/src/pages/auth/tmpl/form.tmpl.ts b/src/pages/auth/tmpl/form.tmpl.ts deleted file mode 100644 index 9d6f900df..000000000 --- a/src/pages/auth/tmpl/form.tmpl.ts +++ /dev/null @@ -1,3 +0,0 @@ - export const form = ` - {{{regPageLink}}} - ` \ No newline at end of file From 8e9634f7e6f71f804a8b17c426a60f7e20588674 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sun, 1 Oct 2023 19:17:05 +0300 Subject: [PATCH 06/26] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D1=8B=20=D0=B2=20=D0=B2=D0=B5=D1=80=D1=81=D1=82=D0=BA=D1=83=20?= =?UTF-8?q?+=20=D1=81=D1=82=D0=B8=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 5 +- src/assets/avatar.svg | 9 ++ src/assets/empty-avatar.svg | 3 + src/assets/error-not-found.svg | 9 ++ src/assets/exit.svg | 3 + src/assets/notification.svg | 5 + src/assets/search.svg | 3 + src/assets/settings.svg | 11 +++ src/assets/small-avatar.svg | 9 ++ src/assets/small-logo.svg | 1 + src/assets/user.svg | 9 ++ src/components/button/button.tmpl.ts | 3 + src/components/button/index.ts | 9 ++ src/components/header/header.tmpl.ts | 7 -- src/components/header/index.ts | 7 -- src/components/link/index.ts | 6 +- src/components/link/link.tmpl.ts | 2 +- src/components/logo/index.ts | 7 ++ src/components/logo/logo.tmpl.ts | 4 + src/index.ts | 6 +- src/pages/auth/index.ts | 12 ++- src/pages/auth/tmpl/content.tmpl.ts | 3 +- src/pages/chat/index.ts | 16 ++- src/pages/chat/tmpl/block.tmpl.ts | 4 - src/pages/chat/tmpl/content.tmpl.ts | 31 ++++++ src/pages/error/not-found/index.ts | 10 +- .../error/not-found/tmpl/content.tmpl.ts | 6 ++ .../error/not-found/tmpl/description.tmpl.ts | 3 - src/pages/error/server-error/index.ts | 14 ++- .../error/server-error/tmpl/content.tmpl.ts | 5 + .../error/server-error/tmpl/description.ts | 3 - src/pages/reg/index.ts | 25 ++++- src/pages/reg/tmpl/content.tmpl.ts | 7 ++ src/pages/reg/tmpl/form.tmpl.ts | 3 - src/pages/settings/index.ts | 25 +++++ src/pages/settings/tmpl/settings.tmpl.ts | 17 ++++ src/style.css | 97 ------------------- src/style.sass | 73 ++++++++++++++ 38 files changed, 328 insertions(+), 144 deletions(-) create mode 100644 src/assets/avatar.svg create mode 100644 src/assets/empty-avatar.svg create mode 100644 src/assets/error-not-found.svg create mode 100644 src/assets/exit.svg create mode 100644 src/assets/notification.svg create mode 100644 src/assets/search.svg create mode 100644 src/assets/settings.svg create mode 100644 src/assets/small-avatar.svg create mode 100644 src/assets/small-logo.svg create mode 100644 src/assets/user.svg delete mode 100644 src/components/header/header.tmpl.ts delete mode 100644 src/components/header/index.ts create mode 100644 src/components/logo/index.ts create mode 100644 src/components/logo/logo.tmpl.ts delete mode 100644 src/pages/chat/tmpl/block.tmpl.ts create mode 100644 src/pages/chat/tmpl/content.tmpl.ts create mode 100644 src/pages/error/not-found/tmpl/content.tmpl.ts delete mode 100644 src/pages/error/not-found/tmpl/description.tmpl.ts create mode 100644 src/pages/error/server-error/tmpl/content.tmpl.ts delete mode 100644 src/pages/error/server-error/tmpl/description.ts create mode 100644 src/pages/reg/tmpl/content.tmpl.ts delete mode 100644 src/pages/reg/tmpl/form.tmpl.ts create mode 100644 src/pages/settings/index.ts create mode 100644 src/pages/settings/tmpl/settings.tmpl.ts delete mode 100644 src/style.css create mode 100644 src/style.sass diff --git a/index.html b/index.html index 524c4ace2..695feff01 100644 --- a/index.html +++ b/index.html @@ -3,11 +3,14 @@ + + + WF -
+
diff --git a/src/assets/avatar.svg b/src/assets/avatar.svg new file mode 100644 index 000000000..044dba235 --- /dev/null +++ b/src/assets/avatar.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/assets/empty-avatar.svg b/src/assets/empty-avatar.svg new file mode 100644 index 000000000..a31f57acf --- /dev/null +++ b/src/assets/empty-avatar.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/error-not-found.svg b/src/assets/error-not-found.svg new file mode 100644 index 000000000..528cb8314 --- /dev/null +++ b/src/assets/error-not-found.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/assets/exit.svg b/src/assets/exit.svg new file mode 100644 index 000000000..63d874db1 --- /dev/null +++ b/src/assets/exit.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/notification.svg b/src/assets/notification.svg new file mode 100644 index 000000000..2370bd0d4 --- /dev/null +++ b/src/assets/notification.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/search.svg b/src/assets/search.svg new file mode 100644 index 000000000..8d2f84fe8 --- /dev/null +++ b/src/assets/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/settings.svg b/src/assets/settings.svg new file mode 100644 index 000000000..ef845f56d --- /dev/null +++ b/src/assets/settings.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/assets/small-avatar.svg b/src/assets/small-avatar.svg new file mode 100644 index 000000000..fcf2b8468 --- /dev/null +++ b/src/assets/small-avatar.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/assets/small-logo.svg b/src/assets/small-logo.svg new file mode 100644 index 000000000..f7eb22e2f --- /dev/null +++ b/src/assets/small-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/user.svg b/src/assets/user.svg new file mode 100644 index 000000000..92a8ba8b3 --- /dev/null +++ b/src/assets/user.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/components/button/button.tmpl.ts b/src/components/button/button.tmpl.ts index e69de29bb..023abec88 100644 --- a/src/components/button/button.tmpl.ts +++ b/src/components/button/button.tmpl.ts @@ -0,0 +1,3 @@ +export const button = ` + +` \ No newline at end of file diff --git a/src/components/button/index.ts b/src/components/button/index.ts index e69de29bb..e0b06e2f2 100644 --- a/src/components/button/index.ts +++ b/src/components/button/index.ts @@ -0,0 +1,9 @@ +import HandleBars from "handlebars"; +import {button} from "./button.tmpl.ts"; + +type ButtonProps = { + text: string; +} +export const Button = (props: ButtonProps) => { + return HandleBars.compile(button)(props) +} \ No newline at end of file diff --git a/src/components/header/header.tmpl.ts b/src/components/header/header.tmpl.ts deleted file mode 100644 index cc0de5d91..000000000 --- a/src/components/header/header.tmpl.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const header = ` -
- header-logo -
- -` - // \ No newline at end of file diff --git a/src/components/header/index.ts b/src/components/header/index.ts deleted file mode 100644 index f12709adb..000000000 --- a/src/components/header/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import HandleBars from "handlebars"; -import {header} from "./header.tmpl.ts"; - - -export const Header = () => { - return HandleBars.compile(header)({}); -} \ No newline at end of file diff --git a/src/components/link/index.ts b/src/components/link/index.ts index 0aafd4420..68ed8568e 100644 --- a/src/components/link/index.ts +++ b/src/components/link/index.ts @@ -3,8 +3,10 @@ import { link } from "./link.tmpl.ts"; type LinkProps = { to: string; - text: string; + content: string; } export const Link = (props: LinkProps ) => { return HandleBars.compile(link)(props); -} \ No newline at end of file + +} + diff --git a/src/components/link/link.tmpl.ts b/src/components/link/link.tmpl.ts index 98ae7a809..d070fa559 100644 --- a/src/components/link/link.tmpl.ts +++ b/src/components/link/link.tmpl.ts @@ -1,3 +1,3 @@ export const link = ` - {{ text }} + {{{ content }}} ` \ No newline at end of file diff --git a/src/components/logo/index.ts b/src/components/logo/index.ts new file mode 100644 index 000000000..d2e208591 --- /dev/null +++ b/src/components/logo/index.ts @@ -0,0 +1,7 @@ +import HandleBars from "handlebars"; +import { logo } from "./logo.tmpl.ts"; + + +export const Logo = () => { + return HandleBars.compile(logo)({}); +} \ No newline at end of file diff --git a/src/components/logo/logo.tmpl.ts b/src/components/logo/logo.tmpl.ts new file mode 100644 index 000000000..99f180eb7 --- /dev/null +++ b/src/components/logo/logo.tmpl.ts @@ -0,0 +1,4 @@ +export const logo = ` + + +` \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 2f46b922e..c4708d185 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,16 +1,18 @@ -import './style.css' +import './style.sass' import {NotFoundPage} from "./pages/error/not-found"; import {ServerErrorPage} from "./pages/error/server-error"; import {AuthPage} from "./pages/auth"; import {RegPage} from "./pages/reg"; import {ChatPage} from "./pages/chat"; +import {SettingsPage} from "./pages/settings"; const ROUTES: Record = { '/not-found': NotFoundPage(), '/server-error': ServerErrorPage(), '/auth': AuthPage(), '/reg': RegPage(), - '/chat': ChatPage(), + '/chats': ChatPage(), + '/settings': SettingsPage(), '/': AuthPage() } diff --git a/src/pages/auth/index.ts b/src/pages/auth/index.ts index 24ab94e94..9e6e88d4a 100644 --- a/src/pages/auth/index.ts +++ b/src/pages/auth/index.ts @@ -2,11 +2,12 @@ import HandleBars from 'handlebars'; import { Link } from "../../components/link" import {Title} from "../../components/title"; -import {Header} from "../../components/header"; +import {Logo} from "../../components/logo"; import {content} from "./tmpl/content.tmpl.ts"; import {Input} from "../../components/input"; +import {Button} from "../../components/button"; -const people = { +const authFieldList = { people: [ "Login ", "Password ", @@ -14,9 +15,10 @@ const people = { } export const AuthPage = () => { return HandleBars.compile(content)({ - header: Header(), - regPageLink: Link({to: '/reg', text: 'or Sign Up'}), + logo: Logo(), + regPageLink: Link({to: '/reg', content: 'or Sign Up'}), title: Title({title: 'Log In'}), - input: Input({props : people}) + input: Input({props : authFieldList}), + button: Button({text: 'Enter'}) }); } diff --git a/src/pages/auth/tmpl/content.tmpl.ts b/src/pages/auth/tmpl/content.tmpl.ts index f8d811a7a..f87222ac5 100644 --- a/src/pages/auth/tmpl/content.tmpl.ts +++ b/src/pages/auth/tmpl/content.tmpl.ts @@ -1,6 +1,7 @@ export const content = ` - {{{ header }}} + {{{ logo }}} {{{ title }}}
{{{ input }}}
+ {{{ button }}} {{{ regPageLink }}} ` \ No newline at end of file diff --git a/src/pages/chat/index.ts b/src/pages/chat/index.ts index ed4e19958..64b07e786 100644 --- a/src/pages/chat/index.ts +++ b/src/pages/chat/index.ts @@ -1,7 +1,19 @@ import HandleBars from "handlebars"; -import {block} from "./tmpl/block.tmpl.ts"; +import {content} from "./tmpl/content.tmpl.ts"; +import {Logo} from "../../components/logo"; +import {Link} from "../../components/link"; export const ChatPage = () => { - return HandleBars.compile(block)({}); + return HandleBars.compile(content)({ + logo: Logo(), + linkToSettings: Link({ + to: '/settings', + content: 'settings' + }), + linkToAuth: Link({ + to: '/auth', + content: 'exit' + }) + }); } \ No newline at end of file diff --git a/src/pages/chat/tmpl/block.tmpl.ts b/src/pages/chat/tmpl/block.tmpl.ts deleted file mode 100644 index 2fe5e44a0..000000000 --- a/src/pages/chat/tmpl/block.tmpl.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const block = ` -
block
- some link -` \ No newline at end of file diff --git a/src/pages/chat/tmpl/content.tmpl.ts b/src/pages/chat/tmpl/content.tmpl.ts new file mode 100644 index 000000000..8898cdb1c --- /dev/null +++ b/src/pages/chat/tmpl/content.tmpl.ts @@ -0,0 +1,31 @@ +export const content = ` +
+
+
+ {{{logo}}} + +
+
+ notification + {{{linkToSettings}}} + small-avatar + {{{linkToAuth}}} +
+
+ +
+ + +
+ user + Alexandr Ivanov +
+
+
+ +` \ No newline at end of file diff --git a/src/pages/error/not-found/index.ts b/src/pages/error/not-found/index.ts index 2e9eb194b..9a041f74f 100644 --- a/src/pages/error/not-found/index.ts +++ b/src/pages/error/not-found/index.ts @@ -1,6 +1,12 @@ import HandleBars from "handlebars"; -import {description} from "./tmpl/description.tmpl.ts"; +import {content} from "./tmpl/content.tmpl.ts"; +import {Link} from "../../../components/link"; export const NotFoundPage = () => { - return HandleBars.compile(description)({}); + return HandleBars.compile(content)({ + chatPageLink: Link({ + to: '/chat', + content: 'назад к чатам' + }) + }); } \ No newline at end of file diff --git a/src/pages/error/not-found/tmpl/content.tmpl.ts b/src/pages/error/not-found/tmpl/content.tmpl.ts new file mode 100644 index 000000000..ce0ee6fda --- /dev/null +++ b/src/pages/error/not-found/tmpl/content.tmpl.ts @@ -0,0 +1,6 @@ +export const content = ` +
+ not-found + {{{ chatPageLink }}} +
+` \ No newline at end of file diff --git a/src/pages/error/not-found/tmpl/description.tmpl.ts b/src/pages/error/not-found/tmpl/description.tmpl.ts deleted file mode 100644 index 575607398..000000000 --- a/src/pages/error/not-found/tmpl/description.tmpl.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const description = ` -
not found
-` \ No newline at end of file diff --git a/src/pages/error/server-error/index.ts b/src/pages/error/server-error/index.ts index 038401482..b74c07a84 100644 --- a/src/pages/error/server-error/index.ts +++ b/src/pages/error/server-error/index.ts @@ -1,6 +1,16 @@ import HandleBars from "handlebars"; -import {description} from "./tmpl/description.ts"; +import {content} from "./tmpl/content.tmpl.ts"; +import {Link} from "../../../components/link"; +import {Title} from "../../../components/title"; export const ServerErrorPage = () => { - return HandleBars.compile(description)({}); + return HandleBars.compile(content)({ + title: Title({ + title: '500' + }), + chatPageLink: Link({ + to: '/chat', + content: 'назад к чатам' + }) + }); } \ No newline at end of file diff --git a/src/pages/error/server-error/tmpl/content.tmpl.ts b/src/pages/error/server-error/tmpl/content.tmpl.ts new file mode 100644 index 000000000..5ded01d31 --- /dev/null +++ b/src/pages/error/server-error/tmpl/content.tmpl.ts @@ -0,0 +1,5 @@ +export const content = ` + {{{ title }}} +
Мы уже фиксим) еще немного
+ {{{ chatPageLink }}} +` \ No newline at end of file diff --git a/src/pages/error/server-error/tmpl/description.ts b/src/pages/error/server-error/tmpl/description.ts deleted file mode 100644 index 759e7af52..000000000 --- a/src/pages/error/server-error/tmpl/description.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const description = ` -
server error
-` \ No newline at end of file diff --git a/src/pages/reg/index.ts b/src/pages/reg/index.ts index a3c539ec8..e479e5c68 100644 --- a/src/pages/reg/index.ts +++ b/src/pages/reg/index.ts @@ -1,6 +1,27 @@ import HandleBars from "handlebars"; -import {form} from "./tmpl/form.tmpl.ts"; +import {content} from "./tmpl/content.tmpl.ts"; +import {Logo} from "../../components/logo"; +import {Link} from "../../components/link"; +import {Title} from "../../components/title"; +import {Input} from "../../components/input"; +import {Button} from "../../components/button"; +const regFieldList = { + people: [ + "first name ", + "second name ", + "login", + "email", + "phone", + "password(min.6 charact.)" + ] +} export const RegPage = () => { - return HandleBars.compile(form)({}); + return HandleBars.compile(content)({ + logo: Logo(), + authPageLink: Link({to: '/auth', content: 'or Sign In'}), + title: Title({title: 'Let`s get started!'}), + input: Input({props : regFieldList}), + button: Button({text: 'Create account'}) + }); } \ No newline at end of file diff --git a/src/pages/reg/tmpl/content.tmpl.ts b/src/pages/reg/tmpl/content.tmpl.ts new file mode 100644 index 000000000..946f75140 --- /dev/null +++ b/src/pages/reg/tmpl/content.tmpl.ts @@ -0,0 +1,7 @@ +export const content = ` + {{{ logo }}} + {{{ title }}} +
{{{ input }}}
+ {{{ button }}} + {{{ authPageLink }}} +` \ No newline at end of file diff --git a/src/pages/reg/tmpl/form.tmpl.ts b/src/pages/reg/tmpl/form.tmpl.ts deleted file mode 100644 index 5a4c2c942..000000000 --- a/src/pages/reg/tmpl/form.tmpl.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const form = ` -
reg
-` \ No newline at end of file diff --git a/src/pages/settings/index.ts b/src/pages/settings/index.ts new file mode 100644 index 000000000..f75cc977b --- /dev/null +++ b/src/pages/settings/index.ts @@ -0,0 +1,25 @@ +import HandleBars from "handlebars"; +import {settings} from "./tmpl/settings.tmpl.ts"; +import {Logo} from "../../components/logo"; +import {Link} from "../../components/link"; +import {Button} from "../../components/button"; +import {Input} from "../../components/input"; + +const regFieldList = { + people: [ + "first name ", + "second name ", + "login", + "email", + "phone", + "password(min.6 charact.)" + ] +} +export const SettingsPage = () => { + return HandleBars.compile(settings)({ + logo: Logo(), + authPageLink: Link({to: '/auth', content: 'or Sign In'}), + button: Button({text: 'Save'}), + input: Input({props : regFieldList}), + }) +} \ No newline at end of file diff --git a/src/pages/settings/tmpl/settings.tmpl.ts b/src/pages/settings/tmpl/settings.tmpl.ts new file mode 100644 index 000000000..4261439f1 --- /dev/null +++ b/src/pages/settings/tmpl/settings.tmpl.ts @@ -0,0 +1,17 @@ +export const settings = ` + {{{ logo }}} + +
+ avatar + empty-avatar + avatar +
+ +
+ {{{ input }}} +
{{{ button }}}
+
+ + {{{ authPageLink }}} + +` \ No newline at end of file diff --git a/src/style.css b/src/style.css deleted file mode 100644 index b528b6cc2..000000000 --- a/src/style.css +++ /dev/null @@ -1,97 +0,0 @@ -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.vanilla:hover { - filter: drop-shadow(0 0 2em #3178c6aa); -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/src/style.sass b/src/style.sass new file mode 100644 index 000000000..04b4209fd --- /dev/null +++ b/src/style.sass @@ -0,0 +1,73 @@ +$background-color: #101E2B +$width: 100% +$height: 100% + +html, +body, +#app + + height: $height + margin: 0 + overflow: hidden + +body + font-family: Roboto, Arial, sans-serif + font-weight: 400 + font-size: 14px + +div + box-sizing: border-box + +.wrapper-chats-page + height: $height + width: $width + background-color: #0A151F + + .header + height: 60px + background-color: $background-color + display: flex + align-items: center + justify-content: space-between + padding: 0 40px + + .header-content-right, + .header-content-left, + .input-search-label + display: flex + align-items: center + gap: 20px + + .header-content-right + .arrow-exit, + .settings-styled + cursor: pointer + + .header-content-left + .logo + filter: sepia(100%) hue-rotate(190deg) saturate(500%) + + .input-search-label + gap: 8px + + .wrapper-chats + padding: 40px + display: grid + gap: 30px + grid-template-columns: 280px auto + height: $height + + .preview-chats, + .main-chats + background-color: $background-color + height: $height + border-radius: 10px + padding: 15px 20px + + + + + + + + From 7524a206cf958ccc78a1ef3c607bc59af0389714 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sun, 1 Oct 2023 20:42:54 +0300 Subject: [PATCH 07/26] =?UTF-8?q?=D0=B2=D0=B5=D1=80=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=8B=20?= =?UTF-8?q?=D1=87=D0=B0=D1=82=D0=BE=D0=B2=20(=D0=B7=D0=B0=D0=B3=D0=BB?= =?UTF-8?q?=D1=83=D1=88=D0=BA=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/input/index.ts | 7 +----- src/components/input/input.tmpl.ts | 6 ++--- src/components/title/title.tmpl.ts | 2 +- src/pages/auth/index.ts | 13 +++++----- src/pages/chat/index.ts | 12 +++++++++- src/pages/chat/tmpl/content.tmpl.ts | 11 +++++---- src/style.sass | 37 ++++++++++++++++++++++------- 7 files changed, 57 insertions(+), 31 deletions(-) diff --git a/src/components/input/index.ts b/src/components/input/index.ts index bfad99238..27cfe4f83 100644 --- a/src/components/input/index.ts +++ b/src/components/input/index.ts @@ -2,11 +2,6 @@ import HandleBars from "handlebars"; import {input} from "./input.tmpl.ts"; -type InputParams = { - props: unknown; -} - -export const Input = ({props}: InputParams) => { - console.log(props) +export const Input = (props: unknown) => { return HandleBars.compile(input)(props); } \ No newline at end of file diff --git a/src/components/input/input.tmpl.ts b/src/components/input/input.tmpl.ts index 2b36be7c8..0824607f2 100644 --- a/src/components/input/input.tmpl.ts +++ b/src/components/input/input.tmpl.ts @@ -1,10 +1,10 @@ export const input = ` -
- {{#each people}} +
+ {{#each fields}} - + {{/each}}
diff --git a/src/components/title/title.tmpl.ts b/src/components/title/title.tmpl.ts index 7b045c299..6fe7e3c9c 100644 --- a/src/components/title/title.tmpl.ts +++ b/src/components/title/title.tmpl.ts @@ -1,3 +1,3 @@ export const title = ` -

{{ title }}

+

{{ title }}

` \ No newline at end of file diff --git a/src/pages/auth/index.ts b/src/pages/auth/index.ts index 9e6e88d4a..0ca972c61 100644 --- a/src/pages/auth/index.ts +++ b/src/pages/auth/index.ts @@ -7,18 +7,17 @@ import {content} from "./tmpl/content.tmpl.ts"; import {Input} from "../../components/input"; import {Button} from "../../components/button"; -const authFieldList = { - people: [ - "Login ", - "Password ", - ] -} export const AuthPage = () => { return HandleBars.compile(content)({ logo: Logo(), regPageLink: Link({to: '/reg', content: 'or Sign Up'}), title: Title({title: 'Log In'}), - input: Input({props : authFieldList}), + input: Input({ + fields: [ + "Login", + "Password" + ], + }), button: Button({text: 'Enter'}) }); } diff --git a/src/pages/chat/index.ts b/src/pages/chat/index.ts index 64b07e786..c6628a051 100644 --- a/src/pages/chat/index.ts +++ b/src/pages/chat/index.ts @@ -2,6 +2,8 @@ import HandleBars from "handlebars"; import {content} from "./tmpl/content.tmpl.ts"; import {Logo} from "../../components/logo"; import {Link} from "../../components/link"; +import {Title} from "../../components/title"; +import {Input} from "../../components/input"; export const ChatPage = () => { @@ -14,6 +16,14 @@ export const ChatPage = () => { linkToAuth: Link({ to: '/auth', content: 'exit' - }) + }), + title: Title({ + title: "Music" + }), + input: Input({ + fields: [ + "Search" + ], + }), }); } \ No newline at end of file diff --git a/src/pages/chat/tmpl/content.tmpl.ts b/src/pages/chat/tmpl/content.tmpl.ts index 8898cdb1c..d51a0a456 100644 --- a/src/pages/chat/tmpl/content.tmpl.ts +++ b/src/pages/chat/tmpl/content.tmpl.ts @@ -5,7 +5,7 @@ export const content = ` {{{logo}}}
@@ -18,12 +18,13 @@ export const content = `
-
- user - Alexandr Ivanov +
+ user + Alexandr Ivanov +
diff --git a/src/style.sass b/src/style.sass index 04b4209fd..c1a4f6c03 100644 --- a/src/style.sass +++ b/src/style.sass @@ -1,14 +1,15 @@ $background-color: #101E2B $width: 100% $height: 100% +$white: #ffffff html, -body, -#app - - height: $height +body margin: 0 - overflow: hidden + padding: 0 + border: 0 + outline: 0 + min-height: $height body font-family: Roboto, Arial, sans-serif @@ -19,7 +20,7 @@ div box-sizing: border-box .wrapper-chats-page - height: $height + height: 100vh width: $width background-color: #0A151F @@ -50,20 +51,40 @@ div .input-search-label gap: 8px + .input-styled + background: transparent + border: none + outline: none + color: $white + .wrapper-chats padding: 40px display: grid gap: 30px grid-template-columns: 280px auto - height: $height + height: 95% .preview-chats, .main-chats background-color: $background-color - height: $height border-radius: 10px padding: 15px 20px + .preview-chats + .title-styled + color: $white + font-size: 20px + font-weight: 700 + margin: 0 + + .main-chats + &-header + display: flex + align-items: center + gap: 8px + color: $white + font-size: 14px + font-weight: 700 From af317310f994538539970c20843f5e17a81d285c Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sun, 1 Oct 2023 22:52:57 +0300 Subject: [PATCH 08/26] =?UTF-8?q?=D0=B2=D0=B5=D1=80=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=20SignIn,?= =?UTF-8?q?=20SignUp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/button.tmpl.ts | 2 +- src/components/input/index.ts | 8 +++- src/components/input/input.tmpl.ts | 6 +-- src/components/link/link.tmpl.ts | 2 +- src/index.ts | 10 ++--- src/pages/auth/index.ts | 23 ---------- src/pages/auth/tmpl/content.tmpl.ts | 7 --- src/pages/reg/index.ts | 27 ------------ src/pages/reg/tmpl/content.tmpl.ts | 7 --- src/pages/settings/index.ts | 42 ++++++++++++------ src/pages/sign-in/index.ts | 30 +++++++++++++ src/pages/sign-in/tmpl/content.tmpl.ts | 18 ++++++++ src/pages/sign-up/index.ts | 46 ++++++++++++++++++++ src/pages/sign-up/tmpl/content.tmpl.ts | 17 ++++++++ src/style.sass | 59 ++++++++++++++++++++++++++ 15 files changed, 216 insertions(+), 88 deletions(-) delete mode 100644 src/pages/auth/index.ts delete mode 100644 src/pages/auth/tmpl/content.tmpl.ts delete mode 100644 src/pages/reg/index.ts delete mode 100644 src/pages/reg/tmpl/content.tmpl.ts create mode 100644 src/pages/sign-in/index.ts create mode 100644 src/pages/sign-in/tmpl/content.tmpl.ts create mode 100644 src/pages/sign-up/index.ts create mode 100644 src/pages/sign-up/tmpl/content.tmpl.ts diff --git a/src/components/button/button.tmpl.ts b/src/components/button/button.tmpl.ts index 023abec88..247f6baf5 100644 --- a/src/components/button/button.tmpl.ts +++ b/src/components/button/button.tmpl.ts @@ -1,3 +1,3 @@ export const button = ` - + ` \ No newline at end of file diff --git a/src/components/input/index.ts b/src/components/input/index.ts index 27cfe4f83..ba01b4268 100644 --- a/src/components/input/index.ts +++ b/src/components/input/index.ts @@ -1,7 +1,11 @@ import HandleBars from "handlebars"; import {input} from "./input.tmpl.ts"; - -export const Input = (props: unknown) => { +export type InputProps = { + placeholder?: string; + type?: string; +} +export const Input = (props: InputProps) => { + console.log(props) return HandleBars.compile(input)(props); } \ No newline at end of file diff --git a/src/components/input/input.tmpl.ts b/src/components/input/input.tmpl.ts index 0824607f2..e52813149 100644 --- a/src/components/input/input.tmpl.ts +++ b/src/components/input/input.tmpl.ts @@ -1,10 +1,10 @@ export const input = ` -
- {{#each fields}} +
+ {{#each this}} - + {{/each}}
diff --git a/src/components/link/link.tmpl.ts b/src/components/link/link.tmpl.ts index d070fa559..7adcfc465 100644 --- a/src/components/link/link.tmpl.ts +++ b/src/components/link/link.tmpl.ts @@ -1,3 +1,3 @@ export const link = ` - {{{ content }}} + {{{ content }}} ` \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index c4708d185..b3192d8ae 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,19 +1,19 @@ import './style.sass' import {NotFoundPage} from "./pages/error/not-found"; import {ServerErrorPage} from "./pages/error/server-error"; -import {AuthPage} from "./pages/auth"; -import {RegPage} from "./pages/reg"; +import {SignInPage} from "./pages/sign-in"; +import {SignUpPage} from "./pages/sign-up"; import {ChatPage} from "./pages/chat"; import {SettingsPage} from "./pages/settings"; const ROUTES: Record = { '/not-found': NotFoundPage(), '/server-error': ServerErrorPage(), - '/auth': AuthPage(), - '/reg': RegPage(), + '/sign-in': SignInPage(), + '/sign-up': SignUpPage(), '/chats': ChatPage(), '/settings': SettingsPage(), - '/': AuthPage() + '/': SignInPage() } diff --git a/src/pages/auth/index.ts b/src/pages/auth/index.ts deleted file mode 100644 index 0ca972c61..000000000 --- a/src/pages/auth/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import HandleBars from 'handlebars'; - -import { Link } from "../../components/link" -import {Title} from "../../components/title"; -import {Logo} from "../../components/logo"; -import {content} from "./tmpl/content.tmpl.ts"; -import {Input} from "../../components/input"; -import {Button} from "../../components/button"; - -export const AuthPage = () => { - return HandleBars.compile(content)({ - logo: Logo(), - regPageLink: Link({to: '/reg', content: 'or Sign Up'}), - title: Title({title: 'Log In'}), - input: Input({ - fields: [ - "Login", - "Password" - ], - }), - button: Button({text: 'Enter'}) - }); -} diff --git a/src/pages/auth/tmpl/content.tmpl.ts b/src/pages/auth/tmpl/content.tmpl.ts deleted file mode 100644 index f87222ac5..000000000 --- a/src/pages/auth/tmpl/content.tmpl.ts +++ /dev/null @@ -1,7 +0,0 @@ - export const content = ` - {{{ logo }}} - {{{ title }}} -
{{{ input }}}
- {{{ button }}} - {{{ regPageLink }}} - ` \ No newline at end of file diff --git a/src/pages/reg/index.ts b/src/pages/reg/index.ts deleted file mode 100644 index e479e5c68..000000000 --- a/src/pages/reg/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import HandleBars from "handlebars"; -import {content} from "./tmpl/content.tmpl.ts"; -import {Logo} from "../../components/logo"; -import {Link} from "../../components/link"; -import {Title} from "../../components/title"; -import {Input} from "../../components/input"; -import {Button} from "../../components/button"; - -const regFieldList = { - people: [ - "first name ", - "second name ", - "login", - "email", - "phone", - "password(min.6 charact.)" - ] -} -export const RegPage = () => { - return HandleBars.compile(content)({ - logo: Logo(), - authPageLink: Link({to: '/auth', content: 'or Sign In'}), - title: Title({title: 'Let`s get started!'}), - input: Input({props : regFieldList}), - button: Button({text: 'Create account'}) - }); -} \ No newline at end of file diff --git a/src/pages/reg/tmpl/content.tmpl.ts b/src/pages/reg/tmpl/content.tmpl.ts deleted file mode 100644 index 946f75140..000000000 --- a/src/pages/reg/tmpl/content.tmpl.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const content = ` - {{{ logo }}} - {{{ title }}} -
{{{ input }}}
- {{{ button }}} - {{{ authPageLink }}} -` \ No newline at end of file diff --git a/src/pages/settings/index.ts b/src/pages/settings/index.ts index f75cc977b..ea2f55913 100644 --- a/src/pages/settings/index.ts +++ b/src/pages/settings/index.ts @@ -3,23 +3,41 @@ import {settings} from "./tmpl/settings.tmpl.ts"; import {Logo} from "../../components/logo"; import {Link} from "../../components/link"; import {Button} from "../../components/button"; -import {Input} from "../../components/input"; +import {Input, InputProps} from "../../components/input"; -const regFieldList = { - people: [ - "first name ", - "second name ", - "login", - "email", - "phone", - "password(min.6 charact.)" - ] -} +const signUpFieldList = + [ + { + placeholder: "first name", + type: 'text' + }, + { + placeholder: 'second name', + type: 'text' + }, + { + placeholder: 'login', + type: 'text' + }, + { + placeholder: 'email', + type: 'email' + }, + { + placeholder: 'phone', + type: 'phone' + }, + { + placeholder: 'password(min.6 charact.)', + type: 'password' + }, + + ] as InputProps export const SettingsPage = () => { return HandleBars.compile(settings)({ logo: Logo(), authPageLink: Link({to: '/auth', content: 'or Sign In'}), button: Button({text: 'Save'}), - input: Input({props : regFieldList}), + input: Input(signUpFieldList), }) } \ No newline at end of file diff --git a/src/pages/sign-in/index.ts b/src/pages/sign-in/index.ts new file mode 100644 index 000000000..423a50d4e --- /dev/null +++ b/src/pages/sign-in/index.ts @@ -0,0 +1,30 @@ +import HandleBars from 'handlebars'; + +import { Link } from "../../components/link" +import {Title} from "../../components/title"; +import {Logo} from "../../components/logo"; +import {content} from "./tmpl/content.tmpl.ts"; +import {Input, InputProps} from "../../components/input"; +import {Button} from "../../components/button"; + +const signInFieldList = + [ + { + placeholder: 'login', + type: 'text' + }, + { + placeholder: 'password', + type: 'password' + }, + + ] as InputProps +export const SignInPage = () => { + return HandleBars.compile(content)({ + logo: Logo(), + signUpPageLink: Link({to: '/sign-up', content: 'or Sign Up'}), + title: Title({title: 'Log In'}), + input: Input(signInFieldList), + button: Button({text: 'Enter'}) + }); +} diff --git a/src/pages/sign-in/tmpl/content.tmpl.ts b/src/pages/sign-in/tmpl/content.tmpl.ts new file mode 100644 index 000000000..417b5a751 --- /dev/null +++ b/src/pages/sign-in/tmpl/content.tmpl.ts @@ -0,0 +1,18 @@ + export const content = ` + + + ` \ No newline at end of file diff --git a/src/pages/sign-up/index.ts b/src/pages/sign-up/index.ts new file mode 100644 index 000000000..b50e4fa91 --- /dev/null +++ b/src/pages/sign-up/index.ts @@ -0,0 +1,46 @@ +import HandleBars from "handlebars"; +import {content} from "./tmpl/content.tmpl.ts"; +import {Logo} from "../../components/logo"; +import {Link} from "../../components/link"; +import {Title} from "../../components/title"; +import {Input, InputProps} from "../../components/input"; +import {Button} from "../../components/button"; + +const signUpFieldList = + [ + { + placeholder: "first name", + type: 'text' + }, + { + placeholder: 'second name', + type: 'text' + }, + { + placeholder: 'login', + type: 'text' + }, + { + placeholder: 'email', + type: 'email' + }, + { + placeholder: 'phone', + type: 'phone' + }, + { + placeholder: 'password(min.6 charact.)', + type: 'password' + }, + + ] as InputProps + +export const SignUpPage = () => { + return HandleBars.compile(content)({ + logo: Logo(), + signUpPageLink: Link({to: '/sign-in', content: 'or Sign In'}), + title: Title({title: 'Let`s get started!'}), + input: Input(signUpFieldList), + button: Button({text: 'Create account'}) + }); +} \ No newline at end of file diff --git a/src/pages/sign-up/tmpl/content.tmpl.ts b/src/pages/sign-up/tmpl/content.tmpl.ts new file mode 100644 index 000000000..32b7027a2 --- /dev/null +++ b/src/pages/sign-up/tmpl/content.tmpl.ts @@ -0,0 +1,17 @@ +export const content = ` + +` \ No newline at end of file diff --git a/src/style.sass b/src/style.sass index c1a4f6c03..a489d9a74 100644 --- a/src/style.sass +++ b/src/style.sass @@ -19,6 +19,29 @@ body div box-sizing: border-box +::-webkit-input-placeholder, +::-moz-placeholder + color: #AB9F9F + +.input-styled + border: 1px solid rgba(0, 0, 0, 0.10) + border-radius: 8px + padding: 20px + +.button-styled + border: none + border-radius: 8px + padding: 20px + width: 100% + color: $white + background-color: #218FCD + font-size: 20px + font-weight: 400 + cursor: pointer + +.link-styled + text-decoration: none + .wrapper-chats-page height: 100vh width: $width @@ -86,6 +109,42 @@ div font-size: 14px font-weight: 700 +.wrapper-sign-in-page, +.wrapper-sign-up-page + display: flex + justify-content: center + text-align: center + align-items: center + height: 100vh + position: relative + + .wrapper-content + width: 360px + .fields-list + display: flex + flex-direction: column + gap: 8px + margin-bottom: 20px + .title-styled + color: #504D4D + font-size: 36px + font-weight: 400 + .link-styled + color: #ABABAB + + .form + margin-bottom: 20px + + .header + height: 60px + padding: 0 40px + position: absolute + top: 0 + left: 0 + margin-top: 40px + + + From b0911fe63d6732eaa8dd0f98b52e995333978bd5 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Sun, 1 Oct 2023 22:55:44 +0300 Subject: [PATCH 09/26] some changes --- src/pages/chat/index.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pages/chat/index.ts b/src/pages/chat/index.ts index c6628a051..c049a5459 100644 --- a/src/pages/chat/index.ts +++ b/src/pages/chat/index.ts @@ -3,9 +3,15 @@ import {content} from "./tmpl/content.tmpl.ts"; import {Logo} from "../../components/logo"; import {Link} from "../../components/link"; import {Title} from "../../components/title"; -import {Input} from "../../components/input"; +import {Input, InputProps} from "../../components/input"; +const chatField = [ + { + placeholder: 'Search for people' + } +] as InputProps + export const ChatPage = () => { return HandleBars.compile(content)({ logo: Logo(), @@ -20,10 +26,6 @@ export const ChatPage = () => { title: Title({ title: "Music" }), - input: Input({ - fields: [ - "Search" - ], - }), + input: Input(chatField), }); } \ No newline at end of file From 51ad5e8c4e23630bb430f07af02d10973d3497c8 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 02:16:26 +0300 Subject: [PATCH 10/26] =?UTF-8?q?=D0=B2=D0=B5=D1=80=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=8B=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/input/index.ts | 1 - src/components/input/input.tmpl.ts | 2 +- src/helpers/input-helper.ts | 3 +++ src/pages/chat/index.ts | 2 +- src/pages/settings/index.ts | 14 ++++++----- src/pages/settings/tmpl/settings.tmpl.ts | 32 +++++++++++++++--------- src/style.sass | 9 ++++++- 7 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 src/helpers/input-helper.ts diff --git a/src/components/input/index.ts b/src/components/input/index.ts index ba01b4268..a60b7b80e 100644 --- a/src/components/input/index.ts +++ b/src/components/input/index.ts @@ -6,6 +6,5 @@ export type InputProps = { type?: string; } export const Input = (props: InputProps) => { - console.log(props) return HandleBars.compile(input)(props); } \ No newline at end of file diff --git a/src/components/input/input.tmpl.ts b/src/components/input/input.tmpl.ts index e52813149..b4b2f9327 100644 --- a/src/components/input/input.tmpl.ts +++ b/src/components/input/input.tmpl.ts @@ -4,7 +4,7 @@ export const input = `
{{#each this}} - + {{/each}}
diff --git a/src/helpers/input-helper.ts b/src/helpers/input-helper.ts new file mode 100644 index 000000000..009042c29 --- /dev/null +++ b/src/helpers/input-helper.ts @@ -0,0 +1,3 @@ +Handlebars.registerHelper('isTheBest', function (name) { + return name + ' is the best!' +}); \ No newline at end of file diff --git a/src/pages/chat/index.ts b/src/pages/chat/index.ts index c049a5459..20c3e509c 100644 --- a/src/pages/chat/index.ts +++ b/src/pages/chat/index.ts @@ -20,7 +20,7 @@ export const ChatPage = () => { content: 'settings' }), linkToAuth: Link({ - to: '/auth', + to: '/sign-in', content: 'exit' }), title: Title({ diff --git a/src/pages/settings/index.ts b/src/pages/settings/index.ts index ea2f55913..8e44f0bef 100644 --- a/src/pages/settings/index.ts +++ b/src/pages/settings/index.ts @@ -8,13 +8,18 @@ import {Input, InputProps} from "../../components/input"; const signUpFieldList = [ { - placeholder: "first name", + placeholder: 'first name', type: 'text' + }, { placeholder: 'second name', type: 'text' }, + { + placeholder: 'display name', + type: 'text' + }, { placeholder: 'login', type: 'text' @@ -27,16 +32,13 @@ const signUpFieldList = placeholder: 'phone', type: 'phone' }, - { - placeholder: 'password(min.6 charact.)', - type: 'password' - }, + ] as InputProps export const SettingsPage = () => { return HandleBars.compile(settings)({ logo: Logo(), - authPageLink: Link({to: '/auth', content: 'or Sign In'}), + authPageLink: Link({to: '/sign-in', content: 'or Sign In'}), button: Button({text: 'Save'}), input: Input(signUpFieldList), }) diff --git a/src/pages/settings/tmpl/settings.tmpl.ts b/src/pages/settings/tmpl/settings.tmpl.ts index 4261439f1..44771ab39 100644 --- a/src/pages/settings/tmpl/settings.tmpl.ts +++ b/src/pages/settings/tmpl/settings.tmpl.ts @@ -1,17 +1,25 @@ export const settings = ` - {{{ logo }}} - -
- avatar - empty-avatar - avatar + +
+
+ {{{ logo }}} +
+
+
+ avatar + empty-avatar + avatar +
+
+ {{{ input }}} +
{{{ button }}}
+
+ + {{{ authPageLink }}}
- -
- {{{ input }}} -
{{{ button }}}
-
+
- {{{ authPageLink }}} + + ` \ No newline at end of file diff --git a/src/style.sass b/src/style.sass index a489d9a74..be1423c06 100644 --- a/src/style.sass +++ b/src/style.sass @@ -110,7 +110,8 @@ div font-weight: 700 .wrapper-sign-in-page, -.wrapper-sign-up-page +.wrapper-sign-up-page, +.wrapper-settings-page display: flex justify-content: center text-align: center @@ -135,6 +136,12 @@ div .form margin-bottom: 20px + .wrapper-avatar + font-size: 16px + color: #A5A7A9 + font-weight: 400 + margin-bottom: 20px + .header height: 60px padding: 0 40px From 1d39313943c91e61101b00a6113aafda446b6aec Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 02:42:16 +0300 Subject: [PATCH 11/26] =?UTF-8?q?=D0=B2=D0=B5=D1=80=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20error=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/helpers/input-helper.ts | 3 --- src/mock/settings-mock.json | 9 -------- src/pages/error/not-found/index.ts | 2 +- .../error/not-found/tmpl/content.tmpl.ts | 8 ++++--- src/pages/error/server-error/index.ts | 2 +- .../error/server-error/tmpl/content.tmpl.ts | 11 ++++++--- src/style.sass | 23 ++++++++++++++++++- 7 files changed, 37 insertions(+), 21 deletions(-) delete mode 100644 src/helpers/input-helper.ts delete mode 100644 src/mock/settings-mock.json diff --git a/src/helpers/input-helper.ts b/src/helpers/input-helper.ts deleted file mode 100644 index 009042c29..000000000 --- a/src/helpers/input-helper.ts +++ /dev/null @@ -1,3 +0,0 @@ -Handlebars.registerHelper('isTheBest', function (name) { - return name + ' is the best!' -}); \ No newline at end of file diff --git a/src/mock/settings-mock.json b/src/mock/settings-mock.json deleted file mode 100644 index 8e029c0ce..000000000 --- a/src/mock/settings-mock.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "first_name": "Иван", - "second_name": "Иванов", - "login": "ivanushka", - "password": "neva_piter", - "email": "ivan@mail.ru", - "phone": "+7(123)4567890" - -} \ No newline at end of file diff --git a/src/pages/error/not-found/index.ts b/src/pages/error/not-found/index.ts index 9a041f74f..54376a132 100644 --- a/src/pages/error/not-found/index.ts +++ b/src/pages/error/not-found/index.ts @@ -5,7 +5,7 @@ import {Link} from "../../../components/link"; export const NotFoundPage = () => { return HandleBars.compile(content)({ chatPageLink: Link({ - to: '/chat', + to: '/chats', content: 'назад к чатам' }) }); diff --git a/src/pages/error/not-found/tmpl/content.tmpl.ts b/src/pages/error/not-found/tmpl/content.tmpl.ts index ce0ee6fda..8f20e0710 100644 --- a/src/pages/error/not-found/tmpl/content.tmpl.ts +++ b/src/pages/error/not-found/tmpl/content.tmpl.ts @@ -1,6 +1,8 @@ export const content = ` -
- not-found - {{{ chatPageLink }}} +
+
+ not-found + {{{ chatPageLink }}} +
` \ No newline at end of file diff --git a/src/pages/error/server-error/index.ts b/src/pages/error/server-error/index.ts index b74c07a84..20abfc94b 100644 --- a/src/pages/error/server-error/index.ts +++ b/src/pages/error/server-error/index.ts @@ -9,7 +9,7 @@ export const ServerErrorPage = () => { title: '500' }), chatPageLink: Link({ - to: '/chat', + to: '/chats', content: 'назад к чатам' }) }); diff --git a/src/pages/error/server-error/tmpl/content.tmpl.ts b/src/pages/error/server-error/tmpl/content.tmpl.ts index 5ded01d31..258a17e89 100644 --- a/src/pages/error/server-error/tmpl/content.tmpl.ts +++ b/src/pages/error/server-error/tmpl/content.tmpl.ts @@ -1,5 +1,10 @@ export const content = ` - {{{ title }}} -
Мы уже фиксим) еще немного
- {{{ chatPageLink }}} +
+
+ {{{ title }}} + Мы уже фиксим) еще немного + {{{ chatPageLink }}} +
+
+ ` \ No newline at end of file diff --git a/src/style.sass b/src/style.sass index be1423c06..502827235 100644 --- a/src/style.sass +++ b/src/style.sass @@ -111,7 +111,9 @@ div .wrapper-sign-in-page, .wrapper-sign-up-page, -.wrapper-settings-page +.wrapper-settings-page, +.wrapper-not-found-page, +.wrapper-server-error-page display: flex justify-content: center text-align: center @@ -151,7 +153,26 @@ div margin-top: 40px +.wrapper-not-found-page + .wrapper-content + width: 600px + img + margin-bottom: 25px +.wrapper-server-error-page + .wrapper-content + display: flex + flex-direction: column + width: 500px + .title-styled + font-size: 64px + font-weight: 400 + margin-bottom: 35px + span + font-size: 20px + color: #8F8989 + font-weight: 400 + margin-bottom: 25px From 8702fca53de52da3d497cbffe857948be2106738 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 03:05:36 +0300 Subject: [PATCH 12/26] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=80=D0=BE=D1=83=D1=82=D0=B8=D0=BD=D0=B3=20?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 ++-- {src => public}/assets/avatar.svg | 0 {src => public}/assets/empty-avatar.svg | 0 {src => public}/assets/error-not-found.svg | 0 {src => public}/assets/exit.svg | 0 {src => public}/assets/header-logo.svg | 0 public/{ => assets}/logo-icon.svg | 0 {src => public}/assets/notification.svg | 0 {src => public}/assets/search.svg | 0 {src => public}/assets/settings.svg | 0 {src => public}/assets/small-avatar.svg | 0 {src => public}/assets/small-logo.svg | 0 {src => public}/assets/user.svg | 0 src/components/logo/logo.tmpl.ts | 2 +- src/index.ts | 4 ++-- src/pages/chat/index.ts | 4 ++-- src/pages/chat/tmpl/content.tmpl.ts | 8 ++++---- src/pages/error/not-found/tmpl/content.tmpl.ts | 2 +- src/pages/settings/tmpl/settings.tmpl.ts | 4 ++-- vite.config.ts | 1 + 20 files changed, 15 insertions(+), 14 deletions(-) rename {src => public}/assets/avatar.svg (100%) rename {src => public}/assets/empty-avatar.svg (100%) rename {src => public}/assets/error-not-found.svg (100%) rename {src => public}/assets/exit.svg (100%) rename {src => public}/assets/header-logo.svg (100%) rename public/{ => assets}/logo-icon.svg (100%) rename {src => public}/assets/notification.svg (100%) rename {src => public}/assets/search.svg (100%) rename {src => public}/assets/settings.svg (100%) rename {src => public}/assets/small-avatar.svg (100%) rename {src => public}/assets/small-logo.svg (100%) rename {src => public}/assets/user.svg (100%) diff --git a/index.html b/index.html index 695feff01..9c887d4fd 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + @@ -11,6 +11,6 @@
- + diff --git a/src/assets/avatar.svg b/public/assets/avatar.svg similarity index 100% rename from src/assets/avatar.svg rename to public/assets/avatar.svg diff --git a/src/assets/empty-avatar.svg b/public/assets/empty-avatar.svg similarity index 100% rename from src/assets/empty-avatar.svg rename to public/assets/empty-avatar.svg diff --git a/src/assets/error-not-found.svg b/public/assets/error-not-found.svg similarity index 100% rename from src/assets/error-not-found.svg rename to public/assets/error-not-found.svg diff --git a/src/assets/exit.svg b/public/assets/exit.svg similarity index 100% rename from src/assets/exit.svg rename to public/assets/exit.svg diff --git a/src/assets/header-logo.svg b/public/assets/header-logo.svg similarity index 100% rename from src/assets/header-logo.svg rename to public/assets/header-logo.svg diff --git a/public/logo-icon.svg b/public/assets/logo-icon.svg similarity index 100% rename from public/logo-icon.svg rename to public/assets/logo-icon.svg diff --git a/src/assets/notification.svg b/public/assets/notification.svg similarity index 100% rename from src/assets/notification.svg rename to public/assets/notification.svg diff --git a/src/assets/search.svg b/public/assets/search.svg similarity index 100% rename from src/assets/search.svg rename to public/assets/search.svg diff --git a/src/assets/settings.svg b/public/assets/settings.svg similarity index 100% rename from src/assets/settings.svg rename to public/assets/settings.svg diff --git a/src/assets/small-avatar.svg b/public/assets/small-avatar.svg similarity index 100% rename from src/assets/small-avatar.svg rename to public/assets/small-avatar.svg diff --git a/src/assets/small-logo.svg b/public/assets/small-logo.svg similarity index 100% rename from src/assets/small-logo.svg rename to public/assets/small-logo.svg diff --git a/src/assets/user.svg b/public/assets/user.svg similarity index 100% rename from src/assets/user.svg rename to public/assets/user.svg diff --git a/src/components/logo/logo.tmpl.ts b/src/components/logo/logo.tmpl.ts index 99f180eb7..11bb9b423 100644 --- a/src/components/logo/logo.tmpl.ts +++ b/src/components/logo/logo.tmpl.ts @@ -1,4 +1,4 @@ export const logo = ` - + ` \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index b3192d8ae..a62383463 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,9 +11,9 @@ const ROUTES: Record = { '/server-error': ServerErrorPage(), '/sign-in': SignInPage(), '/sign-up': SignUpPage(), - '/chats': ChatPage(), + '/': ChatPage(), '/settings': SettingsPage(), - '/': SignInPage() + // '/': SignInPage() } diff --git a/src/pages/chat/index.ts b/src/pages/chat/index.ts index 20c3e509c..29a7be8d3 100644 --- a/src/pages/chat/index.ts +++ b/src/pages/chat/index.ts @@ -17,11 +17,11 @@ export const ChatPage = () => { logo: Logo(), linkToSettings: Link({ to: '/settings', - content: 'settings' + content: 'settings' }), linkToAuth: Link({ to: '/sign-in', - content: 'exit' + content: 'exit' }), title: Title({ title: "Music" diff --git a/src/pages/chat/tmpl/content.tmpl.ts b/src/pages/chat/tmpl/content.tmpl.ts index d51a0a456..d160d8aa7 100644 --- a/src/pages/chat/tmpl/content.tmpl.ts +++ b/src/pages/chat/tmpl/content.tmpl.ts @@ -4,14 +4,14 @@ export const content = `
{{{logo}}}
- notification + notification {{{linkToSettings}}} - small-avatar + small-avatar {{{linkToAuth}}}
@@ -22,7 +22,7 @@ export const content = `
- user + user Alexandr Ivanov
diff --git a/src/pages/error/not-found/tmpl/content.tmpl.ts b/src/pages/error/not-found/tmpl/content.tmpl.ts index 8f20e0710..9c95d31fa 100644 --- a/src/pages/error/not-found/tmpl/content.tmpl.ts +++ b/src/pages/error/not-found/tmpl/content.tmpl.ts @@ -1,7 +1,7 @@ export const content = `
- not-found + not-found {{{ chatPageLink }}}
diff --git a/src/pages/settings/tmpl/settings.tmpl.ts b/src/pages/settings/tmpl/settings.tmpl.ts index 44771ab39..9d81cbba0 100644 --- a/src/pages/settings/tmpl/settings.tmpl.ts +++ b/src/pages/settings/tmpl/settings.tmpl.ts @@ -6,8 +6,8 @@ export const settings = `
- avatar - empty-avatar + avatar + empty-avatar avatar
diff --git a/vite.config.ts b/vite.config.ts index bd02dda71..6a4e84404 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,4 +5,5 @@ export default defineConfig ({ build: { outDir: resolve(__dirname, 'dist'), }, + }) \ No newline at end of file From 318cce165a55f8b15ae59d234e2bb5d8ae2bc83b Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 03:28:38 +0300 Subject: [PATCH 13/26] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D1=80=D0=B5=D0=B4=D0=B8=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/_redirects | 1 + 1 file changed, 1 insertion(+) create mode 100644 public/_redirects diff --git a/public/_redirects b/public/_redirects new file mode 100644 index 000000000..f8243379a --- /dev/null +++ b/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file From 078fa3e7d47e2af0f16c8ec7fe7451dc7282f6bf Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 03:39:34 +0300 Subject: [PATCH 14/26] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++ README.md | 86 +++++------------------------------------------------- 2 files changed, 11 insertions(+), 78 deletions(-) diff --git a/.gitignore b/.gitignore index a547bf36d..c3bb0dbc3 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ dist-ssr *.njsproj *.sln *.sw? + +# Local Netlify folder +.netlify diff --git a/README.md b/README.md index bcd1a1367..d539a9d7d 100644 --- a/README.md +++ b/README.md @@ -1,83 +1,13 @@ -### Ветка, в которой делаете задания спринта, должна называться sprint_i, где i - номер спринта. Не переименовывайте её. +деплой - [![Netlify Status](https://api.netlify.com/api/v1/badges/1798a916-f5c9-4624-9988-58cde9d5c5aa/deploy-status)](https://app.netlify.com/sites/glittery-douhua-6b701b/deploys)https://glittery-douhua-6b701b.netlify.app// -### Откройте pull request в ветку main из ветки, где вы разрабатывали проект, и добавьте ссылку на этот pr в README.md в ветке main. -### ВАЖНО: pull request должен называться “Sprint i” (i — номер спринта). +ссылка на макет: https://www.figma.com/file/xEr1nOAGbkgDnlBelvWrKc/Chat-(my-design)?node-id=1%3A3&mode=dev -### Например, задания для проектной работы во втором спринте вы делаете в ветке sprint_2. Открываете из неё pull request в ветку main. Ссылку на этот pr добавляете в README.md в ветке main. После этого на платформе Практикума нажимаете «Проверить задание». +Сверстаны страницы: чат(заглушка), sign-in, sign-up, settings, error, error 404 -### Также не забудьте проверить, что репозиторий публичный. ---- +Переход между страницами по ссылке +При верстке использован шаблонизатор Рфтвдуифкы -Даже законченный проект остаётся только заготовкой, пока им не начнут пользоваться. Но сначала пользователь должен понять, зачем ему пользоваться вашим кодом. В этом помогает файл README. - -README — первое, что прочитает пользователь, когда попадёт в репозиторий на «Гитхабе». Хороший REAMDE отвечает на четыре вопроса: - -- Готов ли проект к использованию? -- В чём его польза? -- Как установить? -- Как применять? - -## Бейджи - -Быстро понять статус проекта помогают бейджи на «Гитхабе». Иногда разработчики ограничиваются парой бейджев, которые сообщат о статусе тестов кода: - -![Бэйджи](https://github.com/yandex-praktikum/mf.messenger.praktikum.yandex.images/blob/master/mf/b.png) - -Если пользователь увидит ошибку в работе тестов, то поймёт: использовать текущую версию в важном проекте — не лучшая идея. - -Бейджи помогают похвастаться достижениями: насколько популярен проект, как много разработчиков создавало этот код. Через бейджи можно даже пригласить пользователя в чат: - -![Версии](https://github.com/yandex-praktikum/mf.messenger.praktikum.yandex.images/blob/master/mf/vers.png) - -В README **Webpack** строка бейджев подробно рассказывает о покрытии кода тестами. Когда проект протестирован, это вызывает доверие пользователя. Последний бейдж приглашает присоединиться к разработке. - -Другая строка убедит пользователя в стабильности инфраструктуры и популярности проекта. Последний бейдж зовёт в чат проекта. - -## Описание - -Краткое опишите, какую задачу решает проект. Пользователь не верит обещаниям и не готов читать «полотна» текста. Поэтому в описании достаточно нескольких строк: - -![Описание](https://github.com/yandex-praktikum/mf.messenger.praktikum.yandex.images/blob/master/mf/desc.png) - -Авторы **React** дробят описание на абзацы и списки — так проще пробежаться глазами по тексту и найти ключевую информацию. - -Если у проекта есть сайт, добавьте ссылку в заголовок. - -## Установка - -Лучше всего пользователя убеждает собственный опыт. Чем быстрее он начнёт пользоваться проектом, тем раньше почувствует пользу. Для этого помогите ему установить приложение: напишите краткую пошаговую инструкцию. - -Если проект предназначен для разработчиков, добавьте информацию об установке тестовых версий. Например: - -- `npm install` — установка стабильной версии, -- `npm start` — запуск версии для разработчика, -- `npm run build:prod` — сборка стабильной версии. - -## **Примеры использования** - -Хорошо, если сразу после установки пользователь сможет решить свои задачи без изучения проекта. Это особенно верно, если ваш пользователь — не профессиональный разработчик. Но даже профессионал поймёт вас лучше, если показать примеры использования: - -![Ссылки](https://github.com/yandex-praktikum/mf.messenger.praktikum.yandex.images/blob/master/mf/link.png) - -Для более подробных инструкции добавьте новые разделы или ссылки: - -- на документацию, -- вики проекта, -- описание API. - -В учебном проекте будут полезен раздел с описанием стиля кода и правилами разработки: как работать с ветками, пул-реквестами и релизами. - -### **Команда** - -Если вы работаете в команде, укажите основных участников: им будет приятно, а новые разработчики охотнее присоединятся к проекту. «Гитхаб» — не просто инструмент, это социальная сеть разработчиков. - -![Команда](https://github.com/yandex-praktikum/mf.messenger.praktikum.yandex.images/blob/master/mf/team.png) - -### **Примеры README** - -- «[Реакт](https://github.com/facebook/react)», -- «[Эхо](https://github.com/labstack/echo)», -- «[Вебпак](https://github.com/webpack/webpack)», -- «[ТДенгине](https://github.com/taosdata/TDengine)», -- «[Соул-хантинг](https://github.com/vladpereskokov/soul-hunting/)». +- `npm run install` — установка стабильной версии, +- `npm run start` — запуск версии для разработчика, +- `npm run build` — сборка стабильной версии. \ No newline at end of file From 2ec77f6ddffaba2af3df0598d943827dbfa25821 Mon Sep 17 00:00:00 2001 From: Mila Vizelka <65855320+MilaVizelka@users.noreply.github.com> Date: Mon, 2 Oct 2023 03:42:10 +0300 Subject: [PATCH 15/26] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d539a9d7d..55079771a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -деплой - [![Netlify Status](https://api.netlify.com/api/v1/badges/1798a916-f5c9-4624-9988-58cde9d5c5aa/deploy-status)](https://app.netlify.com/sites/glittery-douhua-6b701b/deploys)https://glittery-douhua-6b701b.netlify.app// +деплой - [![Netlify Status](https://api.netlify.com/api/v1/badges/1798a916-f5c9-4624-9988-58cde9d5c5aa/deploy-status)](https://app.netlify.com/sites/glittery-douhua-6b701b/deploys)https://glittery-douhua-6b701b.netlify.app/ ссылка на макет: https://www.figma.com/file/xEr1nOAGbkgDnlBelvWrKc/Chat-(my-design)?node-id=1%3A3&mode=dev @@ -10,4 +10,4 @@ - `npm run install` — установка стабильной версии, - `npm run start` — запуск версии для разработчика, -- `npm run build` — сборка стабильной версии. \ No newline at end of file +- `npm run build` — сборка стабильной версии. From 4f2775109f817eb502aed2f0d9c803913677add8 Mon Sep 17 00:00:00 2001 From: Mila Vizelka <65855320+MilaVizelka@users.noreply.github.com> Date: Mon, 2 Oct 2023 03:51:06 +0300 Subject: [PATCH 16/26] Update README.md --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 55079771a..f6a58692a 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,23 @@ деплой - [![Netlify Status](https://api.netlify.com/api/v1/badges/1798a916-f5c9-4624-9988-58cde9d5c5aa/deploy-status)](https://app.netlify.com/sites/glittery-douhua-6b701b/deploys)https://glittery-douhua-6b701b.netlify.app/ +Ссылки на страницы: +https://glittery-douhua-6b701b.netlify.app/, https://glittery-douhua-6b701b.netlify.app/sign-in - страница аутентификации +https://glittery-douhua-6b701b.netlify.app/sign-up -страница регистрации +https://glittery-douhua-6b701b.netlify.app/settings - страница настроек +https://glittery-douhua-6b701b.netlify.app/chats -страница чатов +https://glittery-douhua-6b701b.netlify.app/not-found - 404 +https://glittery-douhua-6b701b.netlify.app/servr-error - 500 + + ссылка на макет: https://www.figma.com/file/xEr1nOAGbkgDnlBelvWrKc/Chat-(my-design)?node-id=1%3A3&mode=dev Сверстаны страницы: чат(заглушка), sign-in, sign-up, settings, error, error 404 Переход между страницами по ссылке -При верстке использован шаблонизатор Рфтвдуифкы +При верстке использован шаблонизатор Handlebars - `npm run install` — установка стабильной версии, -- `npm run start` — запуск версии для разработчика, +- `npm run dev` — запуск версии для разработчика, +- `npm run start` — сборка и запуск проекта, - `npm run build` — сборка стабильной версии. From 5454c10d9236ce222142136a283b028b5b448a39 Mon Sep 17 00:00:00 2001 From: Mila Vizelka <65855320+MilaVizelka@users.noreply.github.com> Date: Mon, 2 Oct 2023 03:56:41 +0300 Subject: [PATCH 17/26] Updated index.ts --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index a62383463..b3192d8ae 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,9 +11,9 @@ const ROUTES: Record = { '/server-error': ServerErrorPage(), '/sign-in': SignInPage(), '/sign-up': SignUpPage(), - '/': ChatPage(), + '/chats': ChatPage(), '/settings': SettingsPage(), - // '/': SignInPage() + '/': SignInPage() } From c42648cf8a794c1d261ab67a9c190fdeadd0ac40 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 11:52:52 +0300 Subject: [PATCH 18/26] fixed test, some refactoring --- package-lock.json | 70 +++++++++++++++++++++++++++++++++-------------- package.json | 6 ++-- src/style.sass | 31 ++++++++++++--------- 3 files changed, 71 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index d0a04bf11..8e47c1038 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,14 +9,14 @@ "version": "1.0.0", "dependencies": { "@types/node": "^20.8.0", - "typescript": "^5.0.2", - "vite": "^4.4.5" + "typescript": "^5.0.2" }, "devDependencies": { "express": "^4.18.2", "handlebars": "^4.7.8", "path": "^0.12.7", - "sass": "^1.68.0" + "sass": "^1.68.0", + "vite": "^4.4.5" } }, "node_modules/@esbuild/android-arm": { @@ -26,6 +26,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "android" @@ -41,6 +42,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "android" @@ -56,6 +58,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "android" @@ -71,6 +74,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -86,6 +90,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -101,6 +106,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "freebsd" @@ -116,6 +122,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "freebsd" @@ -131,6 +138,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -146,6 +154,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -161,6 +170,7 @@ "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "linux" @@ -176,6 +186,7 @@ "cpu": [ "loong64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -191,6 +202,7 @@ "cpu": [ "mips64el" ], + "dev": true, "optional": true, "os": [ "linux" @@ -206,6 +218,7 @@ "cpu": [ "ppc64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -221,6 +234,7 @@ "cpu": [ "riscv64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -236,6 +250,7 @@ "cpu": [ "s390x" ], + "dev": true, "optional": true, "os": [ "linux" @@ -251,6 +266,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -266,6 +282,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "netbsd" @@ -281,6 +298,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "openbsd" @@ -296,6 +314,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "sunos" @@ -311,6 +330,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -326,6 +346,7 @@ "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "win32" @@ -341,6 +362,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -371,7 +393,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "devOptional": true, + "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -390,7 +412,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8" } @@ -423,7 +445,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -457,7 +479,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "devOptional": true, + "dev": true, "funding": [ { "type": "individual", @@ -563,6 +585,7 @@ "version": "0.18.20", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -656,7 +679,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -704,6 +727,7 @@ "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, "optional": true, "os": [ @@ -738,7 +762,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -835,7 +859,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", - "devOptional": true + "dev": true }, "node_modules/inherits": { "version": "2.0.4", @@ -856,7 +880,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -868,7 +892,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -877,7 +901,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, + "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -889,7 +913,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.12.0" } @@ -970,6 +994,7 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, "funding": [ { "type": "github", @@ -1002,7 +1027,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1056,13 +1081,14 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8.6" }, @@ -1074,6 +1100,7 @@ "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "dev": true, "funding": [ { "type": "opencollective", @@ -1162,7 +1189,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -1174,6 +1201,7 @@ "version": "3.29.4", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "dev": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -1215,7 +1243,7 @@ "version": "1.68.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", - "devOptional": true, + "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -1306,6 +1334,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1323,7 +1352,7 @@ "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==", - "devOptional": true, + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -1424,6 +1453,7 @@ "version": "4.4.9", "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "dev": true, "dependencies": { "esbuild": "^0.18.10", "postcss": "^8.4.27", diff --git a/package.json b/package.json index c86d2b537..be68d4453 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,11 @@ "express": "^4.18.2", "handlebars": "^4.7.8", "path": "^0.12.7", - "sass": "^1.68.0" + "sass": "^1.68.0", + "vite": "^4.4.5" }, "dependencies": { "@types/node": "^20.8.0", - "typescript": "^5.0.2", - "vite": "^4.4.5" + "typescript": "^5.0.2" } } diff --git a/src/style.sass b/src/style.sass index 502827235..50a6b087c 100644 --- a/src/style.sass +++ b/src/style.sass @@ -2,6 +2,11 @@ $background-color: #101E2B $width: 100% $height: 100% $white: #ffffff +$regular: 14px +$weight-regular: 400 +$indent-x2: 8px +$border-radius-x2: 8px + html, body @@ -13,8 +18,8 @@ body body font-family: Roboto, Arial, sans-serif - font-weight: 400 - font-size: 14px + font-weight: $weight-regular + font-size: $regular div box-sizing: border-box @@ -25,18 +30,18 @@ div .input-styled border: 1px solid rgba(0, 0, 0, 0.10) - border-radius: 8px + border-radius: $border-radius-x2 padding: 20px .button-styled border: none - border-radius: 8px + border-radius: $border-radius-x2 padding: 20px width: 100% color: $white background-color: #218FCD font-size: 20px - font-weight: 400 + font-weight: $weight-regular cursor: pointer .link-styled @@ -72,7 +77,7 @@ div filter: sepia(100%) hue-rotate(190deg) saturate(500%) .input-search-label - gap: 8px + gap: $indent-x2 .input-styled background: transparent @@ -104,9 +109,9 @@ div &-header display: flex align-items: center - gap: 8px + gap: $indent-x2 color: $white - font-size: 14px + font-size: $regular font-weight: 700 .wrapper-sign-in-page, @@ -126,12 +131,12 @@ div .fields-list display: flex flex-direction: column - gap: 8px + gap: $indent-x2 margin-bottom: 20px .title-styled color: #504D4D font-size: 36px - font-weight: 400 + font-weight: $weight-regular .link-styled color: #ABABAB @@ -141,7 +146,7 @@ div .wrapper-avatar font-size: 16px color: #A5A7A9 - font-weight: 400 + font-weight: $weight-regular margin-bottom: 20px .header @@ -166,12 +171,12 @@ div width: 500px .title-styled font-size: 64px - font-weight: 400 + font-weight: $weight-regular margin-bottom: 35px span font-size: 20px color: #8F8989 - font-weight: 400 + font-weight: $weight-regular margin-bottom: 25px From 6b5ef93c89094a47bd8a25c665ac76b6ee15e759 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 23:27:01 +0300 Subject: [PATCH 19/26] fixed test --- vite.config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 6a4e84404..f65fa5bfc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,5 +5,4 @@ export default defineConfig ({ build: { outDir: resolve(__dirname, 'dist'), }, - -}) \ No newline at end of file +}) From a37ff926350cd33aebfda29f0090c50e90f560c8 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 23:30:20 +0300 Subject: [PATCH 20/26] fixed index.ts --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index b3192d8ae..0d44f46be 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,5 +23,5 @@ window.addEventListener('DOMContentLoaded', () => { if (root) { root.innerHTML = ROUTES[window.location.pathname] || NotFoundPage() } - }) + From f05104088307536eac9413dedba48ef5a9367200 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 23:40:48 +0300 Subject: [PATCH 21/26] fixed tests --- app.js | 1 + src/index.ts | 1 + src/pages/chat/index.ts | 2 +- src/pages/chat/tmpl/content.tmpl.ts | 3 +- src/pages/error/not-found/index.ts | 2 +- .../error/not-found/tmpl/content.tmpl.ts | 2 +- src/pages/error/server-error/index.ts | 2 +- .../error/server-error/tmpl/content.tmpl.ts | 3 +- src/pages/settings/index.ts | 4 +- src/pages/settings/tmpl/settings.tmpl.ts | 41 ++++++++----------- src/pages/sign-in/index.ts | 1 + src/pages/sign-in/tmpl/content.tmpl.ts | 4 +- src/pages/sign-up/index.ts | 3 +- src/pages/sign-up/tmpl/content.tmpl.ts | 2 +- 14 files changed, 33 insertions(+), 38 deletions(-) diff --git a/app.js b/app.js index 15a4a0960..28b7a060c 100644 --- a/app.js +++ b/app.js @@ -14,3 +14,4 @@ app.get("/", (req, res) => { app.listen(process.env.PORT || PORT, () => console.log("success")) + diff --git a/src/index.ts b/src/index.ts index 0d44f46be..315c00a58 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,3 +25,4 @@ window.addEventListener('DOMContentLoaded', () => { } }) + diff --git a/src/pages/chat/index.ts b/src/pages/chat/index.ts index 29a7be8d3..df2da35c2 100644 --- a/src/pages/chat/index.ts +++ b/src/pages/chat/index.ts @@ -28,4 +28,4 @@ export const ChatPage = () => { }), input: Input(chatField), }); -} \ No newline at end of file +} diff --git a/src/pages/chat/tmpl/content.tmpl.ts b/src/pages/chat/tmpl/content.tmpl.ts index d160d8aa7..e713f0837 100644 --- a/src/pages/chat/tmpl/content.tmpl.ts +++ b/src/pages/chat/tmpl/content.tmpl.ts @@ -28,5 +28,4 @@ export const content = `
- -` \ No newline at end of file +` diff --git a/src/pages/error/not-found/index.ts b/src/pages/error/not-found/index.ts index 54376a132..b7b663b7c 100644 --- a/src/pages/error/not-found/index.ts +++ b/src/pages/error/not-found/index.ts @@ -9,4 +9,4 @@ export const NotFoundPage = () => { content: 'назад к чатам' }) }); -} \ No newline at end of file +} diff --git a/src/pages/error/not-found/tmpl/content.tmpl.ts b/src/pages/error/not-found/tmpl/content.tmpl.ts index 9c95d31fa..1a8c58fe8 100644 --- a/src/pages/error/not-found/tmpl/content.tmpl.ts +++ b/src/pages/error/not-found/tmpl/content.tmpl.ts @@ -5,4 +5,4 @@ export const content = ` {{{ chatPageLink }}}
-` \ No newline at end of file +` diff --git a/src/pages/error/server-error/index.ts b/src/pages/error/server-error/index.ts index 20abfc94b..be83892f4 100644 --- a/src/pages/error/server-error/index.ts +++ b/src/pages/error/server-error/index.ts @@ -13,4 +13,4 @@ export const ServerErrorPage = () => { content: 'назад к чатам' }) }); -} \ No newline at end of file +} diff --git a/src/pages/error/server-error/tmpl/content.tmpl.ts b/src/pages/error/server-error/tmpl/content.tmpl.ts index 258a17e89..551ee9019 100644 --- a/src/pages/error/server-error/tmpl/content.tmpl.ts +++ b/src/pages/error/server-error/tmpl/content.tmpl.ts @@ -6,5 +6,4 @@ export const content = ` {{{ chatPageLink }}}
- -` \ No newline at end of file +` diff --git a/src/pages/settings/index.ts b/src/pages/settings/index.ts index 8e44f0bef..4a3a123a6 100644 --- a/src/pages/settings/index.ts +++ b/src/pages/settings/index.ts @@ -10,7 +10,6 @@ const signUpFieldList = { placeholder: 'first name', type: 'text' - }, { placeholder: 'second name', @@ -32,7 +31,6 @@ const signUpFieldList = placeholder: 'phone', type: 'phone' }, - ] as InputProps export const SettingsPage = () => { @@ -42,4 +40,4 @@ export const SettingsPage = () => { button: Button({text: 'Save'}), input: Input(signUpFieldList), }) -} \ No newline at end of file +} diff --git a/src/pages/settings/tmpl/settings.tmpl.ts b/src/pages/settings/tmpl/settings.tmpl.ts index 9d81cbba0..836c93ad3 100644 --- a/src/pages/settings/tmpl/settings.tmpl.ts +++ b/src/pages/settings/tmpl/settings.tmpl.ts @@ -1,25 +1,20 @@ export const settings = ` - -
-
- {{{ logo }}} -
-
-
- avatar - empty-avatar - avatar -
- - {{{ input }}} -
{{{ button }}}
- - - {{{ authPageLink }}} +
+
+ {{{ logo }}} +
+
+
+ avatar + empty-avatar + avatar +
+
+ {{{ input }}} +
{{{ button }}}
+
+ + {{{ authPageLink }}} +
-
- - - - -` \ No newline at end of file +` diff --git a/src/pages/sign-in/index.ts b/src/pages/sign-in/index.ts index 423a50d4e..6268eebd6 100644 --- a/src/pages/sign-in/index.ts +++ b/src/pages/sign-in/index.ts @@ -28,3 +28,4 @@ export const SignInPage = () => { button: Button({text: 'Enter'}) }); } + diff --git a/src/pages/sign-in/tmpl/content.tmpl.ts b/src/pages/sign-in/tmpl/content.tmpl.ts index 417b5a751..bf83592ea 100644 --- a/src/pages/sign-in/tmpl/content.tmpl.ts +++ b/src/pages/sign-in/tmpl/content.tmpl.ts @@ -14,5 +14,5 @@ {{{ signUpPageLink }}}
- - ` \ No newline at end of file + ` + \ No newline at end of file diff --git a/src/pages/sign-up/index.ts b/src/pages/sign-up/index.ts index b50e4fa91..da902834e 100644 --- a/src/pages/sign-up/index.ts +++ b/src/pages/sign-up/index.ts @@ -43,4 +43,5 @@ export const SignUpPage = () => { input: Input(signUpFieldList), button: Button({text: 'Create account'}) }); -} \ No newline at end of file +} + diff --git a/src/pages/sign-up/tmpl/content.tmpl.ts b/src/pages/sign-up/tmpl/content.tmpl.ts index 32b7027a2..ddf3b904d 100644 --- a/src/pages/sign-up/tmpl/content.tmpl.ts +++ b/src/pages/sign-up/tmpl/content.tmpl.ts @@ -14,4 +14,4 @@ export const content = ` {{{ signUpPageLink }}}
-` \ No newline at end of file +` From ec962c05a770ff585f44d85811321a3c818cb3c5 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 23:43:59 +0300 Subject: [PATCH 22/26] fixed tests --- src/components/button/button.tmpl.ts | 2 +- src/components/button/index.ts | 2 +- src/components/input/index.ts | 2 +- src/components/input/input.tmpl.ts | 19 ++++++++----------- src/components/link/index.ts | 2 +- src/components/link/link.tmpl.ts | 2 +- src/components/logo/index.ts | 3 +-- src/components/logo/logo.tmpl.ts | 3 +-- src/components/title/index.ts | 2 +- src/components/title/title.tmpl.ts | 2 +- 10 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/components/button/button.tmpl.ts b/src/components/button/button.tmpl.ts index 247f6baf5..7ae2fdc36 100644 --- a/src/components/button/button.tmpl.ts +++ b/src/components/button/button.tmpl.ts @@ -1,3 +1,3 @@ export const button = ` -` \ No newline at end of file +` diff --git a/src/components/button/index.ts b/src/components/button/index.ts index e0b06e2f2..e807ebd63 100644 --- a/src/components/button/index.ts +++ b/src/components/button/index.ts @@ -6,4 +6,4 @@ type ButtonProps = { } export const Button = (props: ButtonProps) => { return HandleBars.compile(button)(props) -} \ No newline at end of file +} diff --git a/src/components/input/index.ts b/src/components/input/index.ts index a60b7b80e..d28361576 100644 --- a/src/components/input/index.ts +++ b/src/components/input/index.ts @@ -7,4 +7,4 @@ export type InputProps = { } export const Input = (props: InputProps) => { return HandleBars.compile(input)(props); -} \ No newline at end of file +} diff --git a/src/components/input/input.tmpl.ts b/src/components/input/input.tmpl.ts index b4b2f9327..bbbfb9d84 100644 --- a/src/components/input/input.tmpl.ts +++ b/src/components/input/input.tmpl.ts @@ -1,14 +1,11 @@ export const input = ` - -
- {{#each this}} - - - - {{/each}} -
- - - +
+ {{#each this}} + + + + {{/each}} +
` + diff --git a/src/components/link/index.ts b/src/components/link/index.ts index 68ed8568e..355e87873 100644 --- a/src/components/link/index.ts +++ b/src/components/link/index.ts @@ -7,6 +7,6 @@ type LinkProps = { } export const Link = (props: LinkProps ) => { return HandleBars.compile(link)(props); - } + diff --git a/src/components/link/link.tmpl.ts b/src/components/link/link.tmpl.ts index 7adcfc465..345fdec9e 100644 --- a/src/components/link/link.tmpl.ts +++ b/src/components/link/link.tmpl.ts @@ -1,3 +1,3 @@ export const link = ` {{{ content }}} -` \ No newline at end of file +` diff --git a/src/components/logo/index.ts b/src/components/logo/index.ts index d2e208591..547a9b9ca 100644 --- a/src/components/logo/index.ts +++ b/src/components/logo/index.ts @@ -1,7 +1,6 @@ import HandleBars from "handlebars"; import { logo } from "./logo.tmpl.ts"; - export const Logo = () => { return HandleBars.compile(logo)({}); -} \ No newline at end of file +} diff --git a/src/components/logo/logo.tmpl.ts b/src/components/logo/logo.tmpl.ts index 11bb9b423..3cc1e9938 100644 --- a/src/components/logo/logo.tmpl.ts +++ b/src/components/logo/logo.tmpl.ts @@ -1,4 +1,3 @@ export const logo = ` - -` \ No newline at end of file +` diff --git a/src/components/title/index.ts b/src/components/title/index.ts index ddfdbd7c3..463181e71 100644 --- a/src/components/title/index.ts +++ b/src/components/title/index.ts @@ -8,4 +8,4 @@ export const Title = (props: TitleProps) => { return HandleBars.compile(title)({ title: props.title }) -} \ No newline at end of file +} diff --git a/src/components/title/title.tmpl.ts b/src/components/title/title.tmpl.ts index 6fe7e3c9c..afc2766fd 100644 --- a/src/components/title/title.tmpl.ts +++ b/src/components/title/title.tmpl.ts @@ -1,3 +1,3 @@ export const title = `

{{ title }}

-` \ No newline at end of file +` From bb8cb6b41d9916b76fbf9cc072aa42c974409a84 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 23:47:11 +0300 Subject: [PATCH 23/26] fixed test --- src/pages/sign-in/tmpl/content.tmpl.ts | 31 +++++++++++++------------- src/pages/sign-up/tmpl/content.tmpl.ts | 1 + 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/pages/sign-in/tmpl/content.tmpl.ts b/src/pages/sign-in/tmpl/content.tmpl.ts index bf83592ea..b2fef7a53 100644 --- a/src/pages/sign-in/tmpl/content.tmpl.ts +++ b/src/pages/sign-in/tmpl/content.tmpl.ts @@ -1,18 +1,19 @@ export const content = ` - + ` + \ No newline at end of file diff --git a/src/pages/sign-up/tmpl/content.tmpl.ts b/src/pages/sign-up/tmpl/content.tmpl.ts index ddf3b904d..4b0cb2be0 100644 --- a/src/pages/sign-up/tmpl/content.tmpl.ts +++ b/src/pages/sign-up/tmpl/content.tmpl.ts @@ -15,3 +15,4 @@ export const content = ` ` + From 4211129300aa5d29bde5cae47e8279a873e0f9bb Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Mon, 2 Oct 2023 23:54:54 +0300 Subject: [PATCH 24/26] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/input/input.tmpl.ts | 1 - src/components/link/index.ts | 2 -- src/index.ts | 2 -- src/pages/sign-in/index.ts | 1 - src/pages/sign-in/tmpl/content.tmpl.ts | 2 -- src/pages/sign-up/index.ts | 1 - src/pages/sign-up/tmpl/content.tmpl.ts | 1 - 7 files changed, 10 deletions(-) diff --git a/src/components/input/input.tmpl.ts b/src/components/input/input.tmpl.ts index bbbfb9d84..3350591f8 100644 --- a/src/components/input/input.tmpl.ts +++ b/src/components/input/input.tmpl.ts @@ -8,4 +8,3 @@ export const input = ` {{/each}} ` - diff --git a/src/components/link/index.ts b/src/components/link/index.ts index 355e87873..6c551c87c 100644 --- a/src/components/link/index.ts +++ b/src/components/link/index.ts @@ -8,5 +8,3 @@ type LinkProps = { export const Link = (props: LinkProps ) => { return HandleBars.compile(link)(props); } - - diff --git a/src/index.ts b/src/index.ts index 315c00a58..4483e95a8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,5 +24,3 @@ window.addEventListener('DOMContentLoaded', () => { root.innerHTML = ROUTES[window.location.pathname] || NotFoundPage() } }) - - diff --git a/src/pages/sign-in/index.ts b/src/pages/sign-in/index.ts index 6268eebd6..423a50d4e 100644 --- a/src/pages/sign-in/index.ts +++ b/src/pages/sign-in/index.ts @@ -28,4 +28,3 @@ export const SignInPage = () => { button: Button({text: 'Enter'}) }); } - diff --git a/src/pages/sign-in/tmpl/content.tmpl.ts b/src/pages/sign-in/tmpl/content.tmpl.ts index b2fef7a53..af2a4fa94 100644 --- a/src/pages/sign-in/tmpl/content.tmpl.ts +++ b/src/pages/sign-in/tmpl/content.tmpl.ts @@ -15,5 +15,3 @@ ` - - \ No newline at end of file diff --git a/src/pages/sign-up/index.ts b/src/pages/sign-up/index.ts index da902834e..926169bf4 100644 --- a/src/pages/sign-up/index.ts +++ b/src/pages/sign-up/index.ts @@ -44,4 +44,3 @@ export const SignUpPage = () => { button: Button({text: 'Create account'}) }); } - diff --git a/src/pages/sign-up/tmpl/content.tmpl.ts b/src/pages/sign-up/tmpl/content.tmpl.ts index 4b0cb2be0..ddf3b904d 100644 --- a/src/pages/sign-up/tmpl/content.tmpl.ts +++ b/src/pages/sign-up/tmpl/content.tmpl.ts @@ -15,4 +15,3 @@ export const content = ` ` - From e9dbd4d6832f2c79f4036a2aa7a8401d806c7652 Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Tue, 3 Oct 2023 00:05:52 +0300 Subject: [PATCH 25/26] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B9=D0=BA=D0=B0=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app.js b/app.js index 28b7a060c..da52ae939 100644 --- a/app.js +++ b/app.js @@ -9,9 +9,7 @@ app.use(express.static(path.join(__dirname, "dist"))); app.set("view engine", "hbs"); app.get("/", (req, res) => { - res.render("index.html", {title: "AuthPage"}); + res.render("index.html", {title: "SignInPage"}); }); app.listen(process.env.PORT || PORT, () => console.log("success")) - - From 82b65f16421f8bc37c4456d8fe50a1ce4009c8fa Mon Sep 17 00:00:00 2001 From: Mila Vizelka Date: Tue, 3 Oct 2023 00:22:05 +0300 Subject: [PATCH 26/26] =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=B8=D0=BB=D0=B4=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be68d4453..e58dab5e6 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "type": "commonjs", "scripts": { "dev": "vite --port 3000", - "start": "node app.js", + "start": "vite build && node app.js", "build": "tsc && vite build", "preview": "vite preview" },