-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
144 lines (126 loc) · 7.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--this is mobile first reponsiveness-->
<title><Monster Contacts></title>
<!-- Bootstrap CSS-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<!--jquery javascript-->
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>
<!--Group Stuff-->
<link type="text/css" href="css/custom.css" rel="stylesheet">
<script type="text/javascript" src="js/app.js"></script>
<script type ="text/javascript" src="js/md5.js"></script>
<script type="text/javascript" src="js/contacts.js"></script>
<script type="text/javascript" src="js/cookie.js"></script>
<script type="text/javascript" src="js/login.js"></script>
<script type="text/javascript" src="js/modal.js"></script>
<script type="text/javascript" src="js/search.js"></script>
<!--makes modal draggable-->
<script>drag();</script>
</head>
<body>
<!-- Section -->
<section class="min-vh-100 d-flex bg-green align-items-center">
<div class="container">
<div class="row justify-content-center">
<div class="col-12 col-sm-7 col-md-6 col-lg-5 justify-content-center">
<div class="card shadow-soft border-dark p-4">
<div class="card-header text-center pb-0">
<h2 class="h4" style="font-size: 42px">Monster Contacts</h2>
</div>
<div class="card-body">
<form action="#" class="mt-4">
<!-- Form -->
<div class="form-group">
<label for="loginName">Username</label>
<div class="input-group mb-4">
<input class="form-control" id="loginName" placeholder="" type="text" aria-label="username">
</div>
</div>
<!-- End of Form -->
<div class="form-group">
<!-- Form -->
<div class="form-group">
<label for="loginPassword">Password</label>
<div class="input-group mb-4">
<input class="form-control" id="loginPassword" placeholder="" type="password" aria-label="Password" required>
</div>
<button type="button" id="loginBtn" class="btn btn-primary w-100" onclick="doLogin();">Sign in</button>
</div>
</div>
</form>
<div class="d-block d-sm-flex justify-content-center align-items-center mt-4">
<span class="font-weight-normal" id="register">
Not registered?
<button type="button" class="btn btn-link font-weight-bold d-block-append" id="createAccount" data-bs-target="#exampleModal" data-bs-toggle="modal" > Create account</button>
</span>
</div>
</div>
<div class="d-block d-sm-flex justify-content-center align-items-center">
<span class = "mb-4" id="loginResult"></span>
<span class = "mb-4" id="registerResult"></span>
<span class = "mb-4" id="registerSuccess"></span>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Modals -->
<div class="modal fade" class="ui-widget-content" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header bg-green border-dark">
<h5 class="modal-title" id="exampleModalLabel">Registration</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body bg-green">
<label class="modalLabel" for="editName">First Name</label>
<input type="text" class = "form-control w-50" id="first_name" onfocus="this.placeholder=''" onblur="this.placeholder='First Name'" placeholder="First Name" value="">
<label class="modalLabel"for="editName">Last Name</label>
<input type="text" class = "form-control w-50" id="last_name" onfocus="this.placeholder=''" onblur="this.placeholder='Last Name'" placeholder="Last Name" value="">
<label class="modalLabel"for="editName">Username</label>
<input type="text" class = "form-control w-50" id="reg_login" onfocus="this.placeholder=''" onblur="this.placeholder='Login'" placeholder="Login" value="">
<label class="modalLabel"for="editName">Password</label>
<input type="text" class = "form-control w-50" id="reg_password" onfocus="this.placeholder=''" onblur="this.placeholder='Password'" placeholder="Password" value="">
</div>
<div class="modal-footer bg-green border-dark">
<button type="button" class="btn btn-primary" onclick="doRegister();" data-bs-dismiss="modal" >Submit</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!--Bootstrap 5-->
<!--bootstrap javascript sourceS-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous">
</script>
<!--this listens for when we press enter on login, disables refresh, logs in instead, needs to be at bottom-->
<script>
let input = document.getElementById("loginName");
let input2 = document.getElementById("loginPassword");
input.addEventListener("keypress", function(event)
{
if (event.key === "Enter")
{
event.preventDefault();
document.getElementById("loginBtn").click();
}
});
input2.addEventListener("keypress", function(event)
{
if (event.key === "Enter")
{
event.preventDefault();
document.getElementById("loginBtn").click();
}
});
</script>
</body>
</html>