-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
89 lines (72 loc) · 1.81 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
<!DOCTYPE html>
<head>
<title>p0x games V2</title>
<style>
body {
scroll-behavior: smooth;
}
.navbar {
position: sticky;
top: 0;
}
</style>
</head>
<html>
<head>
<style>
body {
background-image: url('img/bg.gif');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
</style>
</head>
<link rel="icon" href='img/logo.png' type="image/x-icon">
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/home.css">
</head>
<body>
<div class="navbar">
<a href="/">Home</a>
<a href="/games.html">Games</a>
<a href="/uv.html">Proxy</a>
<a href="/contact.html">Contact</a>
</div>
<div class="content">
<img src="img/logo.png" alt="Logo" style="width:220px;height:220px;">
<h1>Welcome to p0x games V2</h1>
<button class="start-now-button" onclick="location.href='games.html';">Start now!</button>
<h1> Games total: 84</h1>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/button.css">
</head>
<body>
<script>
document.querySelector('.navbar a').addEventListener('click', function (e) {
e.preventDefault(); // prevent default anchor behavior
var href = this.getAttribute('href');
var offsetTop = document.querySelector(href).offsetTop;
window.scrollTo({
top: offsetTop,
behavior: 'smooth'
});
});
</script>
<script>
window.onscroll = function () {
var navbar = document.getElementsByClassName('navbar')[0];
if (window.pageYOffset > 100) {
navbar.style.top = "-100px";
} else {
navbar.style.top = "0";
}
};
</script>
</body>
</html>
</div>
</body>
</html>