Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion assets/js/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
var data = {
upcoming: {
name: "Hackomania 2026",
link: "https://hackomania.geekshacking.com/"
link: "https://hackomania.geekshacking.com/",
registrationCloseDate: "2026-03-06T23:59:59+08:00",
endDate: "2026-03-08T13:00:00+08:00"
},

video: "https://www.youtube.com/embed/q25_dTLryaQ",
Expand Down Expand Up @@ -171,7 +173,9 @@ var featuredContent = document.getElementsByClassName("mu-header-featured-conten
var featuredHeader = featuredContent.getElementsByTagName("h1")[0].getElementsByTagName("span")[0];
var featuredDescription = featuredContent.getElementsByTagName("p")[0];

var registerContainer = document.getElementsByClassName("mu-header-cta")[0];
var registerButton = document.getElementsByClassName("mu-apple-btn")[0];
var registerButtonText = registerButton.getElementsByTagName("span")[0];
registerButton.href = data.upcoming.link;

var pastEvents = document.getElementById("mu-apps-screenshot");
Expand All @@ -191,6 +195,13 @@ for (var index in data.events) {
featuredThumbnail.src = src;
featuredHeader.innerText = name;
featuredDescription.innerText = event.description;
if (data.upcoming.endDate && new Date() > new Date(data.upcoming.endDate)) {
registerContainer.innerText = "Event has concluded!";
registerButtonText.innerText = "View Info";
} else if (data.upcoming.registrationCloseDate && new Date() > new Date(data.upcoming.registrationCloseDate)) {
registerContainer.innerText = "Registration Closed!";
registerButtonText.innerText = "Find Out More";
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ <h2 class="mu-title">GeeksHacking Community</h2>
<h1><span>Event name</span></h1>
<p>(Event Description)</p>

<div class="mu-app-download-area">
<h4>Interested?</h4>
<div class="mu-header-cta-area">
<h4 class="mu-header-cta">Interested?</h4>
<a class="mu-apple-btn" href="#">
<span>Register</span>
</a>
Expand Down Expand Up @@ -564,4 +564,4 @@ <h2 class="mu-title">JOIN US</h2>

</body>

</html>
</html>
6 changes: 3 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@ button:focus {
color: white;
}

.mu-app-download-area {
.mu-header-cta-area {
display: inline;
float: left;
margin-top: 50px;
width: 100%;
}

.mu-app-download-area h4 {
.mu-header-cta-area h4 {
color: white;
font-size: 18px;
font-weight: 300;
Expand Down Expand Up @@ -1329,7 +1329,7 @@ button:focus {
font-size: 35px;
}

.mu-app-download-area {
.mu-header-cta-area {
margin-top: 20px;
}

Expand Down