From f5340c007d9221b77457c671f8a1b6a5569f7b50 Mon Sep 17 00:00:00 2001 From: Rohan Lekhwani Date: Sat, 20 Mar 2021 12:09:33 +0530 Subject: [PATCH 1/5] [IMPROVE] Unsigned Home layout demo page --- client/package-lock.json | 549 ++++++++++++++++++------ client/package.json | 4 +- client/src/components/Home/index.css | 27 +- client/src/components/Home/index.js | 453 ++++++++++++++++--- client/src/components/common/Countup.js | 20 +- 5 files changed, 866 insertions(+), 187 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index ed7dcc9..050fb60 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -114,6 +114,9 @@ "@babel/helper-optimise-call-expression": "^7.10.4", "@babel/helper-replace-supers": "^7.12.1", "@babel/helper-split-export-declaration": "^7.10.4" + }, + "dependencies": { + "@babel/core": {} } }, "@babel/helper-create-regexp-features-plugin": { @@ -368,6 +371,9 @@ "requires": { "@babel/helper-create-class-features-plugin": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4" + }, + "dependencies": { + "@babel/core": {} } }, "@babel/plugin-proposal-decorators": { @@ -423,6 +429,9 @@ "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + }, + "dependencies": { + "@babel/core": {} } }, "@babel/plugin-proposal-numeric-separator": { @@ -855,6 +864,9 @@ "integrity": "sha512-cAzB+UzBIrekfYxyLlFqf/OagTvHLcVBb5vpouzkYkBclRPraiygVnafvAoipErZLI8ANv8Ecn6E/m5qPXD26w==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" + }, + "dependencies": { + "@babel/core": {} } }, "@babel/plugin-transform-react-jsx": { @@ -877,22 +889,6 @@ "@babel/plugin-transform-react-jsx": "^7.12.12" } }, - "@babel/plugin-transform-react-jsx-self": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.12.1.tgz", - "integrity": "sha512-FbpL0ieNWiiBB5tCldX17EtXgmzeEZjFrix72rQYeq9X6nUK38HCaxexzVQrZWXanxKJPKVVIU37gFjEQYkPkA==", - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-react-jsx-source": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.12.1.tgz", - "integrity": "sha512-keQ5kBfjJNRc6zZN1/nVHCd6LLIHq4aUKcVnvE/2l+ZZROSbqoiGFRtT5t3Is89XJxBQaP7NLZX2jgGHdZvvFQ==", - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, "@babel/plugin-transform-react-pure-annotations": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz", @@ -918,24 +914,6 @@ "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-transform-runtime": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz", - "integrity": "sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg==", - "requires": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "resolve": "^1.8.1", - "semver": "^5.5.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "@babel/plugin-transform-shorthand-properties": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz", @@ -1175,6 +1153,11 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, + "@brainhubeu/react-carousel": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@brainhubeu/react-carousel/-/react-carousel-2.0.2.tgz", + "integrity": "sha512-oasPq2bljd8PYnyFwbhKLRSTYJjKp81oycy3M7TTgvQQBh/zZ7LVL/89KbjflRXGnSzLndFK+BPfCTFoAHRmTQ==" + }, "@cnakazawa/watch": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", @@ -2861,6 +2844,7 @@ "slash": "^3.0.0" }, "dependencies": { + "@babel/core": {}, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -2872,38 +2856,6 @@ } } }, - "babel-loader": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", - "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==", - "requires": { - "find-cache-dir": "^2.1.0", - "loader-utils": "^1.4.0", - "mkdirp": "^0.5.3", - "pify": "^4.0.1", - "schema-utils": "^2.6.5" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "requires": { - "minimist": "^1.2.0" - } - }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - } - } - } - }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", @@ -3033,6 +2985,49 @@ "babel-plugin-transform-react-remove-prop-types": "0.4.24" }, "dependencies": { + "@babel/core": { + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz", + "integrity": "sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==", + "requires": { + "@babel/types": "^7.12.13" + }, + "dependencies": { + "@babel/types": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", + "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } + } + }, "@babel/plugin-proposal-numeric-separator": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.1.tgz", @@ -3052,6 +3047,57 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.0" } }, + "@babel/plugin-syntax-jsx": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz", + "integrity": "sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==" + } + } + }, + "@babel/plugin-transform-react-jsx": { + "dependencies": { + "@babel/core": {} + } + }, + "@babel/plugin-transform-react-jsx-development": { + "dependencies": { + "@babel/core": {} + } + }, + "@babel/plugin-transform-react-jsx-self": { + "dependencies": { + "@babel/core": {} + } + }, + "@babel/plugin-transform-react-jsx-source": { + "dependencies": { + "@babel/core": {} + } + }, + "@babel/plugin-transform-react-pure-annotations": { + "dependencies": { + "@babel/core": {} + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz", + "integrity": "sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg==", + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "resolve": "^1.8.1", + "semver": "^5.5.1" + } + }, "@babel/preset-env": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz", @@ -3123,6 +3169,43 @@ "@babel/types": "^7.12.1", "core-js-compat": "^3.6.2", "semver": "^5.5.0" + }, + "dependencies": { + "@babel/plugin-proposal-numeric-separator": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz", + "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "dependencies": { + "@babel/core": {}, + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==" + } + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.8.tgz", + "integrity": "sha512-hpbBwbTgd7Cz1QryvwJZRo1U0k1q8uyBmeXOSQUjdg/A2TASkhR/rz7AyqZ/kS8kbpsNA80rOYbxySBJAqmhhQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "dependencies": { + "@babel/core": {}, + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==" + } + } + } } }, "@babel/preset-react": { @@ -3137,6 +3220,92 @@ "@babel/plugin-transform-react-jsx-self": "^7.12.1", "@babel/plugin-transform-react-jsx-source": "^7.12.1", "@babel/plugin-transform-react-pure-annotations": "^7.12.1" + }, + "dependencies": { + "@babel/helper-module-imports": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz", + "integrity": "sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/plugin-transform-react-jsx": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.17.tgz", + "integrity": "sha512-mwaVNcXV+l6qJOuRhpdTEj8sT/Z0owAVWf9QujTZ0d2ye9X/K+MTOTSizcgKOj18PGnTc/7g1I4+cIUjsKhBcw==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/types": "^7.12.17" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==" + } + } + }, + "@babel/plugin-transform-react-jsx-development": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.17.tgz", + "integrity": "sha512-BPjYV86SVuOaudFhsJR1zjgxxOhJDt6JHNoD48DxWEIxUCAMjV1ys6DYw4SDYZh0b1QsS2vfIA9t/ZsQGsDOUQ==", + "requires": { + "@babel/plugin-transform-react-jsx": "^7.12.17" + } + }, + "@babel/plugin-transform-react-jsx-self": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.12.13.tgz", + "integrity": "sha512-FXYw98TTJ125GVCCkFLZXlZ1qGcsYqNQhVBQcZjyrwf8FEUtVfKIoidnO8S0q+KBQpDYNTmiGo1gn67Vti04lQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==" + } + } + }, + "@babel/plugin-transform-react-jsx-source": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.12.13.tgz", + "integrity": "sha512-O5JJi6fyfih0WfDgIJXksSPhGP/G0fQpfxYy87sDc+1sFmsCS6wr3aAn+whbzkhbjtq4VMqLRaSzR6IsshIC0Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==" + } + } + }, + "@babel/plugin-transform-react-pure-annotations": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz", + "integrity": "sha512-RqeaHiwZtphSIUZ5I85PEH19LOSzxfuEazoY7/pWASCAIBuATQzpSVD+eT6MebeeZT2F4eSL0u4vw6n4Nm0Mjg==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/types": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", + "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/runtime": { @@ -3151,6 +3320,11 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, @@ -4208,25 +4382,6 @@ "sha.js": "^2.4.8" } }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "crypto-browserify": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", @@ -5839,6 +5994,25 @@ "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, "exit": { @@ -6213,6 +6387,22 @@ "commondir": "^1.0.1", "make-dir": "^2.0.0", "pkg-dir": "^3.0.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, "find-up": { @@ -6577,9 +6767,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz", - "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "optional": true }, "function-bind": { @@ -7743,14 +7933,6 @@ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "requires": { - "is-docker": "^2.0.0" - } - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -9158,22 +9340,6 @@ "sourcemap-codec": "^1.4.4" } }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "makeerror": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", @@ -9683,6 +9849,15 @@ "which": "^2.0.2" }, "dependencies": { + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "optional": true, + "requires": { + "is-docker": "^2.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -9932,6 +10107,16 @@ "requires": { "is-docker": "^2.0.0", "is-wsl": "^2.1.1" + }, + "dependencies": { + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "requires": { + "is-docker": "^2.0.0" + } + } } }, "opn": { @@ -10445,6 +10630,19 @@ "requires": { "postcss": "^7.0.2", "postcss-selector-parser": "^6.0.2" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" + } + } } }, "postcss-browser-comments": { @@ -10463,6 +10661,19 @@ "postcss": "^7.0.27", "postcss-selector-parser": "^6.0.2", "postcss-value-parser": "^4.0.2" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" + } + } } }, "postcss-color-functional-notation": { @@ -10973,6 +11184,19 @@ "postcss": "^7.0.32", "postcss-selector-parser": "^6.0.2", "postcss-value-parser": "^4.1.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" + } + } } }, "postcss-modules-scope": { @@ -10982,6 +11206,19 @@ "requires": { "postcss": "^7.0.6", "postcss-selector-parser": "^6.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" + } + } } }, "postcss-modules-values": { @@ -11351,17 +11588,6 @@ "postcss": "^7.0.2" } }, - "postcss-selector-parser": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", - "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", - "requires": { - "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1", - "util-deprecate": "^1.0.2" - } - }, "postcss-svgo": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz", @@ -11999,6 +12225,75 @@ "webpack-dev-server": "3.11.0", "webpack-manifest-plugin": "2.2.0", "workbox-webpack-plugin": "5.1.4" + }, + "dependencies": { + "@babel/core": { + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "babel-loader": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", + "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==", + "requires": { + "find-cache-dir": "^2.1.0", + "loader-utils": "^1.4.0", + "mkdirp": "^0.5.3", + "pify": "^4.0.1", + "schema-utils": "^2.6.5" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } } }, "react-syntax-highlighter": { @@ -12024,6 +12319,14 @@ "prop-types": "^15.6.2" } }, + "react-visibility-sensor": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/react-visibility-sensor/-/react-visibility-sensor-5.1.1.tgz", + "integrity": "sha512-cTUHqIK+zDYpeK19rzW6zF9YfT4486TIgizZW53wEZ+/GPBbK7cNS0EHyJVyHYacwFEvvHLEKfgJndbemWhB/w==", + "requires": { + "prop-types": "^15.7.2" + } + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", diff --git a/client/package.json b/client/package.json index ecfbc68..c7b5fb4 100644 --- a/client/package.json +++ b/client/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@brainhubeu/react-carousel": "^2.0.2", "@material-ui/core": "^4.11.2", "@material-ui/lab": "^4.0.0-alpha.57", "axios": "^0.21.1", @@ -15,7 +16,8 @@ "react-router": "^5.2.0", "react-router-dom": "^5.2.0", "react-scripts": "4.0.1", - "react-syntax-highlighter": "^15.4.3" + "react-syntax-highlighter": "^15.4.3", + "react-visibility-sensor": "^5.1.1" }, "scripts": { "start": "PORT=3002 react-scripts start", diff --git a/client/src/components/Home/index.css b/client/src/components/Home/index.css index ccd7e09..681eebf 100644 --- a/client/src/components/Home/index.css +++ b/client/src/components/Home/index.css @@ -17,7 +17,6 @@ } .unsigned-home-heading { - font-weight: 600; color: hsl(240, 6%, 17%); margin: 20px 0; font-weight: 200; @@ -31,6 +30,9 @@ .unsigned-home-header { margin: 40px 30px; + display: flex; + flex-direction: column; + align-items: center; text-align: center; } @@ -38,6 +40,7 @@ display: flex; justify-content: center; align-items: center; + margin-top: 20px; } .main-stats-container { @@ -104,7 +107,7 @@ } .signed-home-header p { - font-size: 0.90em; + font-size: 0.9em; line-height: 27px; color: #252525; } @@ -114,14 +117,14 @@ } .signed-home-shortcut-container h5 { - font-size: 0.90em; + font-size: 0.9em; } .signed-home-shortcut { background-color: #e3e9fe66; padding: 14px; border-radius: 5px; - font-size: 0.90em; + font-size: 0.9em; cursor: pointer; display: flex; align-items: center; @@ -142,3 +145,19 @@ height: 1.7em; margin-right: 5px; } + +.select-role-button { + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + border-radius: 50%; + height: 150px; + width: 150px; + border: 5px solid #ee4a5b; +} + +.select-role-button:hover { + border: 5px solid #2f343d; + cursor: pointer; +} diff --git a/client/src/components/Home/index.js b/client/src/components/Home/index.js index 7ae991c..bc53611 100644 --- a/client/src/components/Home/index.js +++ b/client/src/components/Home/index.js @@ -1,10 +1,144 @@ -import { Button } from "@material-ui/core"; +import React, { useState } from "react"; +import { + Button, + TextField, + Select, + MenuItem, + InputAdornment, +} from "@material-ui/core"; +import Carousel, { + slidesToShowPlugin, + slidesToScrollPlugin, + autoplayPlugin, +} from "@brainhubeu/react-carousel"; +import "@brainhubeu/react-carousel/lib/style.css"; +import { BsSearch } from "react-icons/bs"; +import { FiThumbsUp } from "react-icons/fi"; +import { FaRegComment, FaLaptopCode, FaRegSun } from "react-icons/fa"; +import { RiAdminLine } from "react-icons/ri"; +import { BsChatDots } from "react-icons/bs"; import Countup from "./../common/Countup"; +import { rcApiDomain } from "../../utils/constants"; +import VisibilitySensor from "react-visibility-sensor"; import "./index.css"; export default function Home(props) { - const { users, rooms, onlineUsers, totalMessages } = props.stats; + const { users, onlineUsers, totalMessages } = props.stats; + const [searchCategory, setSearchCategory] = useState(""); + const [carouselValue, setCarouselValue] = useState(0); + const [startCounter, setStartCounter] = useState(false); + const carouselItems = [ + { + name: "Data protection solutions", + description: "5 security features that every company should keep in mind", + imageUrl: + "https://528977-1685022-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2021/03/Cover-Image-Blog-11.jpg.webp", + url: + "https://rocket.chat/blog/learn/data-protection-solutions-security-features/", + }, + { + name: "Rocket.Chat raises $19m", + description: + "In Series A funding confirming privacy-first communication as a major trend in 2021", + imageUrl: + "https://528977-1685022-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2021/02/new_header.jpg.webp", + url: + "https://rocket.chat/blog/company/rocket-chat-raises-19-million-in-series-a-funding-confirming-privacy-first-communication-as-a-major-trend-in-2021/", + }, + { + name: "4 Different Slack Alternatives", + description: + "We’ve Tried 4 Different Slack Alternatives & Here’s Our Conclusion", + imageUrl: + "https://528977-1685022-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2020/12/Frame-9.png.webp", + url: "https://rocket.chat/blog/learn/slack-alternative/", + }, + { + name: "Is WhatsApp safe for companies?", + description: "A quick guide for secure messaging", + imageUrl: + "https://528977-1685022-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2021/01/whatsapp-safe-secure-messaging-blog.jpg", + url: "https://rocket.chat/blog/learn/whatsapp-guide-secure-messaging/", + }, + { + name: "Security Bundle", + description: + "Get to Know Rocket.Chat’s Newest Weapon For Secure Messaging", + imageUrl: + "https://528977-1685022-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2021/02/Security-Bundle-Ilustra.jpg.webp", + url: + "https://rocket.chat/blog/product/security-bundle-for-secure-messaging/", + }, + ]; + + const activityItems = [ + { + title: + "I am setting up live chat and want to send an attachment ...how do I do that?", + author: "LigayaFernandez", + role: "LiveChat User", + community: "Question Forum", + time: "17 min ago", + upvotes: 0, + comments: 1, + }, + { + title: "Stranger Introduction", + author: "Izzie ", + role: "GSoC Student", + community: "GSoC 2021", + time: "1 hour ago", + upvotes: 5, + comments: 10, + }, + { + title: "Setting Up Rocket Chat", + author: "arary", + role: "Developer", + community: "Developer Discussions", + time: "2 hours ago", + upvotes: 0, + comments: 1, + }, + { + title: "RC4Community Improvements", + author: "aumurad", + role: "Admin", + community: "Announcements", + time: "4 hours ago", + upvotes: 50, + comments: 3, + }, + ]; + + const Item = (props) => { + return ( +
+ + +

{props.item.name}

+
+

{props.item.description}

+
+ ); + }; + + const handleChange = (event) => { + setSearchCategory(event.target.value); + }; + + const onCarouselChange = (value) => { + setCarouselValue(value); + }; const getGreetings = () => { let d = new Date(); @@ -19,21 +153,19 @@ export default function Home(props) { return "Good evening"; }; + function onVisibleChange(isVisible) { + if (isVisible) { + setStartCounter(isVisible); + } + } + if (!props.authState.isLoggedIn) { return (

- Real-time Collaboration + Welcome to our Community
- - Powered by RCforCommunities -

@@ -42,49 +174,264 @@ export default function Home(props) { time you need it, all in one{" "} productivity-amplifying full-lifecycle platform

+
+ +
+ + + + + + ), + }} + /> +
+ +
+ +
-
-
-
-
- rooms - -
Rooms
-
-
- users + Get More Done, Together! + +
+
+ users + + - -
Users
-
-
- messages +
Users
+
+
+ messages + + - -
Messages Exchanged
-
-
- online-users + +
Messages Exchanged
+
+
+ online-users + + - -
Online Users
-
+ +
Online Users
-
- +
+

+ Featured Content +

+ ( + + ))} + plugins={[ + "centered", + "infinite", + "arrows", + { + resolve: slidesToShowPlugin, + options: { + numberOfSlides: 3, + }, + }, + { + resolve: slidesToScrollPlugin, + options: { + numberOfSlides: 1, + }, + }, + { + resolve: autoplayPlugin, + options: { + interval: 2000, + }, + }, + ]} + /> +

