Skip to content

Commit 9fecd9e

Browse files
authored
Merge pull request #3 from bitsUnxte/main
mmm
2 parents acc6295 + f1b4823 commit 9fecd9e

File tree

5 files changed

+310
-22
lines changed

5 files changed

+310
-22
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# bitsUnxte
22

33
This is a platform where BITSians can find fellow BITSians and connect with like- minded people using our wide range of filters and search bar.
4+
5+
## Added a Chat Room
6+
7+
This feature is ONLY available for BITSians who have logged in/signed up using their BITS email.

chat.html

+188-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,100 @@
11
<!doctype html>
22
<html lang="en">
3+
<main>
4+
<head>
5+
<title>bitsUnxte</title>
6+
<link id="favicon" rel="icon" href="/images/BITS UNXTE.png" type="image/x-icon"/>
7+
<meta charset="utf-8">
8+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
9+
10+
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
11+
12+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
13+
<link rel="stylesheet" href="css/style.css">
14+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
15+
<link
16+
href="/css/mystyles.css" rel="stylesheet">
17+
<link
18+
href="/css/chat.css" rel="stylesheet">
19+
<!-- Global site tag (gtag.js) - Google Analytics -->
20+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1ZQ6F5KTZV"></script>
21+
<script>
22+
window.dataLayer = window.dataLayer || [];
23+
function gtag() {
24+
dataLayer.push(arguments);
25+
}
26+
gtag('js', new Date());
27+
28+
gtag('config', 'G-1ZQ6F5KTZV');
29+
</script>
30+
31+
</head>
32+
<body>
33+
34+
35+
<div class="wrapper d-flex align-items-stretch">
36+
<nav id="sidebar">
37+
<div class="custom-menu">
38+
<button type="button" id="sidebarCollapse" class="btn btn-primary">
39+
<i class="fa fa-bars"></i>
40+
<span class="sr-only">Toggle Menu</span>
41+
</button>
42+
</div>
43+
<div class="p-4 pt-5">
44+
<h1>
45+
<a href="index.html" class="logo">BITS UNXTE</a>
46+
</h1>
47+
<ul class="list-unstyled components mb-5">
48+
<li>
49+
<a href="index.html" aria-expanded="false">Home</a>
50+
</li>
51+
52+
<li>
53+
<a href="#pageSubmenu" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">Branchwise Filter</a>
54+
<ul class="collapse list-unstyled" id="pageSubmenu">
55+
<li>
56+
<a href="cs.html">BE Computer Science</a>
57+
</li>
58+
<li>
59+
<a href="ece.html">BE Electronics and Communication</a>
60+
</li>
61+
<li>
62+
<a href="eee.html">BE Electrical and Electronics</a>
63+
</li>
64+
<li>
65+
<a href="eni.html">BE Electronics and Instrumentation</a>
66+
</li>
67+
<li>
68+
<a href="mech.html">BE Mechanical</a>
69+
</li>
70+
<li>
71+
<a href="chem.html">BE Chemical</a>
72+
</li>
73+
<li>
74+
<a href="civ.html">BE Civil</a>
75+
</li>
76+
<li>
77+
<a href="manuf.html">BE Manufacturing</a>
78+
</li>
79+
<li>
80+
<a href="eco.html">Msc Economics</a>
81+
</li>
82+
<li>
83+
<a href="math.html">Msc Maths</a>
84+
</li>
85+
<li>
86+
<a href="phy.html">Msc Physics</a>
87+
</li>
88+
<li>
89+
<a href="biosci.html">Msc Biological Sciences</a>
90+
</li>
91+
<li>
92+
<a href="mscchem.html">Msc Chemistry</a>
93+
</li>
94+
<li>
95+
<a href="bpharm.html">BPharm</a>
96+
</li>
97+
398
<head>
499

5100
<title>bitsUnxte</title>
@@ -119,22 +214,102 @@ <h1 class="mb-4">CHAT ROOM</h1>
119214
</div>
120215
<div class="chatroom">
121216
<script id="cid0020000302530027141" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 100%;height: 100%;">{"handle":"bitsunxtechatroom","arch":"js","styles":{"a":"6749b9","b":100,"c":"000000","d":"000000","k":"6749b9","l":"6749b9","m":"6749b9","p":"11.5","q":"6749b9","r":100,"surl":0,"cnrs":"0.35"}}</script>
217+
<main>
122218

