Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-1926 committed Aug 20, 2019
0 parents commit 5b41863
Show file tree
Hide file tree
Showing 105 changed files with 6,433 additions and 0 deletions.
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "code-quotient",
"version": "1.0.0",
"description": "web project website building of code quotient",
"main": "server.js",
"dependencies": {
"ejs": "^2.6.1",
"express": "^4.17.1",
"express-session": "^1.16.1",
"mongoose": "^5.5.12",
"multer": "^1.4.1",
"node.js": "^0.0.0",
"nodemailer": "^6.2.1",
"passport": "^0.4.0",
"passport-github": "^1.1.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "https://github.com/nitin-1926/CodeQuotient-Project.git"
},
"author": "Nitin Gupta",
"license": "ISC",
"bugs": {
"url": "https://github.com/nitin-1926/CodeQuotient-Project/issues"
},
"homepage": "https://github.com/nitin-1926/CodeQuotient-Project#readme"
}
Binary file added public/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions public/adduser.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@


.div-min-width {
min-width: 360px;
}
.div {
margin: auto;
margin-top: 3%;
/*display: block;*/
width: 45%;
/*margin-top: 4%;*/
border: 5px solid rgba(0, 0, 0, 0.1);
background-color: rgb(255, 255, 255);
}

.adduser-form {
padding-right: 15px;
padding-left: 15px;
font-family: Open-Sans,sans-serif;
}

h1 {
margin-bottom: 10px;
margin-top: 20px;
font-size: 36px;
font-weight: 500;
}

.input-field {
font-size: 14px;
width: 100%;
display: block;
padding: 6px 12px;
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 20px;
line-height: 1.42857143;

}

.submit-field {
margin-bottom: 20px;
padding: 6px 12px;
border-radius: 0;
font-weight: 400;
height: 35px;
}

#submit {
cursor: pointer;
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
border: 1px solid transparent;
border-radius: 0;
}

#cancel {
cursor: pointer;
color: #fff;
background-color: #d9534f;
border-color: #d43f3a;
border: 1px solid transparent;
border-radius: 0;
}

.adduser {
background-color: #337AB6;
color: #FFFFFF;
}
5 changes: 5 additions & 0 deletions public/adduser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

function openhomepage()
{
window.location = '/home'
}
32 changes: 32 additions & 0 deletions public/blueimage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

.allSides {
box-shadow: 0 0 10px rgba(0,0,0,0.6);
-moz-box-shadow: 0 0 10px rgba(0,0,0,0.6);
/* -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.6); */
-o-box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

@media (max-width: 768px) and (min-width: 0px)
{
.mobile {
display: block !important;
}
}

.profile-pic-center {
background: rgb(255, 255, 255) !important;
height: 120px;
width: 120px;
margin-top: 50px;
border-radius: 50%;
border: 2px solid #fff;
}

.profile-pic-center-main-div {
display: none;
height: 110px;
width: 100%;
margin-bottom: 50px;
background-image: linear-gradient(to bottom, #4ba2b7, #42a6be, #38aac6, #29adcd, #0fb1d5);
text-align: center;
}
38 changes: 38 additions & 0 deletions public/changepassword.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

.div-min-width {
min-width: 360px;
}

.changepassword {
background-color: #337AB6;
color: white;
}

h1 {
font-size: 36px;
margin-top: 20px;
margin-bottom: 10px;
font-weight: 500;
line-height: 1.1;
}

#submit-button {
cursor: pointer;
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
padding: 6px 12px;
border: 1px solid transparent;
border-radius: 0;
width: 75px;
}

#wrong {
margin-top: 10px;
display: none;
}

#right {
margin-top: 10px;
display: none;
}
37 changes: 37 additions & 0 deletions public/changepassword.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

var old_password = document.getElementById("old-password")
var new_password = document.getElementById("new-password")
var button = document.getElementById("submit-button")
button.onclick= ()=>
{
var obj = Object();
obj.old_password = old_password.value
obj.new_password = new_password.value
var request = new XMLHttpRequest();
request.open('POST','/changepassword');
request.setRequestHeader("Content-Type","application/json");
request.send(JSON.stringify(obj));
request.onload = function ()
{
if(request.responseText=="0")
{
if(document.getElementById("right"))
{
document.getElementById("right").style.display = "none";
}
document.getElementById("wrong").style.display = "block";
old_password.value = ""
new_password.value = ""
}
else
{
if(document.getElementById("wrong"))
{
document.getElementById("wrong").style.display = "none";
}
document.getElementById("right").style.display = "block";
old_password.value = ""
new_password.value = ""
}
}
}
20 changes: 20 additions & 0 deletions public/common.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@


