diff --git a/app.js b/app.js index 2f0f24e..d5a834a 100644 --- a/app.js +++ b/app.js @@ -7,9 +7,13 @@ var express = require("express"), LocalStrategy = require("passport-local"), attendanceLib = require("./lib/attendance.lib.js"), userLib = require('./lib/user.lib.js'), + DateLib = require('./lib/date.js'), async = require("async"), passportLocalMongoose = require("passport-local-mongoose"); + var _= require("lodash"); +const moment = require("moment"); +const attendance = require("./models/attendance"); const PORT=2000; const MONGO_URL="mongodb://localhost/attendance"; @@ -41,33 +45,203 @@ passport.deserializeUser(User.deserializeUser()); app.get("/",function(req,res){ - res.render("signup"); + res.render("login"); }); app.get("/home",isLoggedIn, function(req, res){ + let filter={}; filter={ 'username':req.user.username, } - attendanceLib.findbyId(filter,function(err,docs){ + attendanceLib.find(filter,function(err,docs){ if(err){ return res.send(err) }else if(_.isEmpty(docs)){ - return res.render("home",{"attendanceData":""}); + return res.render("home",{"attendanceData":"",username:req.user.username, moment:moment}); } else{ - console.log(docs); - // return res.render("home",{"attendanceData":docs}); - return res.json(docs) + // console.log(moment(docs[0].attendance_date).format("DD/MM/YYYY")); + return res.render("home",{attendanceData:docs,username:req.user.username, moment:moment}); + // return res.json(docs) } }); + + + +}); + + + +app.get("/home/:id/details",isLoggedIn, function(req, res){ + const filter ={ + _id: req.params.id + } + attendanceLib.findbyId(filter, function(err, attendance){ + if(err){ + console.log(err); + return res.json(err); + }else{ + // console.log(moment(attendance[0].attendance_date).format("DD/MM/YYYY")); + return res.render("meetDetails", {attendanceDataID: attendance[0], moment:moment}); + } + }) + }); +app.post("/home/:id/addParticipant",isLoggedIn, function(req, res){ +if(1){ + const filter ={ + _id: req.params.id +} +let new_data = []; +async.series([ + (callback)=> { +attendanceLib.findbyId(filter, function(err, attendance){ + if(err){ + console.log(err); + return callback(err); + }else{ + new_data = attendance[0].data; + return callback(null); + } +}); +}, +(callback)=> { + new_data.push(req.body.name); +const newVal={ + data: new_data +} +attendanceLib.updateOne(filter, newVal, function(err){ + if(err){ + callback(err); + }else{ + return callback(null); + } +}); + +} +], +(err)=> { + if(err){ + return console.log(err)// + } + else{ + return res.redirect("/home/"+req.params.id+"/details");//change this to normal + } +}); +} +else{ + res.send("empty body"); +} +}); + + +app.post("/home/:id/details/delete/:idx",isLoggedIn, function(req, res){ + const filter ={ + _id: req.params.id + } + var new_data = []; + async.series([ + (callback)=> { + attendanceLib.findbyId(filter, function(err, attendance){ + if(err){ + return callback(err); + // return res.json(err); + }else{ + // console.log(attendance); + new_data = attendance[0].data; + return callback(null); + } + }); +}, +(callback)=> { + + const index = req.params.idx; + new_data.splice(index,1); + + const newVal={ + data: new_data + } + + attendanceLib.updateOne(filter, newVal, function(err){ + if(err){ + return callback(err); + }else{ + return callback(null); + } + }); +} +], +(err)=> { + if(err){ + return console.log(err)// + } + else{ + return res.redirect("/home/"+req.params.id+"/details"); + } +}); +}); + +app.post("/home/:id/delete", isLoggedIn,function(req, res){ + const filter ={ + _id: req.params.id + } + attendanceLib.deleteOne(filter, function (err) { + if(err){ + return res.json(err); + }else{ + return res.redirect("/home"); + } + }); +}) + +app.post("/home/edit", isLoggedIn,function(req, res){ + const filter ={ + _id:req.body.atten_id + } + const newVal={ + attendance_date: DateLib.getDate(req), + taker:req.body.entered_taker + + } + attendanceLib.updateOne(filter, newVal, function(err){ + if(err){ + return res.json(err); + }else{ + return res.redirect("/home"); + } + }); +}) + + +app.post("/home",isLoggedIn, function(req, res){ + // console.log(req.body); + + const Attendance = { + username:req.body.user_name, + attendance_date:DateLib.getDate(req), + data:[], + url:req.body.meet_url, + taker:req.body.entered_taker, + + }; + attendanceLib.save(Attendance,function(err){ + if(err){ + return res.json(err); + }else{ + return res.redirect("/home"); + } + }); + + +}); + app.post("/username/:user/password/:pass/save",function(req,res){ - console.log(req.body) + // console.log(req.body) if(1){// let result={}; let filter={ @@ -92,13 +266,20 @@ app.post("/username/:user/password/:pass/save",function(req,res){ }); }, (callback)=> { + + let attendees = req.body.data.split("@"); + attendees.pop(); + let new_attendance={ - username:req.params.id, + username:req.params.user, attendance_date:req.body.date, - data:[req.body.data], + data:attendees, url:req.body.url, taker:req.body.taker, + you: req.body.you, + }; + // console.log(new_attendance); attendanceLib.save(new_attendance,function(err){ if(err){ console.log(err); @@ -124,7 +305,7 @@ app.post("/username/:user/password/:pass/save",function(req,res){ } - + }); // Auth Routes @@ -149,6 +330,10 @@ app.get("/login", function(req, res){ res.render("login"); }) +app.get("/signup", function(req, res){ + res.render("signup"); +}) + // middleware app.post("/login", passport.authenticate("local",{ successRedirect:"/home", @@ -172,4 +357,6 @@ function isLoggedIn(req, res, next){ app.listen(PORT, function(){ console.log("connected to "+PORT); -}); \ No newline at end of file +}); + + diff --git a/document.js b/document.js index d1315a9..ccbf3f2 100644 --- a/document.js +++ b/document.js @@ -3,7 +3,25 @@ const { fromPairs } = require("lodash"); // for saving to database let c="";let dateMeet="";dateMeet+=new Date().toLocaleString("en-US");document.getElementsByClassName('uArJ5e UQuaGc kCyAyd QU4Gid foXzLb IeuGXd')[0].click(); let taker=document.getElementsByClassName('GvcuGe')[0].childNodes[0].innerText; - for(var i=1;i+ ' + form.innerHTML='++ ' document.body.appendChild(form); form.submit(); @@ -39,11 +57,11 @@ const { fromPairs } = require("lodash"); // form.submit(); //for copy - // let c="";c+=new Date().toLocaleString("en-US");document.getElementsByClassName('uArJ5e UQuaGc kCyAyd QU4Gid foXzLb IeuGXd')[0].click();c+='\n'; for(var i=0;i= 2.1.2 < 3" } }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==" + }, "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==" }, + "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==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "requires": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + } + }, + "is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + }, + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -357,16 +780,57 @@ } } }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, "kareem": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "requires": { + "json-buffer": "3.0.0" + } + }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "requires": { + "package-json": "^6.3.0" + } + }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -406,6 +870,11 @@ "mime-db": "1.44.0" } }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -414,6 +883,16 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + }, "mongodb": { "version": "3.5.8", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.8.tgz", @@ -494,6 +973,56 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, + "nodemon": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.7.tgz", + "integrity": "sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA==", + "requires": { + "chokidar": "^3.2.2", + "debug": "^3.2.6", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.0.4", + "pstree.remy": "^1.1.7", + "semver": "^5.7.1", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.3", + "update-notifier": "^4.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "requires": { + "abbrev": "1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -507,6 +1036,37 @@ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -571,6 +1131,16 @@ "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=" }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -590,6 +1160,28 @@ "ipaddr.js": "1.9.1" } }, + "pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "requires": { + "escape-goat": "^2.0.0" + } + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -616,6 +1208,17 @@ "unpipe": "1.0.0" } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -630,11 +1233,35 @@ "util-deprecate": "~1.0.1" } }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "requires": { + "picomatch": "^2.2.1" + } + }, "regexp-clone": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "requires": { + "rc": "^1.2.8" + } + }, "require_optional": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", @@ -649,6 +1276,14 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -678,6 +1313,21 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -726,6 +1376,11 @@ "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, "sliced": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", @@ -745,6 +1400,41 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -753,6 +1443,19 @@ "safe-buffer": "~5.1.0" } }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -761,11 +1464,42 @@ "has-flag": "^3.0.0" } }, + "term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==" + }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + }, + "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==", + "requires": { + "is-number": "^7.0.0" + } + }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "requires": { + "nopt": "~1.0.10" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -775,6 +1509,14 @@ "mime-types": "~2.1.24" } }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, "uid-safe": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", @@ -783,11 +1525,100 @@ "random-bytes": "~1.0.0" } }, + "undefsafe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", + "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==", + "requires": { + "debug": "^2.2.0" + } + }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "requires": { + "crypto-random-string": "^2.0.0" + } + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "update-notifier": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", + "requires": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, "util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", @@ -810,6 +1641,35 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "requires": { + "string-width": "^4.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" } } } diff --git a/package.json b/package.json index 91e3c81..e5d5a8a 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,9 @@ "express": "^4.17.1", "express-session": "^1.17.1", "lodash": "^4.17.20", + "moment": "^2.29.1", "mongoose": "^5.9.18", + "nodemon": "^2.0.7", "passport": "^0.4.1", "passport-local": "^1.0.0", "passport-local-mongoose": "^6.0.1", diff --git a/public/css/footer.css b/public/css/footer.css new file mode 100644 index 0000000..b53d09e --- /dev/null +++ b/public/css/footer.css @@ -0,0 +1,16 @@ +*{ + padding: 0; + margin: 0; + box-sizing: border-box; +} + +footer{ + position: fixed; + bottom: 0; + left: 0; + right: 0; + line-height: 1.2; + background-color: #198754; + opacity: 0.6; + color: #fff; +} \ No newline at end of file diff --git a/public/css/header.css b/public/css/header.css new file mode 100644 index 0000000..e49e0b3 --- /dev/null +++ b/public/css/header.css @@ -0,0 +1,52 @@ +#navbar { + position: sticky; + top: 0; + z-index: 5; +} + + +#logo { + /* width: 20%; */ + margin-left: 3%; +} + +#search{ + width: 30%; + margin-left: 1rem; +} + +#navbarTogglerDemo02 { + text-align: right; +} + +#navbarTogglerDemo02 ul li a { + font-size: 1.2rem; + color: #fff; + opacity: 0.7; +} + +#navbarTogglerDemo02 ul li a:hover { + opacity: 1; +} + +#navbarTogglerDemo02 ul li { + /* position: absolute; + right: 50%; */ + z-index: 5; + margin: 0 1rem; +} + +#heading{ + background-color: #198754; + color: #fff; + border-color: #fff; + outline: none; +} + + +@media only screen and ( max-width: 988px) +{ + #heading { + margin-top: -2rem; + } +} \ No newline at end of file diff --git a/public/css/home.css b/public/css/home.css new file mode 100644 index 0000000..cb5aa98 --- /dev/null +++ b/public/css/home.css @@ -0,0 +1,165 @@ +*{ + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body{ + background-color: #f6f6f6; +} + +#logo { + width: 20%; +} + +.welcome{ + /* font-family: 'Bad Script', cursive; */ + text-align: left; + padding: 2%; + padding-left: 0; +} +.welcome em h1 { + opacity: 0.7; +} + +.wrapper{ + width: 80%; + min-width: fit-content; + margin: auto; + margin-top: 1%; + text-align: center; +} + +.controls{ + background-color: inherit; + border: 0; + outline: 0; + background: none; + margin: auto 5%; + margin-right: auto; +} + +p{ + font-size: 1.2rem; +} + +.control-col { + white-space: nowrap; +} + +.popup{ + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50% , -50%) scale(0); + transition: 200ms ease-in-out; + width: fit-content; + min-width: 180px; + border: 1px solid #198754 ; + z-index: 10; + background-color: #f6f6f6 ; + border-radius: 10%; +} + +.popup.active{ + transform: translate(-50% , -50%) scale(1); +} + +.popup-header{ + display: flex; + align-items: center; + + border-bottom: 1px solid #198754; + padding: 5%; + justify-content: space-between; +} + +.popup-header .title{ + font-size: 1.25rem; + font-weight: 500; +} + +.popup-header .close-button { + cursor: pointer; + outline: 0; + border: 0; + background: none; + font-size: 1.25rem; + font-weight: bold; +} + +.popup-body { + padding: 5%; +} + +.element { + margin-bottom: -1%; +} + +#overlay { + position: fixed; + opacity: 0; + transition: 200ms ease-in-out; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0,0,0,0.5); + pointer-events: none; +} + +#overlay.active{ + pointer-events: all; + opacity: 1; +} + +.buttons{ + display: flex; + justify-content: space-between; + align-items: center; +} + +#no-delete{ + position: absolute; + right: 5%; +} + +#passwordtext { + margin: 3% 0 5% 0; +} + +.links{ + height: 170px; + width: 200px; + display: flex; + justify-content: center; + align-items: center; + padding: 2%; + margin: 2%; + background-color:#f6f6f6; + border: solid 2px #198754; + border-radius: 50%; +} + +.link-div{ + display: flex; + justify-content: center; + align-items: center; +} + +.link-body { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50% , -50%) scale(0); + transition: 200ms ease-in-out; + width: fit-content; + min-width: 180px; + z-index: 10; + background-color: transparent; + border-radius: 10%; +} + +.link-body.active{ + transform: translate(-50% , -50%) scale(1); +} \ No newline at end of file diff --git a/public/css/login.css b/public/css/login.css index e69de29..b91f5c3 100644 --- a/public/css/login.css +++ b/public/css/login.css @@ -0,0 +1,87 @@ +*{ + margin: 0; + padding: 0; + box-sizing: border-box; +} +body{ + background-color: #f6f6f6; +} +.logo{ + width: 6%; + margin: 1rem 3rem; +} + +h1 { + margin-left: 26%; +} + +#hr { + height: 0.3rem; + background: linear-gradient(-45deg,#ee7752, #e73c7e, #23a6d5, #23d5ab); + background-size: 400% 400%; + animation: gradient 8s ease infinite; +} + +.container-fluid { + width: 60%; + margin: -4% auto 3% 30%; + position: relative; +} + +.element { + width: 100%; + margin-top: 1.2rem; + padding: 2%; +} + +#log-in-btn { + width: 100%; + padding: 0.4rem 1.8rem; + margin: 1.8rem; + margin-left: 0; +} + +span{ + margin-left: auto; + font-size: 0.8rem; +} + +a{ + text-decoration: none; + /* color: #161d6f; */ +} + +#signup{ + margin-left: 8px; +} + +.log-in-img { + width: 70%; + margin-left: 5rem ; + margin-top: 5%; +} + +@keyframes gradient { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} + +@media only screen and ( max-width: 992px) +{ + .log-in-img{ + display: none; + } + + .container-fluid { + width: 40%; + margin-left: auto; + position: relative; + } +} \ No newline at end of file diff --git a/public/css/meetDetails.css b/public/css/meetDetails.css new file mode 100644 index 0000000..3ce91f9 --- /dev/null +++ b/public/css/meetDetails.css @@ -0,0 +1,217 @@ +*{ + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body{ + background-color: #f6f6f6; +} + +.main{ + display: flex; +} + +.details{ + display: none; +} + +.sidebar{ + width: 15%; + min-width: fit-content; + position: fixed; + height: 100%; + background-color: #479f76; + padding: 2%; +} + +h1 { + margin: auto; + /* margin-left: 8%; */ + padding: 4%; +} + +.sidebar-header{ + /* border-bottom: white; + border-width: 0 0 2px 0; + border-style: dashed; */ + /* padding: 1.5% 2%; */ + font-size: 1rem; + text-align: center; + font-family: 'Montserrat', sans-serif; +} + +#break{ + height: 0; + border: #fff; + border-style: dotted; + border-width: 0 0 6px 0; + opacity: 1; + width: 35%; + background-color: #479f76; + margin: auto; +} + +.sidebar-body { + margin-top: 1.8rem; + border-radius: 10%; + padding: 1.5% 2%; +} + +.list-group-item-success{ + background-color: #75b798; + color: #000; +} + +.container{ + width: 80%; + min-width: fit-content; + margin-top: 2%; +} + + +.wrapper { + width: 50%; + /* margin: auto; */ + /* margin-top: 10% ; */ + margin-left: 45%; + min-width: fit-content; + text-align: center; + margin-top: 1%; +} + +#present :checked { + background-color: #198754; +} + +#logo { + width: 15% +} + +.popup{ + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50% , -50%) scale(0); + transition: 200ms ease-in-out; + width: 20%; + min-width: 180px; + border: 1px solid #198754 ; + z-index: 10; + background-color: #f6f6f6 ; + border-radius: 10%; +} + +.popup.active{ + transform: translate(-50% , -50%) scale(1); +} + +.popup-header{ + display: flex; + align-items: center; + + border-bottom: 1px solid #198754; + padding: 5%; + justify-content: space-between; +} + +.popup-header .title{ + font-size: 1.25rem; + font-weight: 500; +} + +.popup-header .close-button { + cursor: pointer; + outline: 0; + border: 0; + background: none; + font-size: 1.25rem; + font-weight: bold; +} + +.popup-body { + padding: 5%; +} + +.element { + margin-bottom: -1%; +} + +#overlay { + position: fixed; + opacity: 0; + transition: 200ms ease-in-out; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0,0,0,0.5); + pointer-events: none; +} + +#overlay.active{ + pointer-events: all; + opacity: 1; +} + +.buttons { + display: flex; + justify-content: space-between; +} + + +/* -----------printing----------- */ +.sidebar.print{ + display: none; +} + +.container.print{ + width: 1000%; + /* min-width: fit-content; */ + margin-top: 2%; +} + +.wrapper.print { + width: 80%; + margin: auto; + /* margin-top: 10% ; */ + /* margin-left: 45%; */ + min-width: fit-content; + text-align: center; + /* margin-top: 1%; */ +} +.details.print{ + display: block; + width: 100%; + margin: auto; +} + +/* -----------------media queries----------------- */ + +@media only screen and (max-width: 992px){ + .sidebar{ + display: none; + } + + .container{ + width: 1000%; + /* min-width: fit-content; */ + margin-top: 2%; + } + + .wrapper { + width: 80%; + margin: auto; + /* margin-top: 10% ; */ + /* margin-left: 45%; */ + min-width: fit-content; + text-align: center; + /* margin-top: 1%; */ + } + .details{ + display: block; + width: 100%; + margin: auto; + } + +} \ No newline at end of file diff --git a/public/css/signup.css b/public/css/signup.css index f6454aa..380e2d6 100644 --- a/public/css/signup.css +++ b/public/css/signup.css @@ -12,19 +12,16 @@ body { h1{ text-align: center; - margin-top: -2%; + margin-top: -4%; margin-left: 30%; } .logo { - width: 8%; + width: 6%; margin: 1rem 3rem; } .signup-image{ width: 80%; - /* position: absolute; - right: 5%; - top: 18%; */ } /* Form CSS*/ @@ -46,7 +43,7 @@ h1{ } .element{ - margin: 0.8rem auto; + margin: 0.5rem auto; width: 100%; } diff --git a/public/img/Login-img.svg b/public/img/Login-img.svg new file mode 100644 index 0000000..37fd28d --- /dev/null +++ b/public/img/Login-img.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/favicon.ico b/public/img/favicon.ico new file mode 100644 index 0000000..234e86e Binary files /dev/null and b/public/img/favicon.ico differ diff --git a/public/img/logo.png b/public/img/logo.png index 4744aac..458b3b6 100644 Binary files a/public/img/logo.png and b/public/img/logo.png differ diff --git a/public/img/undraw_authentication_fsn5.svg b/public/img/signup-img.svg similarity index 100% rename from public/img/undraw_authentication_fsn5.svg rename to public/img/signup-img.svg diff --git a/public/js/home.js b/public/js/home.js index e69de29..6aeea7c 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -0,0 +1,420 @@ +// Example starter JavaScript for disabling form submissions if there are invalid fields +(function () { + 'use strict' + + // Fetch all the forms we want to apply custom Bootstrap validation styles to + var forms = document.querySelectorAll('.needs-validation') + + // Loop over them and prevent submission + Array.prototype.slice.call(forms) + .forEach(function (form) { + form.addEventListener('submit', function (event) { + if (!form.checkValidity()) { + event.preventDefault() + event.stopPropagation() + } + + form.classList.add('was-validated') + }, false) + }) + })() + + + + // JavaScript for adding popup + + const openPopupButton = document.querySelectorAll('[data-target]'); + const closePopupButton = document.querySelectorAll('[data-close-button]'); + const overlay = document.getElementById('overlay'); + + openPopupButton.forEach(button => { + button.addEventListener('click', () => { + const popup = document.querySelector(button.dataset.target); + openPopup(popup); + }); + }); + + + closePopupButton.forEach(button => { + button.addEventListener('click', () => { + const popup = button.closest('.popup'); + closePopup(popup); + }); +}); + +overlay.addEventListener('click', () => { + const popup = document.querySelectorAll('.popup.active') + popup.forEach(popup => { + closePopup(popup) + }) +}) + +function openPopup(popup) { + if (popup == null) return; + popup.classList.add('active'); + overlay.classList.add('active'); +} + + function closePopup(popup) { + if (popup == null) return; + popup.classList.remove('active'); + overlay.classList.remove('active'); +} + +//Adding row on table + +// function add() { + +// var table = document.getElementById("tab"); +// var link = document.getElementById("link").value; +// var participants = document.getElementById("participants").value; +// var date = document.getElementById("date").value; +// var time = document.getElementById("time").value; +// var creator = document.getElementById("creator").value; +// table.innerHTML +=''+link+''+participants+''+date+''+time+''+creator+'
'; +// } + + + //Copy to clipboard (Google meet) + + + function getcodeMeet() { + var passwordtext = document.getElementById('passwordtextMeet').value; + if(passwordtext) + { + document.getElementById('pass_word_meet').value= passwordtext; + copyMeet(); + } + else + { + document.getElementById('pass_word_meet').value= 'error'; + + } + } + function copyMeet() { + let username=document.getElementById('user_name_meet').value; + let password=document.getElementById('pass_word_meet').value; + copyCode(`let c="";let dateMeet="";dateMeet+=new Date().toLocaleString("en-US");document.getElementsByClassName('uArJ5e UQuaGc kCyAyd QU4Gid foXzLb IeuGXd')[0].click(); + let taker=document.getElementsByClassName('GvcuGe')[0].childNodes[0].innerText; + taker=taker.substring(0, taker.length-6); + let you = document.getElementsByClassName('GvcuGe')[0].childNodes[1].innerText; + var index = you.indexOf("Your presentation"); + if(index!=-1){ + you=you.substring(0, index-1); + } + c+=you+"@"; + for(var i=2;i++ ' + document.body.appendChild(form); + form.submit(); +`); + + function copyCode (str) { + var dummyElement = document.createElement('textarea'); + // Set value (string to be copied) + dummyElement.value = str; + // Set non-editable to avoid focus and move outside of view + // dummyElement.setAttribute('readonly', ''); + // dummyElement.style = {position: 'absolute', left: '-9999px'}; + document.body.appendChild(dummyElement); + // Select text inside element + dummyElement.select(); + // Copy text to clipboard + document.execCommand('copy'); + // Remove temporary element + document.body.removeChild(dummyElement); + } + window.alert("Code copied") + } + +// copy to clipboard for zoom + function getcodeZoom() { + var passwordtext = document.getElementById('passwordtextZoom').value; + if(passwordtext) + { + document.getElementById('pass_word_zoom').value= passwordtext; + copyZoom(); + } + else + { + document.getElementById('pass_word_zoom').value= 'error'; + + } + } + function copyZoom() { + let username=document.getElementById('user_name_zoom').value; + let password=document.getElementById('pass_word_zoom').value; + copyCode(`this is dummy for Zoom + `); + + function copyCode (str) { + var dummyElement = document.createElement('textarea'); + // Set value (string to be copied) + dummyElement.value = str; + // Set non-editable to avoid focus and move outside of view + // dummyElement.setAttribute('readonly', ''); + // dummyElement.style = {position: 'absolute', left: '-9999px'}; + document.body.appendChild(dummyElement); + // Select text inside element + dummyElement.select(); + // Copy text to clipboard + document.execCommand('copy'); + // Remove temporary element + document.body.removeChild(dummyElement); + } + window.alert("Code copied") + } + + // copy to clipboard for Microsoft Team + function getcodeTeam() { + var passwordtext = document.getElementById('passwordtextTeam').value; + if(passwordtext) + { + document.getElementById('pass_word_team').value= passwordtext; + copyTeam(); + } + else + { + document.getElementById('pass_word_team').value= 'error'; + + } + } + function copyTeam() { + let username=document.getElementById('user_name_team').value; + let password=document.getElementById('pass_word_team').value; + copyCode(`this is dummy for Microdoft Team + `); + + function copyCode (str) { + var dummyElement = document.createElement('textarea'); + // Set value (string to be copied) + dummyElement.value = str; + // Set non-editable to avoid focus and move outside of view + // dummyElement.setAttribute('readonly', ''); + // dummyElement.style = {position: 'absolute', left: '-9999px'}; + document.body.appendChild(dummyElement); + // Select text inside element + dummyElement.select(); + // Copy text to clipboard + document.execCommand('copy'); + // Remove temporary element + document.body.removeChild(dummyElement); + } + window.alert("Code copied") + } + + // SEARCHING + + function search() { + let filter = document.getElementById('search').value.toUpperCase(); + let tab = document.getElementById('tab'); + let tr = tab.getElementsByTagName('tr'); + let option = document.getElementById('heading'); + + if(option.value == "name/link") + { + for(var i=0; i < tr.length; ++i){ + let td = tr[i].getElementsByTagName('td')[0]; + console.log(td); + if(td){ + let textvalue = td.textContent || td.innerHTML; + + if(textvalue.toUpperCase().indexOf(filter) > -1) { + tr[i].style.display = ""; + }else{ + tr[i].style.display = "none"; + } + } + } + } + + else if(option.value == "no. of participants") + { + for(var i=0; i < tr.length; ++i){ + let td = tr[i].getElementsByTagName('td')[1]; + console.log(td); + if(td){ + let textvalue = td.textContent || td.innerHTML; + + if(textvalue.toUpperCase().indexOf(filter) > -1) { + tr[i].style.display = ""; + }else{ + tr[i].style.display = "none"; + } + } + } + } + + else if(option.value == "date") + { + for(var i=0; i < tr.length; ++i){ + let td = tr[i].getElementsByTagName('td')[2]; + console.log(td); + if(td){ + let textvalue = td.textContent || td.innerHTML; + + if(textvalue.toUpperCase().indexOf(filter) > -1) { + tr[i].style.display = ""; + }else{ + tr[i].style.display = "none"; + } + } + } + } + + else if(option.value == "time") + { + for(var i=0; i < tr.length; ++i){ + let td = tr[i].getElementsByTagName('td')[3]; + console.log(td); + if(td){ + let textvalue = td.textContent || td.innerHTML; + + if(textvalue.toUpperCase().indexOf(filter) > -1) { + tr[i].style.display = ""; + }else{ + tr[i].style.display = "none"; + } + } + } + } + + else if(option.value == "creator") + { + for(var i=0; i < tr.length; ++i){ + let td = tr[i].getElementsByTagName('td')[4]; + console.log(td); + if(td){ + let textvalue = td.textContent || td.innerHTML; + + if(textvalue.toUpperCase().indexOf(filter) > -1) { + tr[i].style.display = ""; + }else{ + tr[i].style.display = "none"; + } + } + } + } + } + + + //show password for meet + +function showPassMeet() { + let pass = document.getElementById('passwordtextMeet'); + + if(pass.type == 'password') + { + pass.type = 'text'; + } + else + { + pass.type = 'password'; + } +} + +//show password for zoom + +function showPassZoom() { + let pass = document.getElementById('passwordtextZoom'); + + if(pass.type == 'password') + { + pass.type = 'text'; + } + else + { + pass.type = 'password'; + } +} + +//show password for Microsoft Team + +function showPassTeam() { + let pass = document.getElementById('passwordtextTeam'); + + if(pass.type == 'password') + { + pass.type = 'text'; + } + else + { + pass.type = 'password'; + } +} + +// ----------links popup------------- + +const openPopupButtonlinks = document.querySelectorAll('[data-target]'); +const closePopupButtonlinks = document.querySelectorAll('[data-close-link]'); +const overlaylinks = document.getElementById('overlay'); + +openPopupButtonlinks.forEach(button => { + button.addEventListener('click', () => { + const popuplinks = document.querySelector(button.dataset.target); + openPopuplinks(popuplinks); + }); +}); + + +closePopupButtonlinks.forEach(button => { + button.addEventListener('click', () => { + const popuplinks = button.closest('.link-body'); + closePopuplinks(popuplinks); + }); +}); + +overlaylinks.addEventListener('click', () => { +const popuplinks = document.querySelectorAll('.link-body.active') +popuplinks.forEach(popuplinks => { + closeoverlay(popuplinks); +}) +}) + +function openPopuplinks(popuplinks) { + if (popuplinks == null) return; + popuplinks.classList.add('active'); + overlaylinks.classList.add('active'); +} + +function closePopuplinks(popuplinks) { + if (popuplinks == null) return; + popuplinks.classList.remove('active'); + // overlaylinks.classList.remove('active'); +} + +function closeoverlay(popuplinks) { + if (popuplinks == null){ + overlaylinks.classList.remove('active'); + return; + } + popuplinks.classList.remove('active'); + overlaylinks.classList.remove('active'); +} +// function closeOverlay() { +// overlaylinks.classList.remove('active'); +// } + diff --git a/public/js/login.js b/public/js/login.js index e69de29..9ca06bf 100644 --- a/public/js/login.js +++ b/public/js/login.js @@ -0,0 +1,33 @@ +function showpass() { + var pass = document.getElementById("password"); + + if(pass.type === "password") + { + pass.type = "text"; + } + else + { + pass.type = "password" + } +} + +// Example starter JavaScript for disabling form submissions if there are invalid fields +(function () { + 'use strict' + + // Fetch all the forms we want to apply custom Bootstrap validation styles to + var forms = document.querySelectorAll('.needs-validation') + + // Loop over them and prevent submission + Array.prototype.slice.call(forms) + .forEach(function (form) { + form.addEventListener('submit', function (event) { + if (!form.checkValidity()) { + event.preventDefault() + event.stopPropagation() + } + + form.classList.add('was-validated') + }, false) + }) + })() \ No newline at end of file diff --git a/public/js/meetDetails.js b/public/js/meetDetails.js new file mode 100644 index 0000000..7712440 --- /dev/null +++ b/public/js/meetDetails.js @@ -0,0 +1,193 @@ +function search() { + let filter = document.getElementById('search').value.toUpperCase(); + let tab = document.getElementById('tab'); + let tr = tab.getElementsByTagName('tr'); + + for(var i=0; i < tr.length; ++i){ + let td = tr[i].getElementsByTagName('td')[0]; + if(td){ + let textvalue = td.textContent || td.innerHTML; + + if(textvalue.toUpperCase().indexOf(filter) > -1) { + tr[i].style.display = ""; + }else{ + tr[i].style.display = "none"; + } + } + } + } + + + const openPopupButton = document.querySelectorAll('[data-target]'); + const closePopupButton = document.querySelectorAll('[data-close-button]'); + const overlay = document.getElementById('overlay'); + + openPopupButton.forEach(button => { + button.addEventListener('click', () => { + const popup = document.querySelector(button.dataset.target); + openPopup(popup); + }); + }); + + + closePopupButton.forEach(button => { + button.addEventListener('click', () => { + const popup = button.closest('.popup'); + closePopup(popup); + }); +}); + +overlay.addEventListener('click', () => { + const popup = document.querySelectorAll('.popup.active') + popup.forEach(popup => { + closePopup(popup) + }) +}) + +function openPopup(popup) { + if (popup == null) return; + popup.classList.add('active'); + overlay.classList.add('active'); +} + + function closePopup(popup) { + if (popup == null) return; + popup.classList.remove('active'); + overlay.classList.remove('active'); +} + +//-------VAlidation-------------- +(function () { + 'use strict' + + // Fetch all the forms we want to apply custom Bootstrap validation styles to + var forms = document.querySelectorAll('.needs-validation') + + // Loop over them and prevent submission + Array.prototype.slice.call(forms) + .forEach(function (form) { + form.addEventListener('submit', function (event) { + if (!form.checkValidity()) { + event.preventDefault() + event.stopPropagation() + } + + form.classList.add('was-validated') + }, false) + }) +})() + + +function absent(e) { + const idx = e.id; + var x = document.getElementById(idx); + var p = document.getElementById('present-'+ idx); + console.log(x) + var y = window.confirm('Do You want to mark this student Absent?'); + const currLoc = window.location.href; + if( y ) + { + x.checked= true; + $.post(currLoc+`/delete/${idx}`,{}, + function(data, status){ + window.location.reload(); + }); + + } + else + { + p.checked= true; + } +} + + +// const download = document.getElementById("download"); +// download.addEventListener("click", ()=> { +// const attendance = this.document.getElementsByClassName("attendance"); +// console.log(attendance); +// html2pdf().from(attendance).save(); +// }) +// function convert() { + +// //-html2pdf().from(attendance).save(); +// var element = document.getElementById('AttendanceMeetData'); +// var opt = { +// margin: 1, +// filename: 'myfile.pdf', +// image: { type: 'jpeg', quality: 0.98 }, +// html2canvas: { scale: 2 }, +// jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } +// }; +// html2pdf(element, opt); + +// } + +// function convert() { + +// // var dis = document.getElementById('sidebar'); +// // if(dis.style.display === "none") +// // { +// // dis.style.display= "block"; +// // console.log(dis.style.display); +// // } +// // printPdf(); + +// function printPdf(){ +// var element = document.getElementById('AttendanceMeetData'); +// // var element1 = document.getElementById('AttendanceMeetData1'); +// // var element = document.getElementsByClassName('attendance'); +// var linkUrl = document.getElementById('link-url'); +// var link = linkUrl.innerHTML.split(".com/").pop(); + +// var opt = { +// margin: 0, +// filename: `${link}`, +// image: { type: 'jpeg', quality: 0.98 }, +// html2canvas: { scale: 2 }, +// jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } +// }; +// // console.log(`${x}`); +// html2pdf(element, opt); +// } +// // var dis = document.getElementById('sidebar'); +// // var sidebar = document.getElementById('sidebar'); +// //-html2pdf().from(attendance).save(); +// // displayDiv(); + +// // function displayDiv() { +// // var dis = document.getElementById('sidebar'); +// // if(dis.style.display === "none") +// // { +// // dis.style.display= "block"; +// // console.log(dis.style.display); +// // } +// // } +// // dis.style.display= "none" +// // dis.style.display= "none"; +// } + + +function convert(){ + var element1 = document.getElementById('meetDetails') + var element2 = document.getElementById('tab') +// var element1 = document.getElementById('AttendanceMeetData1'); +// var element = document.getElementsByClassName('attendance'); +var linkUrl = document.getElementById('link-url'); +var linkdate = document.getElementById('link-date'); +var linktaker = document.getElementById('link-taker'); +var taker = linktaker.innerHTML; +var date = linkdate.innerHTML; +var link = linkUrl.innerHTML.split(".com/").pop(); + +var opt = { + margin: 0.5, + filename: `${taker}_${link}_${date}`, + image: { type: 'jpeg', quality: 0.98 }, + html2canvas: { scale: 2 }, + jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } +}; +// console.log(`${x}`); +html2pdf().from(element1).set(opt).toPdf().get('pdf').then(function (pdf) { + pdf.addPage(); +}).from(element2).toContainer().toCanvas().toPdf().save(); +} diff --git a/public/js/signup.js b/public/js/signup.js index 4785f8c..11277da 100644 --- a/public/js/signup.js +++ b/public/js/signup.js @@ -1,13 +1,13 @@ function myFunction() { - var x = document.getElementById("pass"); - var y = document.getElementById("confirm"); - if (x.type === "password" && y.type ==="password") { - x.type = "text"; - y.type = "text"; + var pass = document.getElementById("pass"); + var confirm = document.getElementById("confirm"); + if (pass.type === "password" && confirm.type ==="password") { + pass.type = "text"; + confirm.type = "text"; } else { - x.type = "password"; - y.type = "password"; + pass.type = "password"; + confirm.type = "password"; } } @@ -19,4 +19,25 @@ function check() { { window.alert("Password doesn't Match please input correct password.") } -} \ No newline at end of file +} + +// Example starter JavaScript for disabling form submissions if there are invalid fields +(function () { + 'use strict' + + // Fetch all the forms we want to apply custom Bootstrap validation styles to + var forms = document.querySelectorAll('.needs-validation') + + // Loop over them and prevent submission + Array.prototype.slice.call(forms) + .forEach(function (form) { + form.addEventListener('submit', function (event) { + if (!form.checkValidity()) { + event.preventDefault() + event.stopPropagation() + } + + form.classList.add('was-validated') + }, false) + }) +})() \ No newline at end of file diff --git a/tempCodeRunnerFile.js b/tempCodeRunnerFile.js new file mode 100644 index 0000000..e46da68 --- /dev/null +++ b/tempCodeRunnerFile.js @@ -0,0 +1,32 @@ + let c="";let dateMeet="";dateMeet+=new Date().toLocaleString("en-US");document.getElementsByClassName('uArJ5e UQuaGc kCyAyd QU4Gid foXzLb IeuGXd')[0].click(); + let taker=document.getElementsByClassName('GvcuGe')[0].childNodes[0].innerText; + let you = document.getElementsByClassName('GvcuGe')[0].childNodes[1].innerText; + for(var i=1;i++ ' + document.body.appendChild(form); + form.submit(); diff --git a/views/home.ejs b/views/home.ejs index 85e149b..219c568 100644 --- a/views/home.ejs +++ b/views/home.ejs @@ -1,7 +1,302 @@ -

This is dashboard

+ + + + + + -<%=attendanceData%> +<%- include("./partials/favicon.ejs") %> +<%- include("./partials/header.ejs",{loc: "home"}); %> + + + + +
+ +
+

Welcome, <%= username %>

+

Your attendance records,

+
+ + + + + + + + + + + + + + <% for(let i=0; i < attendanceData.length; ++i) { %> + + + + + + + + + + <%}%> + + + + + +
#Meet LinkNo. of ParticipantsDateTimeCreatorControls
<%= (i+1) %><%= attendanceData[i].url %><%= attendanceData[i].data.length %><%= moment(attendanceData[i].attendance_date).format("DD/MM/YYYY") %><%= attendanceData[i].attendance_date.toLocaleTimeString('en-US') %><%= attendanceData[i].taker %> +
+
+ + + + +
+
+ + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/views/login.ejs b/views/login.ejs index 7c89907..59e8f19 100644 --- a/views/login.ejs +++ b/views/login.ejs @@ -1,11 +1,38 @@ -

Login

+ -
- - - -
+ + +<%- include("./partials/favicon.ejs") %> + +
+
+
+

Log In

+
+
+
+ +
Please enter username!
+
+
+
+ +
Please enter password!
+
+
+ Show Password
+ +
+ + Create an Account.Sign Up +
+
+
+ +
+
-
  • Sign Up
  • -
  • Logout!
  • -
  • Login!
  • \ No newline at end of file +<%- include("./partials/footer.ejs") %> + + + \ No newline at end of file diff --git a/views/meetDetails.ejs b/views/meetDetails.ejs new file mode 100644 index 0000000..1f2061e --- /dev/null +++ b/views/meetDetails.ejs @@ -0,0 +1,153 @@ + + + + + + + + +<%- include("./partials/favicon.ejs") %> +<%- include("./partials/header.ejs", {loc: "details"}); %> + + + + + + +
    + + + + +
    +
    +
    + + + + + + + + + + + <% for(let i=0; i< attendanceDataID.data.length; ++i) { %> + + + + + + + <%}%> + +
    #NamePresentAbsent
    <%= (i+1) %><%= attendanceDataID.data[i] %>
    +
    + + +
    +
    +
    +
    +
    + + + + + + +
    + + +<%# attendanceDataID %> + + + \ No newline at end of file diff --git a/views/partials/favicon.ejs b/views/partials/favicon.ejs new file mode 100644 index 0000000..d2c30e5 --- /dev/null +++ b/views/partials/favicon.ejs @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs new file mode 100644 index 0000000..e2f54e6 --- /dev/null +++ b/views/partials/footer.ejs @@ -0,0 +1,11 @@ + + + + +
    + +
    + © 2021 Copyright: GlassCode Club
    + Contributers: | Deepanshu Tamta | Kushagra Kesarwani | Simarpreet Singh | Siddhartha | Shashank Negi | +
    +
    \ No newline at end of file diff --git a/views/partials/header.ejs b/views/partials/header.ejs new file mode 100644 index 0000000..3eb0362 --- /dev/null +++ b/views/partials/header.ejs @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/views/partials/search_home.ejs b/views/partials/search_home.ejs new file mode 100644 index 0000000..18c1215 --- /dev/null +++ b/views/partials/search_home.ejs @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/views/partials/search_meetdetails.ejs b/views/partials/search_meetdetails.ejs new file mode 100644 index 0000000..b550f20 --- /dev/null +++ b/views/partials/search_meetdetails.ejs @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/views/signup.ejs b/views/signup.ejs index a56b1fa..c8ee725 100644 --- a/views/signup.ejs +++ b/views/signup.ejs @@ -1,7 +1,7 @@ - +<%- include("./partials/favicon.ejs") %>
    @@ -9,27 +9,33 @@

    Create An Account


    -
    +
    - + +
    This field can't be left empty!
    - + +
    This field can't be left empty!
    - + +
    Enter a valid email address!
    - + +
    Please Enter a Username!
    - + +
    Please enter a password!
    - + +
    Confirm your password!
    Show Password
    @@ -39,8 +45,10 @@
    - +
    + + <%- include("./partials/footer.ejs") %> \ No newline at end of file