123-
</div>
124-
125-
</div>
126-
</div>
219+
</ul>
220+
</li>
221+
<li>
222+
<a href="https://docs.google.com/forms/d/e/1FAIpQLScO9I4xsXXZkwMeHu3BQnxIlyGdvXyMr3bItkdmP5pLTAZtNQ/viewform?usp=sf_link">Sign Up</a>
223+
</li>
127224

128-
<script src="/js/jquery.min.js"></script>
129-
<script src="/js/popper.js"></script>
130-
<script src="/js/bootstrap.min.js"></script>
131-
<script src="/js/main.js"></script>
132-
<script src="/js/myjs.js"></script>
133-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.1.0/papaparse.min.js"></script>
225+
<li>
226+
<a href="chat.html">Chat Room</a>
227+
</li>
228+
<li>
229+
<a href="about.html">About Us</a>
230+
</li>
231+
</ul>
134232

233+
</div>
234+
</nav>
135235

136-
236+
<!-- Page Content -->
237+
<div id="content" class="p-4 p-md-5 pt-5">
137238

138-
139-
</body>
239+
<div class="myheader">
240+
<h1 class="mb-4">CHAT ROOM</h1>
241+
242+
</div>
243+
<div class="chatroom clogin">
244+
<form action="javascript:void(0);" style="border:1px solid #ccc" class="chatsingup">
245+
<div class="container">
246+
<h1>BITS UNXTE</h1>
247+
<p>Enter your BITS email to access the chatroom.
248+
<br>
249+
Don't worry, you'll be fully anonymous.
250+
<br>
251+
You can use it only if you have signed up on BITS UNXTE.
252+
</p>
253+
<hr>
254+
<input id="emailid" type="text" placeholder="Enter Email" name="email" required>
255+
<button type="submit" class="signupbtn" onclick="emailogin()">Sign In</button>
256+
<button type="submit" class="signupbtn" onclick="window.location.href = 'https://docs.google.com/forms/d/e/1FAIpQLScO9I4xsXXZkwMeHu3BQnxIlyGdvXyMr3bItkdmP5pLTAZtNQ/viewform?usp=sf_link';">Sign Up</button>
257+
<p class="mt-5 mb-3 text-muted">&copy; BITS UNXTE</p>
258+
259+
</div>
260+
</form>
261+
</div>
262+
<div class="chatroom cchat">
263+
264+
<script id="cid0020000302530027141" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 100%;height: 100%;">
265+
{
266+
"handle": "bitsunxtechatroom",
267+
"arch": "js",
268+
"styles": {
269+
"a": "6749b9",
270+
"b": 100,
271+
"c": "000000",
272+
"d": "000000",
273+
"k": "6749b9",
274+
"l": "6749b9",
275+
"m": "6749b9",
276+
"p": "11.5",
277+
"q": "6749b9",
278+
"r": 100,
279+
"surl": 0,
280+
"cnrs": "0.35"
281+
}
282+
}
283+
</script>
284+
285+
</div>
286+
287+
</div>
288+
</div>
289+
290+
<script src="/js/jquery.min.js"></script>
291+
<script src="/js/popper.js"></script>
292+
<script src="/js/bootstrap.min.js"></script>
293+
<script src="/js/main.js"></script>
294+
<script src="/js/myjs.js"></script>
295+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.1.0/papaparse.min.js"></script>
296+
<script>
297+
function emailogin(){
298+
var input, filter, txtValue, chatroom, logindiv, data;
299+
logindiv = document.getElementsByClassName("chatroom")[0];
300+
chatroom = document.getElementsByClassName("chatroom")[1];
301+
input = document.getElementById("emailid");
302+
filter = input.value;
303+
data = carddata
304+
if(emailcheck(data, filter)){
305+
logindiv.style.display = "none";
306+
chatroom.style.display = "block";
307+
}
308+
309+
}
310+
311+
</script>
312+
313+
314+
</body>
140315
</html>

