Skip to content
Open
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
41 changes: 41 additions & 0 deletions dojo_theme/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,47 @@ p[data-hide="true"] {
border-color: #6c757d !important;
}

.announcement {
position: fixed;
z-index: 9999;
left: 1rem;
bottom: 1rem;
max-width: 30rem;
margin-right: 1rem;
padding: 2rem;
background-color: #1a1a1a;
display: flex;
align-items: center;
justify-content: center;

border: 3px solid var(--brand-green);
border-radius: 1rem;
font-size: 1.1rem;
}

.announcement-btn-wrap {
display: flex;
justify-content: center;
column-gap: 2rem;
}

.announcement-btn {
padding: 0.5rem;
border-radius: 0.3rem;
border: 2px var(--blue) solid;
width: 100%;
}

#later-btn {
background: none;
color: var(--blue);
}

#check-it-out-btn {
background-color: var(--blue);
color: white;
}

.challenge-button {
margin-bottom: 1.5rem !important
}
Expand Down
34 changes: 34 additions & 0 deletions dojo_theme/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,39 @@
{{ current_dojo_custom_js | safe }}
</script>
{% endif %}

<div id="future-announcement" class="announcement" style="display: none">
<div class="announcement-content">
<p>Hey! We are developing a new look for our website, currently live at <a href="https://future.pwn.college">future.pwn.college</a>.</p>
<div class="announcement-btn-wrap">
<button id="check-it-out-btn" class="announcement-btn">I'll check it out</button>
<button id="later-btn" class="announcement-btn">Go away</button>
</div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
const announcement = document.getElementById("future-announcement");
const checkItOutBtn = document.getElementById("check-it-out-btn");
const laterBtn = document.getElementById("later-btn");

if (!localStorage.getItem("announcementDismissed")) {
announcement.style.display = "flex";
}

function goToFuture() {
localStorage.setItem("announcementDismissed", "true");
window.location.href = "https://future.pwn.college";
}

function dismiss() {
announcement.style.display = "none";
localStorage.setItem("announcementDismissed", "true");
}

checkItOutBtn.onclick = goToFuture;
laterBtn.onclick = dismiss;
});
</script>
</body>
</html>
Loading