Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made changes in hackathon.css for card #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,47 @@
//Importing npm packages

const express = require("express");

const http = require("http");

const cookieParser = require("cookie-parser");

const cookieSession = require("cookie-session");

const bodyParser = require("body-parser");

const methodOverride = require('method-override');

const passport = require("passport");

const keys = require("./config/keys");

const socketio = require("socket.io");

const formatMessage = require('./utils/messages');

const moment = require("moment");


//Importing MongoDB models

require("./db/mongoose");
const User = require("./models/User");
const webScraper = require("./db/webScraper");


//Importing Routes

const user = require("./routes/user");
const auth = require("./routes/auth");
const friend = require("./routes/friend");


//Variables
const port = process.env.PORT||3000;

const app = express();

const server=http.createServer(app);

const io = socketio(server);
Expand Down Expand Up @@ -62,6 +80,7 @@ app.get("/",(req,res)=>{
});
}else{
User.findOne({email:req.user.email},(err,user)=>{
// console.log(err)
if(err) Error(err);
if(user){
res.redirect("/user/dashboard");
Expand All @@ -71,6 +90,7 @@ app.get("/",(req,res)=>{
});


// new web socket connection

io.on('connection',(socket)=>{

Expand All @@ -79,12 +99,12 @@ io.on('connection',(socket)=>{
// Runs when user joins room
socket.on('joinRoom',({user_id})=>{
socket.join(user_id);
// console.log(user_id)
console.log("Room Joined");
});

// Listen for chat message
// Listen for the chat message
socket.on('chatMessage',({msg,friend_id,user_id})=>{

User.findOne({_id:user_id},async(err,user)=>{
User.findOne({_id:friend_id},async (err,friend)=>{

Expand Down Expand Up @@ -113,8 +133,9 @@ io.on('connection',(socket)=>{
await friend.save();
}
});

// messaging to a friend
io.to(user_id).emit('message',formatMessage(user_id,msg,friend_id));

io.to(friend_id).emit('message',formatMessage(user_id,msg,user_id));
});
});
Expand Down
35 changes: 18 additions & 17 deletions assets/css/hackathon.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
.back-crcle{
font-size: medium;
color: #fff;
color: #ffffff;
position: relative;
display: flex;
justify-content: center;
Expand All @@ -33,7 +33,7 @@
.back-crcle:hover{
transform: scale(1.1);
transition: 0.25s ease;
color: #fff;
color: #ffffff;
}
.underline{
height: 2px;
Expand All @@ -52,7 +52,7 @@ color: #fff;
margin-top:-100px ;
}
.mn p{
color: #FFF !important; font-size: 27px;font-family: 'Raleway', sans-serif;
color: #FFFFFF !important; font-size: 27px;font-family: 'Raleway', sans-serif;
}
.usp{
display: flex;
Expand Down Expand Up @@ -82,7 +82,7 @@ color: #fff;
justify-content: center;
}
.soc-icons{
color: #fff;
color: #ffffff;
font-size: xx-large;
}
.soc-icons i{
Expand Down Expand Up @@ -234,19 +234,7 @@ color: #fff;
.form-control{
border: 1px solid #23232321 !important;
}
.chat-container{
background: rgb(8,25,45);
background: -moz-linear-gradient(180deg, rgba(8,25,45,1) 0%, rgba(65,78,93,1) 20%, rgba(215,219,214,1) 20%, rgba(215,219,214,1) 100%);
background: -webkit-linear-gradient(180deg, rgba(8,25,45,1) 0%, rgba(65,78,93,1) 20%, rgba(215,219,214,1) 20%, rgba(215,219,214,1) 100%);
background: linear-gradient(180deg, rgba(8,25,45,1) 0%, rgba(65,78,93,1) 20%, rgba(215,219,214,1) 20%, rgba(215,219,214,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#08192d",endColorstr="#d7dbd6",GradientType=1);
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}

.chat-total{
background-color: #fff;
width: 90vw;
Expand Down Expand Up @@ -285,6 +273,19 @@ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#08192d",endCo
.chat-form input{
width: 92%;
}
.chat-container{
background: rgb(8,25,45);
background: -moz-linear-gradient(180deg, rgba(8,25,45,1) 0%, rgba(65,78,93,1) 20%, rgba(215,219,214,1) 20%, rgba(215,219,214,1) 100%);
background: -webkit-linear-gradient(180deg, rgba(8,25,45,1) 0%, rgba(65,78,93,1) 20%, rgba(215,219,214,1) 20%, rgba(215,219,214,1) 100%);
background: linear-gradient(180deg, rgba(8,25,45,1) 0%, rgba(65,78,93,1) 20%, rgba(215,219,214,1) 20%, rgba(215,219,214,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#08192d",endColorstr="#d7dbd6",GradientType=1);
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.heading
{

Expand Down