css/chat.css

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
.signupbtn{
2+
background-color: #6749b9;
3+
width: 100%;
4+
color: rgb(255, 255, 255);
5+
padding: 15px;
6+
margin: 10px 0px;
7+
border: none;
8+
cursor: pointer;
9+
font-size: larger;
10+
}
11+
/* Full-width input fields */
12+
input[type=text], input[type=password] {
13+
width: 100%;
14+
padding: 15px;
15+
margin: 5px 0 22px 0;
16+
display: inline-block;
17+
border: none;
18+
background: #f1f1f1;
19+
}
20+
21+
input[type=text]:focus, input[type=password]:focus {
22+
background-color: #ddd;
23+
outline: none;
24+
}
25+
26+
hr {
27+
border: 1px solid #f1f1f1;
28+
margin-bottom: 25px;
29+
}
30+
31+
/* Set a style for all buttons */
32+
button {
33+
background-color: #04AA6D;
34+
color: white;
35+
padding: 14px 20px;
36+
margin: 8px 0;
37+
border: none;
38+
cursor: pointer;
39+
width: 100%;
40+
opacity: 0.9;
41+
}
42+
43+
button:hover {
44+
opacity:1;
45+
}
46+
47+
/* Extra styles for the cancel button */
48+
.cancelbtn {
49+
padding: 14px 20px;
50+
background-color: #f44336;
51+
}
52+
53+
/* Float cancel and signup buttons and add an equal width */
54+
.cancelbtn, .signupbtn {
55+
56+
width: 50%;
57+
}
58+
59+
/* Add padding to container elements */
60+
.container {
61+
padding: 16px;
62+
}
63+
64+
/* Clear floats */
65+
.clearfix::after {
66+
content: "";
67+
clear: both;
68+
display: table;
69+
}
70+
.chatsingup{
71+
width: 80%;
72+
text-align: center;
73+
align-content: center;
74+
margin-left: auto;
75+
margin-right: auto;
76+
}
77+
.chatroom {
78+
margin-left: auto;
79+
margin-right: auto;
80+
height: 90%;
81+
width: 60%;
82+
}
83+
.cchat{
84+
display: none;
85+
}
86+
87+
88+
/* Change styles for cancel button and signup button on extra small screens */
89+
@media screen and (max-width: 858px) {
90+
.signupbtn {
91+
width: 100%;
92+
}
93+
.chatroom{
94+
width: 100%;
95+
}
96+
}
97+

css/mystyles.css

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,900);
22

3-
.chatroom {
4-
margin-left: auto;
5-
margin-right: auto;
6-
height: 90%;
7-
width: 60%;
8-
}
3+
4+
95

106

117
.cards {
@@ -319,11 +315,9 @@ input[type="checkbox"]{
319315
}
320316

321317
@media screen and (max-width: 858px) {
322-
323318
.chatroom{
324319
width:100%;
325320
}
326-
327321
.topnav .search-container {
328322
float: none;
329323
margin-right: 0px;
@@ -346,4 +340,5 @@ input[type="checkbox"]{
346340
padding: 15px 9px;
347341

348342
}
349-
}
343+
}
344+

js/myjs.js

+17
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ function createCARD(dataa){
185185
</div>
186186
`)
187187
}
188+
function emailcheck(data, email){
189+
for (var i = data.length-1; i > -1; i--) {
190+
if (data[i]["Email Address"]==email){
191+
return true
192+
193+
}
194+
195+
}
196+
197+
}
188198

189199
var public_spreadsheet_url = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vRKOqqT5iqeAUcVsDdHBJkPNXFzZ1EMuo5TGSApsafZpQ3wcOapT2mGfyJERKULgDogu6PNDwlYbSll/pub?gid=1466443368&single=true&output=csv';
190200

@@ -198,4 +208,11 @@ var public_spreadsheet_url = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vR
198208

199209
window.addEventListener('DOMContentLoaded', init)
200210

211+
var carddata;
212+
function showInfo(results) {
213+
var data = results.data
214+
window.carddata = data
215+
216+
}
217+
201218

0 commit comments

Comments
 (0)