-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
104 lines (95 loc) · 3.7 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="icon" href="favicon.ico">
<title> Tech Home Page </title>
</head>
<body onload="preloaderFunc()">
<div id="regForm">
<form id="register">
<input type="text" id="fname" name="firstname" placeholder="Your name.." required>
<input type="text" id="lname" name="lastname" placeholder="Your last name.." required>
<input type="email" id="email" name="email" placeholder="Your email .." required>
<input type="password" id="password" name="password" placeholder="Your password.." required>
<input type="password" id="passwordConfirm" name="passwordConfirm" placeholder="Confirm your password.." required>
<input type="submit" id="regSubmit" name="regSubmit" value="Register">
</form>
</div>
<div id="logForm">
<form id="login">
<input type="email" id="email" name="email" placeholder="Your email .." required>
<input type="password" id="password" name="password" placeholder="Your password.." required>
<input type="submit" id="logSubmit" name="logSubmit" value="Login">
</form>
</div>
<div id="preloader"></div>
<video autoplay loop muted id="myVideo">
<source src="videoplayback.mp4" type="video/mp4">
</video>
<section class="colored-section" id="title">
<!-- Nav Bar -->
<div class="topnav" id="myTopnav">
<a href="#home" class="active">Home</a>
<a href="#robo">Robowars</a>
<a href="#hack">Hack the Script</a>
<a href="#hackathon">Hackathon</a>
<a href="#code">Code Recycler</a>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
<i class="fa fa-bars"></i>
</a>
</div>
<div class="authbuttons">
<div class="button" onclick="regPopup()">Register</div>
<div class="button" onclick="logPopup()">Login</div>
</div>
</section>
<script>
let preloader = document.getElementById("preloader");
function preloaderFunc() {
setTimeout(function () {
preloader.style.display = "none";
}, 2000)
}
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
function regPopup() {
var x = document.getElementById("regForm");
x.style.display = "block";
var a = document.querySelector(".authbuttons");
a.style.display = "none"
}
function logPopup() {
var y = document.getElementById("logForm");
y.style.display = "block";
var a = document.querySelector(".authbuttons");
a.style.display = "none"
}
window.addEventListener("click", e => {
if(e.path[0].id === "regForm"){
var x = document.getElementById("regForm");
x.style.display = "none";
var a = document.querySelector(".authbuttons");
a.style.display = "flex"
}
if(e.path[0].id === "logForm"){
var x = document.getElementById("logForm");
x.style.display = "none";
var a = document.querySelector(".authbuttons");
a.style.display = "flex"
}
});
</script>
</body>
</html>