-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmyHome.html
143 lines (116 loc) · 3.86 KB
/
myHome.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
<!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">
<link rel="stylesheet" href="my.css">
<!----===== Library ===== -->
<link href='https://unpkg.com/[email protected]/css/boxicons.min.css' rel='stylesheet'>
<title>Game Verse</title>
<script>
function switchpg(obj) {
document.getElementById('containeriframe').src = ('HTML/' + obj)
}
</script>
</head>
<body>
<nav class="sidebar close">
<header>
<div class="image-text">
<span class="image">
<img src="gamesImg/Logo.png" style="height: 10vh; width: 6.7vw;" alt="">
</span>
<div class="text logo-text">
<span class="name">Gaming Verse</span>
</div>
</div>
<i class='bx bx-chevron-right toggle'></i>
</header>
<div class="menu-bar">
<div class="menu">
<ul class="menu-links">
<li class="nav-link">
<a onclick="switchpg('home.html')">
<i class='bx bx-home-alt icon'></i>
<span class="text nav-text" style="cursor: pointer;">Home</span>
</a>
</li>
<li class="nav-link">
<a onclick="switchpg('Thrilling.html')">
<span class="text nav-text" style="cursor: pointer;">Thrilling</span>
</a>
</li>
<li class="nav-link">
<a onclick="switchpg('Shooting.html')">
<span class="text nav-text" style="cursor: pointer;">Shooting</span>
</a>
</li>
<li class="nav-link">
<a onclick="switchpg('Racing.html')">
<span class="text nav-text" style="cursor: pointer;">Racing</span>
</a>
</li>
<li class="nav-link">
<a onclick="switchpg('Strategic.html')">
<span class="text nav-text" style="cursor: pointer;">Strategic</span>
</a>
</li>
<li class="nav-link">
<a onclick="switchpg('Sports.html')">
<span class="text nav-text" style="cursor: pointer;">Sports</span>
</a>
</li>
</ul>
</div>
<div class="bottom-content">
<li class="">
<a onclick="switchpg('aboutus.html')">
<span class="text nav-text" style="cursor: pointer;">About Us</span>
</a>
</li>
<li class="">
<a onclick="switchpg('reportlink.html')">
<span class="text nav-text" style="cursor: pointer;">Report</span>
</a>
</li>
<li class="mode">
<div class="sun-moon">
<i class='bx bx-moon icon moon'></i>
<i class='bx bx-sun icon sun'></i>
</div>
<span class="mode-text text">Dark mode</span>
<div class="toggle-switch">
<span class="switch"></span>
</div>
</li>
</div>
</div>
</nav>
<script>
const
body = document.querySelector('body'),
sidebar = body.querySelector('nav'),
toggle = body.querySelector(".toggle"),
modeSwitch = body.querySelector(".toggle-switch"),
modeText = body.querySelector(".mode-text");
toggle.addEventListener("click", () => {
sidebar.classList.toggle("close");
})
modeSwitch.addEventListener("click", () => {
body.classList.toggle("dark");
if (body.classList.contains("dark")) {
modeText.innerText = "Light mode";
} else {
modeText.innerText = "Dark mode";
// document.getElementById('containeriframe') = "Dark mode";
}
});
</script>
<iframe id="containeriframe" src="HTML/home.html" style="height: 98vh; width: 100vw;"></iframe>
<div style="padding-left: 20vw;">
<h4>GAME VERSE© All Rights Reserved
</h4>
</div>
</body>
</html>