+ Select Your Role +

+
+
+ + Admin +
+
+ + Developer
-
+
+ + Live Chat User +
+
+ + GSoC Student +
+
+
+

Community Activity

+ {activityItems.map((item) => ( +
+
+ +
+

{item.title}

+

+ by{" "} + + {item.author}({item.role}) + {" "} + in {item.community} {item.time}{" "} +

+
+
+
+
+ + {item.upvotes} +
+
+ + {item.comments} +
+
+
+ ))} +
); } @@ -94,9 +441,7 @@ export default function Home(props) {

{getGreetings()}, {props.authState.user.name}

-

- We're ready to go. -

+

We're ready to go.

@@ -133,7 +478,11 @@ export default function Home(props) {
- community + community ); diff --git a/client/src/components/common/Countup.js b/client/src/components/common/Countup.js index d2287b9..2a06823 100644 --- a/client/src/components/common/Countup.js +++ b/client/src/components/common/Countup.js @@ -6,13 +6,19 @@ export default function Countup(props) { const speed = 1000 / props.end; // eslint-disable-next-line useEffect(() => { - if (count < props.end && count < 1000) { - setTimeout(() => { - setCount((prevCount) => prevCount + 1); - }, speed); - } else { - setValue(props.end >= 1000 ? `${props.end / 1000}k` : props.end); + if (props.startCounter) { + if (count < props.end && count < 1000) { + setTimeout(() => { + setCount((prevCount) => prevCount + 1); + }, speed); + } else { + setValue(props.end >= 1000 ? `${props.end / 1000}k` : props.end); + } } }); - return
{value || count}
; + return ( +
+ {props.startCounter ? value || count : "0"} +
+ ); } From 297e5ef8f90098c8572b44d6163c633a4d8d4d4f Mon Sep 17 00:00:00 2001 From: Rohan Lekhwani Date: Sun, 21 Mar 2021 14:11:07 +0530 Subject: [PATCH 2/5] [IMPROVE] Makes both unsigned home layouts available through demo mode, removes rooms field from backend --- client/src/components/Home/index.js | 590 ++++++++++++++++------------ server/controllers/stats.js | 1 - 2 files changed, 345 insertions(+), 246 deletions(-) diff --git a/client/src/components/Home/index.js b/client/src/components/Home/index.js index bc53611..f7f70c9 100644 --- a/client/src/components/Home/index.js +++ b/client/src/components/Home/index.js @@ -20,6 +20,7 @@ import { BsChatDots } from "react-icons/bs"; import Countup from "./../common/Countup"; import { rcApiDomain } from "../../utils/constants"; import VisibilitySensor from "react-visibility-sensor"; +import RCSwitch from "../RCSwitch"; import "./index.css"; @@ -28,6 +29,7 @@ export default function Home(props) { const [searchCategory, setSearchCategory] = useState(""); const [carouselValue, setCarouselValue] = useState(0); const [startCounter, setStartCounter] = useState(false); + const [demoMode, setDemoMode] = useState(false); const carouselItems = [ { name: "Data protection solutions", @@ -162,276 +164,374 @@ export default function Home(props) { if (!props.authState.isLoggedIn) { return (
-
-

- Welcome to our Community -
-

- -

- Monitor your workflows, - collaborate and access data any - time you need it, all in one{" "} - productivity-amplifying full-lifecycle platform -

-
- -
- - - - - - ), - }} - /> -
- -
- -
-
-

- Get More Done, Together! -

-
-
- users - - - -
Users
-
-
- messages - - - - -
Messages Exchanged
-
-
- online-users - - - -
Online Users
-
-
-

- Featured Content -

- ( - - ))} - plugins={[ - "centered", - "infinite", - "arrows", - { - resolve: slidesToShowPlugin, - options: { - numberOfSlides: 3, - }, - }, - { - resolve: slidesToScrollPlugin, - options: { - numberOfSlides: 1, - }, - }, - { - resolve: autoplayPlugin, - options: { - interval: 2000, - }, - }, - ]} - /> -

- Select Your Role -

-
- - Admin -
-
- - Developer -
-
- - Live Chat User -
-
- - GSoC Student -
+

Demo Mode

+ setDemoMode(!demoMode)} + name="demoMode" + />
-
-

Community Activity

- {activityItems.map((item) => ( -
+ + {!demoMode ? ( + <> +
+

+ Real-time Collaboration +
+ + Powered by RCforCommunities + +

+ +

+ Monitor your workflows, + collaborate and access data{" "} + any time you need it, all in one{" "} + productivity-amplifying full-lifecycle platform +

+
+
+
+
+
+ users + +
Users
+
+
+ messages + +
Messages Exchanged
+
+
+ online-users + +
Online Users
+
+
+
+ +
+
+ + ) : ( + <> +
+

+ Welcome to our Community +
+

+ +

+ Monitor your workflows, + collaborate and access data{" "} + any time you need it, all in one{" "} + productivity-amplifying full-lifecycle platform +

+
+
+ + + + + + ), + }} + /> +
+ +
+ +
+
+

+ Get More Done, Together! +

+
+
+ users + + + +
Users
+
+
+ messages + + + + +
Messages Exchanged
+
+
online-users + + + +
Online Users
+
+
+

+ Featured Content +

+ ( + + ))} + plugins={[ + "centered", + "infinite", + "arrows", + { + resolve: slidesToShowPlugin, + options: { + numberOfSlides: 3, + }, + }, + { + resolve: slidesToScrollPlugin, + options: { + numberOfSlides: 1, + }, + }, + { + resolve: autoplayPlugin, + options: { + interval: 2000, + }, + }, + ]} + /> +

+ Select Your Role +

+
+
+ -
-

{item.title}

-

- by{" "} - - {item.author}({item.role}) - {" "} - in {item.community} {item.time}{" "} -

-
+ /> + Admin
-
-
+ - - {item.upvotes} -
-
+ Developer +
+
+ - + Live Chat User +
+
+ + GSoC Student +
+
+
+

Community Activity

+ {activityItems.map((item) => ( +
+
- {item.comments} + > + +
+

{item.title}

+

+ by{" "} + + {item.author}({item.role}) + {" "} + in {item.community} {item.time}{" "} +

+
+
+
+
+ + {item.upvotes} +
+
+ + {item.comments} +
+
-
+ ))}
- ))} -
+ + )}
); } diff --git a/server/controllers/stats.js b/server/controllers/stats.js index 9e5816a..bf1d545 100644 --- a/server/controllers/stats.js +++ b/server/controllers/stats.js @@ -12,7 +12,6 @@ module.exports.fetchStats = async (req, res) => { }, }); const stats = { - rooms: RCStats.data.totalChannels + RCStats.data.totalPrivateGroups, users: RCStats.data.totalUsers, onlineUsers: RCStats.data.onlineUsers, totalMessages: RCStats.data.totalMessages, From fca953b50489eab20268774c3bc8ed7dd2e6d5b3 Mon Sep 17 00:00:00 2001 From: Rohan Lekhwani Date: Sun, 21 Mar 2021 14:45:44 +0530 Subject: [PATCH 3/5] [REF] Modifies CSS classes --- client/src/components/Home/index.css | 126 +++++++++++++++++ client/src/components/Home/index.js | 195 ++++++--------------------- 2 files changed, 168 insertions(+), 153 deletions(-) diff --git a/client/src/components/Home/index.css b/client/src/components/Home/index.css index 681eebf..52552ed 100644 --- a/client/src/components/Home/index.css +++ b/client/src/components/Home/index.css @@ -161,3 +161,129 @@ border: 5px solid #2f343d; cursor: pointer; } + +.carousel-item-wrapper { + width: 100%; + margin: 20px; + text-align: center; +} + +.carousel-item-link { + text-decoration: none; + color: #000000; +} + +.carousel-item-image { + width: 100%; + height: 100%; +} + +.carousel-item-description { + color: hsl(240, 5%, 36%); +} + +.demo-mode-toggle { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-end; +} + +.unsigned-search-wrapper { + display: flex; + flex-direction: row; + width: 100%; + justify-content: center; + margin-bottom: 20px; +} + +.unsigned-search-input { + width: 50%; +} + +.stats-heading { + text-align: center; + margin-top: 100px; + margin-bottom: 40px; + color: hsl(240, 6%, 17%); + font-weight: 200; +} + +.featured-content-heading { + text-align: center; + margin-bottom: 40px; + color: hsl(240, 6%, 17%); + font-weight: 200; +} + +.select-role-heading { + text-align: center; + margin-top: 30px; + margin-bottom: 60px; + color: hsl(240, 6%, 17%); + font-weight: 200; +} + +.select-role-buttons-row { + display: flex; + flex-direction: row; + justify-content: space-evenly; + margin-bottom: 100px; +} + +.select-role-button-icon { + height: 50px; + width: 50px; + margin-bottom: 20px; +} + +.communities-wrapper { + margin-bottom: 60px; + margin-top: 30px; +} + +.community-activity-wrapper { + display: flex; + flex-direction: row; +} + +.community-activity-content { + display: flex; + flex-direction: row; + align-items: center; + width: 80%; +} + +.community-activity-author-image { + border-radius: 50%; + height: 40px; + width: 40px; + margin-right: 20px; +} + +.community-activity-heading { + margin-right: 40px; +} + +.community-activity-info { + color: hsl(240, 5%, 36%); +} + +.community-activity-actions-wrapper { + display: flex; + flex-direction: row; + width: 20%; +} + +.community-activity-action { + display: flex; + width: 50%; + align-items: center; +} + +.community-activity-action-button { + height: 25px; + width: 25px; + margin-right: 15px; + margin-left: 30px; +} diff --git a/client/src/components/Home/index.js b/client/src/components/Home/index.js index f7f70c9..e41dfe8 100644 --- a/client/src/components/Home/index.js +++ b/client/src/components/Home/index.js @@ -116,20 +116,17 @@ export default function Home(props) { const Item = (props) => { return ( -
+
- +

{props.item.name}

-

{props.item.description}

+

{props.item.description}

); }; @@ -164,14 +161,7 @@ export default function Home(props) { if (!props.authState.isLoggedIn) { return (
-
+

Demo Mode

productivity-amplifying full-lifecycle platform

-
@@ -211,7 +200,11 @@ export default function Home(props) { src="https://img.icons8.com/color/80/000000/circled-user-male-skin-type-7--v2.png" alt="users" /> - +
Users
@@ -219,7 +212,11 @@ export default function Home(props) { src="https://img.icons8.com/color/80/000000/filled-chat.png" alt="messages" /> - +
Messages Exchanged
@@ -227,7 +224,11 @@ export default function Home(props) { src="https://img.icons8.com/color/80/000000/online--v1.png" alt="online-users" /> - +
Online Users
@@ -254,15 +255,7 @@ export default function Home(props) {


-
+
-

Get More Done, Together!

+

{t('unsigned-home-demo.stats-heading')}

-
Users
+
{t('unsigned-home-demo.users-stats-label')}
-
Messages Exchanged
+
{t('unsigned-home-demo.messages-exchanged-stats-label')}
-
Online Users
+
{t('unsigned-home-demo.online-users-stats-label')}
-

Featured Content

+

{t('unsigned-home-demo.blogs-heading')}

-

Select Your Role

+

{t('unsigned-home-demo.select-role-heading')}

- Admin + {t('unsigned-home-demo.admin-role')}
- Developer + {t('unsigned-home-demo.developer-role')}
- Live Chat User + {t('unsigned-home-demo.live-chat-user-role')}
- GSoC Student + {t('unsigned-home-demo.gsoc-student-role')}
-

Community Activity

+

{t('unsigned-home-demo.community-activity-heading')}

{activityItems.map((item) => (
@@ -430,12 +438,12 @@ export default function Home(props) {

{getGreetings()}, {props.authState.user.name}

-

We're ready to go.

+

{t('signed-home.heading')}

-
Start something new
+
{t('signed-home.start-heading')}
{ @@ -447,11 +455,11 @@ export default function Home(props) { className="shortcut-icon-medium" alt="room" /> - Create a room + {t('signed-home.create-room')}
-
Explore more
+
{t('signed-home.explore-heading')}
{ @@ -463,7 +471,7 @@ export default function Home(props) { className="shortcut-icon-small" alt="search" /> - Discover existing rooms + {t('signed-home.discover-rooms')}
diff --git a/client/src/i18n.js b/client/src/i18n.js new file mode 100644 index 0000000..4431359 --- /dev/null +++ b/client/src/i18n.js @@ -0,0 +1,37 @@ +import i18n from 'i18next' +import LanguageDetector from "i18next-browser-languagedetector" +import {initReactI18next} from 'react-i18next' +import XHR from 'i18next-xhr-backend' +import languageEN from './locate/en/translate.json' + +i18n +.use(XHR) +.use(LanguageDetector) +.use(initReactI18next) +.init({ + resources: { + // Add language resources here + en: languageEN, + }, + /* default language when load the website in browser */ + lng: "en", + /* When react i18next not finding any language to as default in borwser */ + fallbackLng: "en", + /* debugger For Development environment */ + debug: true, + ns: ["translations"], + defaultNS: "translations", + keySeparator: ".", + interpolation: { + escapeValue: false, + formatSeparator: "," + }, + react: { + wait: true, + bindI18n: 'languageChanged loaded', + bindStore: 'added removed', + nsMode: 'default' + } +}) + +export default i18n; \ No newline at end of file diff --git a/client/src/index.js b/client/src/index.js index 7008621..a41ac01 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -2,10 +2,14 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './components/App'; +import { I18nextProvider } from 'react-i18next'; +import i18n from './i18n' ReactDOM.render( - + + + , , document.getElementById('root') ); \ No newline at end of file diff --git a/client/src/locate/en/translate.json b/client/src/locate/en/translate.json new file mode 100644 index 0000000..e7f7ea7 --- /dev/null +++ b/client/src/locate/en/translate.json @@ -0,0 +1,41 @@ +{ + "translations": { + "Demo_Mode": "Demo Mode", + "unsigned-home": { + "heading": "Real-time Collaboration", + "subheading": "Powered by Communities", + "description": "Monitor your workflows, collaborate and access data any time you need it, all in one productivity-amplifying full-lifecycle platform", + "users-stats-label": "Users", + "messages-exchanged-stats-label": "Messages Exchanged", + "online-users-stats-label": "Online Users", + "join-button": "JOIN NOW TO EXPLORE MORE" + }, + "unsigned-home-demo": { + "heading": "Welcome to our Community", + "description": "Monitor your workflows, collaborate and access data any time you need it, all in one productivity-amplifying full-lifecycle platform", + "menu-item-1": "All Communities", + "menu-item-2": "Rooms", + "menu-item-3": "Users", + "menu-item-4": "Messages", + "join-button": "JOIN TO EXPLORE", + "stats-heading": "Get More Done, Together!", + "users-stats-label": "Users", + "messages-exchanged-stats-label": "Messages Exchanged", + "online-users-stats-label": "Online Users", + "blogs-heading": "Featured Content", + "select-role-heading": "Select Your Role", + "admin-role": "Admin", + "developer-role": "Developer", + "live-chat-user-role": "Live Chat User", + "gsoc-student-role": "GSoC Student", + "community-activity-heading": "Community Activity" + }, + "signed-home": { + "heading": "We're ready to go.", + "start-heading": "Start something new", + "create-room": "Create a room", + "explore-heading": "Explore more", + "discover-rooms": "Discover existing rooms" + } + } +} From dbd668430141833b62de2b36df88b97bf5e3b6ea Mon Sep 17 00:00:00 2001 From: Rohan Lekhwani Date: Tue, 23 Mar 2021 01:19:31 +0530 Subject: [PATCH 5/5] Makes stats appear on landing section, adds placeholder links to user guides and release notes --- client/package-lock.json | 8 - client/package.json | 3 +- client/src/components/Home/index.css | 42 ++++- client/src/components/Home/index.js | 207 ++++++++++++------------ client/src/components/common/Countup.js | 20 +-- client/src/locate/en/translate.json | 5 +- 6 files changed, 150 insertions(+), 135 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 050fb60..f540a01 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -12319,14 +12319,6 @@ "prop-types": "^15.6.2" } }, - "react-visibility-sensor": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/react-visibility-sensor/-/react-visibility-sensor-5.1.1.tgz", - "integrity": "sha512-cTUHqIK+zDYpeK19rzW6zF9YfT4486TIgizZW53wEZ+/GPBbK7cNS0EHyJVyHYacwFEvvHLEKfgJndbemWhB/w==", - "requires": { - "prop-types": "^15.7.2" - } - }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", diff --git a/client/package.json b/client/package.json index c7b5fb4..67b0503 100644 --- a/client/package.json +++ b/client/package.json @@ -16,8 +16,7 @@ "react-router": "^5.2.0", "react-router-dom": "^5.2.0", "react-scripts": "4.0.1", - "react-syntax-highlighter": "^15.4.3", - "react-visibility-sensor": "^5.1.1" + "react-syntax-highlighter": "^15.4.3" }, "scripts": { "start": "PORT=3002 react-scripts start", diff --git a/client/src/components/Home/index.css b/client/src/components/Home/index.css index 52552ed..e77cc5a 100644 --- a/client/src/components/Home/index.css +++ b/client/src/components/Home/index.css @@ -45,7 +45,7 @@ .main-stats-container { margin-top: 70px; - margin-bottom: 70px; + margin-bottom: 55px; display: flex; flex-direction: row; align-items: center; @@ -60,22 +60,22 @@ align-items: center; color: #29292e; background-color: #e0e0e01a; - border-radius: 100px; - height: 170px; - width: 170px; + border-radius: 50%; + height: 140px; + width: 140px; margin: 10px; box-shadow: 0px 8px 12px -7px #a9a6a6fc; } .stat-icon { - width: 60px; - height: 60px; + width: 45%; + height: 45%; display: block; - margin-bottom: 15px; + margin-bottom: 5px; } .stat-number { - font-size: 40px; + font-size: 30px; letter-spacing: 2px; margin-bottom: 5px; font-weight: 500; @@ -287,3 +287,29 @@ margin-right: 15px; margin-left: 30px; } + +.community-activity-action-button:hover { + cursor: pointer; +} + +.main-stats-container-demo { + width: 100%; + margin-bottom: 20px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-around; + flex-wrap: wrap; +} + +.button-container-demo { + display: flex; + justify-content: center; + align-items: center; + margin-top: 10px; + margin-bottom: 20px; +} + +.header-link { + color: hsl(240, 5%, 36%); +} diff --git a/client/src/components/Home/index.js b/client/src/components/Home/index.js index 9536dcf..2216b1f 100644 --- a/client/src/components/Home/index.js +++ b/client/src/components/Home/index.js @@ -19,9 +19,8 @@ import { RiAdminLine } from "react-icons/ri"; import { BsChatDots } from "react-icons/bs"; import Countup from "./../common/Countup"; import { rcApiDomain } from "../../utils/constants"; -import VisibilitySensor from "react-visibility-sensor"; import RCSwitch from "../RCSwitch"; -import { Trans, useTranslation } from 'react-i18next'; +import { Trans, useTranslation } from "react-i18next"; import "./index.css"; @@ -29,7 +28,6 @@ export default function Home(props) { const { users, onlineUsers, totalMessages } = props.stats; const [searchCategory, setSearchCategory] = useState(""); const [carouselValue, setCarouselValue] = useState(0); - const [startCounter, setStartCounter] = useState(false); const [demoMode, setDemoMode] = useState(false); const { t, i18n } = useTranslation(); @@ -156,17 +154,11 @@ export default function Home(props) { return "Good evening"; }; - function onVisibleChange(isVisible) { - if (isVisible) { - setStartCounter(isVisible); - } - } - if (!props.authState.isLoggedIn) { return (
-

{t('Demo_Mode')}

+

{t("Demo_Mode")}

setDemoMode(!demoMode)} @@ -178,7 +170,7 @@ export default function Home(props) { <>

- {t('unsigned-home.heading')} + {t("unsigned-home.heading")}
- {t('unsigned-home.subheading')} + {t("unsigned-home.subheading")}

- Monitor your workflows, - collaborate and access data{" "} - any time you need it, all in one{" "} - productivity-amplifying full-lifecycle platform + Monitor your workflows, + collaborate and access data{" "} + any time you need it, all in one{" "} + productivity-amplifying full-lifecycle + platform

@@ -205,42 +198,39 @@ export default function Home(props) { users - -
{t('unsigned-home.users-stats-label')}
+ +
+ {t("unsigned-home.users-stats-label")} +
messages - -
{t('unsigned-home.messages-exchanged-stats-label')}
+ +
+ {t("unsigned-home.messages-exchanged-stats-label")} +
online-users - -
{t('unsigned-home.online-users-stats-label')}
+ +
+ {t("unsigned-home.online-users-stats-label")} +
@@ -255,14 +245,24 @@ export default function Home(props) {

- Monitor your workflows, - collaborate and access data{" "} - any time you need it, all in one{" "} - productivity-amplifying full-lifecycle platform + Monitor your workflows, + collaborate and access data{" "} + any time you need it, all in one{" "} + productivity-amplifying full-lifecycle + platform


+

+ + {t("unsigned-home-demo.user-guides")} + {" "} + |{" "} + + {t("unsigned-home-demo.release-notes")} + +

-
- -
- -

{t('unsigned-home-demo.stats-heading')}

-
-
- users - - +
+ users - -
{t('unsigned-home-demo.users-stats-label')}
-
-
- messages - - +
+ {t("unsigned-home-demo.users-stats-label")} +
+
+
+ messages - + -
{t('unsigned-home-demo.messages-exchanged-stats-label')}
-
-
- online-users - - + {t("unsigned-home-demo.messages-exchanged-stats-label")} +
+
+
+ online-users - -
{t('unsigned-home-demo.online-users-stats-label')}
+ +
+ {t("unsigned-home-demo.online-users-stats-label")} +
+
-
-

{t('unsigned-home-demo.blogs-heading')}

+ +
+ +
+ +

+ {t("unsigned-home-demo.blogs-heading")} +

-

{t('unsigned-home-demo.select-role-heading')}

+

+ {t("unsigned-home-demo.select-role-heading")} +

- {t('unsigned-home-demo.admin-role')} + {t("unsigned-home-demo.admin-role")}
- {t('unsigned-home-demo.developer-role')} + {t("unsigned-home-demo.developer-role")}
- {t('unsigned-home-demo.live-chat-user-role')} + {t("unsigned-home-demo.live-chat-user-role")}
- {t('unsigned-home-demo.gsoc-student-role')} + {t("unsigned-home-demo.gsoc-student-role")}
-

{t('unsigned-home-demo.community-activity-heading')}

+

{t("unsigned-home-demo.community-activity-heading")}

{activityItems.map((item) => (
@@ -438,12 +441,12 @@ export default function Home(props) {

{getGreetings()}, {props.authState.user.name}

-

{t('signed-home.heading')}

+

{t("signed-home.heading")}

-
{t('signed-home.start-heading')}
+
{t("signed-home.start-heading")}
{ @@ -455,11 +458,11 @@ export default function Home(props) { className="shortcut-icon-medium" alt="room" /> - {t('signed-home.create-room')} + {t("signed-home.create-room")}
-
{t('signed-home.explore-heading')}
+
{t("signed-home.explore-heading")}
{ @@ -471,7 +474,7 @@ export default function Home(props) { className="shortcut-icon-small" alt="search" /> - {t('signed-home.discover-rooms')} + {t("signed-home.discover-rooms")}
diff --git a/client/src/components/common/Countup.js b/client/src/components/common/Countup.js index 2a06823..d2287b9 100644 --- a/client/src/components/common/Countup.js +++ b/client/src/components/common/Countup.js @@ -6,19 +6,13 @@ export default function Countup(props) { const speed = 1000 / props.end; // eslint-disable-next-line useEffect(() => { - if (props.startCounter) { - if (count < props.end && count < 1000) { - setTimeout(() => { - setCount((prevCount) => prevCount + 1); - }, speed); - } else { - setValue(props.end >= 1000 ? `${props.end / 1000}k` : props.end); - } + if (count < props.end && count < 1000) { + setTimeout(() => { + setCount((prevCount) => prevCount + 1); + }, speed); + } else { + setValue(props.end >= 1000 ? `${props.end / 1000}k` : props.end); } }); - return ( -
- {props.startCounter ? value || count : "0"} -
- ); + return
{value || count}
; } diff --git a/client/src/locate/en/translate.json b/client/src/locate/en/translate.json index e7f7ea7..f1a625d 100644 --- a/client/src/locate/en/translate.json +++ b/client/src/locate/en/translate.json @@ -18,7 +18,6 @@ "menu-item-3": "Users", "menu-item-4": "Messages", "join-button": "JOIN TO EXPLORE", - "stats-heading": "Get More Done, Together!", "users-stats-label": "Users", "messages-exchanged-stats-label": "Messages Exchanged", "online-users-stats-label": "Online Users", @@ -28,7 +27,9 @@ "developer-role": "Developer", "live-chat-user-role": "Live Chat User", "gsoc-student-role": "GSoC Student", - "community-activity-heading": "Community Activity" + "community-activity-heading": "Community Activity", + "user-guides": "Read the Guides", + "release-notes": "Read Release Notes" }, "signed-home": { "heading": "We're ready to go.",