-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmy-strikes.html
More file actions
206 lines (183 loc) · 5.49 KB
/
my-strikes.html
File metadata and controls
206 lines (183 loc) · 5.49 KB
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html>
<html>
<head>
<title>Strike Info | Coding Hut Website</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
overflow-x: hidden;
font-family: Sans-Serif;
margin: 0;
}
</style>
<link href='https://fonts.googleapis.com/css?family=Comfortaa' rel='stylesheet'>
<style>
body {
font-family: 'Comfortaa';font-size: 22px;
}
.dynamic-content {
display:none;
}
.menu-container {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
background: #c04d4d;
padding: 20px;
z-index: 1;
user-select: none;
box-sizing: border-box;
}
.menu-logo img {
max-height: 40px;
max-width: 100px;
flex-shrink: 0;
}
.menu-container a {
text-decoration: none;
color: #ffffff;
transition: color 0.3s ease;
}
.menu-container a:hover {
color: #50e3c2;
}
.menu ul {
list-style: none;
display: flex;
padding: 0;
margin: 0;
}
.menu li {
padding: 0 20px;
font-size: 22px;
}
/* Mobile Styles */
@media only screen and (max-width: 767px) {
.menu-container {
flex-direction: column;
align-items: flex-start;
}
.menu-logo {
margin-bottom: 10px;
}
.menu {
display: none;
width: 100%;
flex-direction: column;
}
.menu ul {
flex-direction: column;
width: 100%;
}
.menu li {
padding: 10px 0;
text-align: center;
}
/* Menu button */
.hamburger {
display: block;
font-size: 30px;
cursor: pointer;
}
}
/* Desktop Styles */
@media only screen and (min-width: 768px) {
.menu {
display: flex;
justify-content: space-between;
width: 100%;
}
.hamburger {
display: none;
}
}
</style>
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
</head>
<body>
<nav class="menu-container">
<!-- Logo -->
<a href="https://scratch-coding-hut.github.io" class="menu-logo">
<img src="https://i.postimg.cc/6qgPbyGH/temp-Image-BJ164c.avif" alt="Coding Hut Logo"/>
</a>
<!-- Menu for Mobile -->
<span class="hamburger" onclick="toggleMenu()">☰</span>
<!-- Menu Items -->
<div class="menu">
<ul>
<li><a href="https://scratch-coding-hut.github.io">Home</a></li>
<li><a href="https://scratch-coding-hut.github.io/about">About</a></li>
<li><a href="https://scratch.mit.edu/discuss/topic/652178/">Scratch Forum</a></li>
<li><a href="https://scratch-coding-hut.github.io/Wiki/sitemaplinks">Wiki | FAQ | More Links</a></li>
</ul>
<ul>
<li><a href="https://scratch-coding-hut.github.io/messages">Messages</a></li>
<li><a href="https://scratch-coding-hut.github.io/account">My Account</a></li>
</ul>
</div>
</nav>
<!-- This is the strikes information system -->
<h1>My Strikes</h1>
<!-- Default Dynamic Section -->
<div id="default-content" class="dynamic-content">
<h2>No Strike ID</h2>
Make sure you got a valid link and come back. You may also not have any strikes at this time. If that's true, keep up the good work!
</div>
<!-- Dynamic Section 1 -->
<div id="username1" class="dynamic-content">
<h2>Username 1</h2>
<h3>1 Strike</h3>
<br>
Oops! You currently have 1 Strike at Coding Hut. Look below to see your strikes.
</div>
<!-- Dynamic Section 2 -->
<div id="staff2" class="dynamic-content">
<h2>Staff2</h2>
<br>
DESCRIPTION HERE
</div>
<!-- Dynamic Section 3 -->
<div id="staff3" class="dynamic-content">
<h2>Staff3</h2>
<br>
DESCRIPTION HERE
</div>
<script>
function toggleMenu() {
var menu = document.querySelector('.menu');
menu.style.display = menu.style.display === 'flex' ? 'none' : 'flex';
}
// Parse the URL parameter
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
$(document).ready(function() {
// Give the parameter a variable name
var dynamicContent = getParameterByName('strikeid');
// Check if the URL parameter matches any of our dynamic sections
if (dynamicContent == 'username1') {
$('#username1').show();
}
// Check if the URL parameter is staff2
else if (dynamicContent == 'staff2') {
$('#staff2').show();
}
// Check if the URL parameter is staff3
else if (dynamicContent == 'staff3') {
$('#staff3').show();
}
// Check if the URL parameter is empty or not defined, display default content
else {
$('#default-content').show();
}
});
</script>
</body>
</html>