body {
padding: 0;
margin: 0;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 1.42857143;
background-color: #F3F4F4;
}

#pagename-icon
{
float:left;
border: 2px solid #2D312C;
background-color: #2D312C;
color: #fff;
font-weight: bold;
box-shadow: 0 0 11px black;
}
40 changes: 40 additions & 0 deletions public/communitylist.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.div-min-width
{
min-width: 368px;
}

#pagename-icon
{
float:left;
border: 2px solid #2D312C;
background-color: #2D312C;
color: #fff;
font-weight: bold;
box-shadow: 0 0 11px black;
}

.actionbtns {
margin: 5px;
}

@media (min-width:768px)
{
#container-parent
{
margin-left: 40px;
margin-right: 20px;
}

}

@media (max-width:768px)
{
.div-min-width {
overflow-x: scroll;
}
}

.communitylist {
background-color: #337AB6;
color: white;
}
102 changes: 102 additions & 0 deletions public/communitylist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@

function getdata() {
console.log("hello");
$.fn.dataTable.ext.errMode = 'none';
var table = $('#community-table').DataTable({
"processing" : true,
"serverSide" : true,
"ajax": {
"url":"/cl",
"type":"POST",
"data" : function(d) {
d.communitymembershiprule= $('#membership-select').val();
}
},
"columns": [
{
"data" : "communityname",
},
{
"data" : "communitymembershiprule",
"sorting" : "false"
},
{
"data" : "communitylocation"
},
{
"data" : "communityowner",
},
{
"data" : "communitycreatedate",
},
{
"data" : null,
"sorting" : "false"
},
{
"data" : null,
"sorting" : "false"
},
],
"columnDefs": [{
"targets": 6,

"render": function (data, type, row, meta) {
data ='<img src="'+row.communityimage+'" style="width:80px; height:80px; border:4px solid red;"></img>'
return data;
}

},{
"targets" : 5,

"render" : function (data,type,row,meta) {
data = '<center><a class="btn btn-sm editbtn actionbtns" data-target="#updateCommunity" data-toggle="modal" onclick=editCommunity("'+row.communitycreatedate+'","'+row.communityowner+'","' + encodeURIComponent(row.communityname) + '","' + encodeURIComponent(row.communityconfirm) + '","'+row._id+'") style="margin-top:35px;background-color: #2D312C;color: #fff"><span class="fa fa-edit"></span></a><a class="btn btn-sm infobtn actionbtns" onlcick=showComminfo("' + encodeURIComponent(row.communityname) + '", "' + row.communityname + '" ,"' + encodeURIComponent(row.communitydescription) + '") data-toggle="modal" data-target="#CommunityInfo" style="margin-top:35px;background-color: #2D312C;color: #fff"><span class="fa fa-info"></span></a></center>'
return data;
}
}],
})

$('#membership-select').on('change', function () {
table.ajax.reload(null, false);
});

$('#refresh').on('change', function () {
table.ajax.reload(null, false);
});

}

$(document).ready(function() {
console.log("1");
getdata()
})

function editCommunity(obj,commo,commn,comms,_id)
{
commn = decodeURIComponent(commn)
comms = decodeURIComponent(comms)
$('#CommunityNamePop').html("Update " + commn);
$('#CommunityAdminPop').html("Created by " + commo + "," + obj);
$('#CommuityName').val(commn);
$('#communityStatus').val(comms);
$('#editsubmit').off('click').on('click', function() {
var obj = Object();
obj._id = _id;
obj.communityname = $('#CommuityName').val();
obj.communityconfirm = $('#communityStatus').val();
var request = new XMLHttpRequest()
request.open('POST','/updateCommunity')
request.setRequestHeader("Content-Type","application/json");
request.send(JSON.stringify(obj));
request.onload = function ()
{
alert('Requested Communtiy Updated');
}
});
}

function showComminfo(commn,i,commd)
{
commn = decodeURIComponent(commn)
commd = decodeURIComponent(commd)
}
Empty file added public/communityprofile.js
Empty file.
Loading

0 comments on commit 5b41863

Please sign in to comment.