Skip to content

Commit fd18dff

Browse files
author
Finnegan Cappelli
committed
add hamburger menu for mobile; resize favicon; change comp date
1 parent fb31f4a commit fd18dff

File tree

6 files changed

+178
-9
lines changed

6 files changed

+178
-9
lines changed

assets/css/styles.css

+69
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/styles.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/styles.scss

+77
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,12 @@ ul {
185185
justify-content: space-between;
186186
align-items: center;
187187

188+
188189
.navigation-links {
189190
display: flex;
190191
gap: 1.5em;
191192
font-size: 1.25rem;
193+
top: 0px;
192194
> a {
193195
&:hover {
194196
color: #e69138;
@@ -197,9 +199,84 @@ ul {
197199
}
198200
}
199201

202+
.navigation-menu {
203+
display: flex;
204+
justify-content: space-between;
205+
align-items: center;
206+
gap: 1.5em;
207+
font-size: 1.25em;
208+
.navigation-link {
209+
transition: 0.3s ease;
210+
&:hover {
211+
color: #e69138;
212+
}
213+
}
214+
}
215+
216+
.hamburger {
217+
display: none;
218+
cursor: pointer;
219+
}
220+
221+
.bar {
222+
display: block;
223+
width: 25px;
224+
height: 3px;
225+
margin: 5px auto;
226+
-webkit-transition: all 0.3s ease-in-out;
227+
transition: all 0.3s ease-in-out;
228+
background-color: var(--link);
229+
}
230+
231+
@media(max-width:768px) {
232+
.hamburger {
233+
display: block;
234+
z-index: 1;
235+
}
236+
237+
.hamburger.active .bar:nth-child(2) {
238+
opacity: 0;
239+
}
240+
.hamburger.active .bar:nth-child(1) {
241+
transform: translateY(8px) rotate(45deg);
242+
}
243+
.hamburger.active .bar:nth-child(3) {
244+
transform: translateY(-8px) rotate(-45deg);
245+
}
246+
247+
.navigation {
248+
position: relative;
249+
top: 0px;
250+
//overflow: hidden;
251+
}
252+
253+
.navigation-menu {
254+
position: fixed;
255+
right: -100%;
256+
top: 0px;
257+
gap: 0;
258+
margin: 0px;
259+
flex-direction: column;
260+
background: rgba(0,0,0,70%);
261+
width: 100%;
262+
height: 30%;
263+
text-align: center;
264+
transition: 0.5s;
265+
}
266+
267+
.navigation-item {
268+
margin: 16px 0;
269+
}
270+
271+
.navigation-menu.active {
272+
right: 0;
273+
}
274+
}
275+
200276
.onpagelogo {
201277
width: 120px;
202278
height: auto;
279+
z-index: 99;
203280
}
204281

205282
.main-container {

assets/images/favicon.ico

18.6 KB
Binary file not shown.

assets/scripts/hamburger.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const hamburger = document.querySelector(".hamburger");
2+
const navMenu = document.querySelector(".navigation-menu");
3+
4+
hamburger.addEventListener("click", () => {
5+
hamburger.classList.toggle("active");
6+
navMenu.classList.toggle("active");
7+
})

index.html

+24-8
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>RITSEC CTF</title>
7+
78
<link rel="stylesheet" href="/assets/css/styles.css">
8-
<link rel="icon" type="image/png" href="/assets/images/logo192.png">
9+
<link rel="icon" type="image/png" href="/assets/images/favicon.ico">
10+
911
<link rel="preconnect" href="https://fonts.googleapis.com">
1012
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1113
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
@@ -15,17 +17,30 @@
1517
<div class="background-container">
1618
<nav class="navigation">
1719
<img src="/assets/images/logo192.png" alt="RITSEC logo." class="onpagelogo">
18-
<div class="navigation-links">
19-
<a href="https://www.ritsec.club/">Home</a>
20-
<a href="https://discord.gg/aNP8BupNmg">CTF Discord</a>
21-
<a>Register</a>
22-
<a href="https://ctftime.org/ctf/170">CTFTime</a>
20+
<ul class="navigation-menu">
21+
<li class="navigation-item">
22+
<a href="https://www.ritsec.club/" class="navigation-link">Home</a>
23+
</li>
24+
<li class="navigation-item">
25+
<a href="https://discord.gg/aNP8BupNmg" class="navigation-link">CTF Discord</a>
26+
</li>
27+
<li class="navigation-item">
28+
<a class="navigation-link">Register</a>
29+
</li>
30+
<li class="navigation-item">
31+
<a href="https://ctftime.org/ctf/170" class="navigation-link">CTFTime</a>
32+
</li>
33+
</ul>
34+
<div class="hamburger">
35+
<span class="bar"></span>
36+
<span class="bar"></span>
37+
<span class="bar"></span>
2338
</div>
2439
</nav>
2540
<div class="main-container">
2641
<img src="assets/images/temp-logo-2025.png" alt="temporary placeholder for 2025 logo." class="logo25">
2742
<h1>RITSEC CTF 2025:</h1>
28-
<h6>Friday March 28th 12:00 - Sunday March 30th 12:00 EST</h6>
43+
<h6>Friday March 21st 16:00 - Sunday March 23rd 16:00 EST</h6>
2944
<div class="sections">
3045
<section class="about">
3146
<h4>About</h4>
@@ -37,7 +52,7 @@ <h4>Registration</h4>
3752
</section>
3853
<div class="subsections-row-one">
3954
<section class="theme-description">
40-
<h4>Description</h4>
55+
<h4>Theme</h4>
4156
<p>This is an emergency declaration public service announcement warning all humans. We have just received an encrypted message from the giant floating <strong>Alien</strong> ship hovering above Rochester, NY. We captured it here:</p>
4257
<div class="alien-message">
4358
<p>Jz!</p>
@@ -272,5 +287,6 @@ <h6>Educational</h6>
272287
</a>
273288
</div>
274289
</footer>
290+
<script type="text/javascript" src="/assets/scripts/hamburger.js"></script>
275291
</body>
276292
</html>

0 commit comments

Comments
 (0)