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
19 changes: 17 additions & 2 deletions views/partials/footer.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
</main>
<footer class="bg-terminal-accent p-4 w-full">
<div class="flex justify-between items-center text-terminal-light-gray font-mono">
<div class="footer-flex flex justify-between items-center text-terminal-light-gray font-mono">
<p>&copy; <%= new Date().getFullYear() %> Social Stuff. All rights reserved.</p>
<div class="flex space-x-4">
<div class="footer-items flex space-x-4">
<div class="flex items-center space-x-2">
<label for="horn-mode" class="text-terminal-light-gray font-mono">HORN MODE</label>
<input type="checkbox" id="horn-mode" class="toggle-checkbox">
Expand All @@ -11,6 +11,21 @@
<p>VERSION 0.0.1</p>
</div>
</div>
<style>
@media (max-width: 700px) {
.footer-flex {
flex-direction: column !important;
align-items: flex-start !important;
gap: 1rem;
}
.footer-items {
flex-direction: column !important;
align-items: flex-start !important;
gap: 0.5rem;
width: 100%;
}
}
</style>
</footer>
</body>

Expand Down
66 changes: 63 additions & 3 deletions views/partials/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,79 @@

<body class="bg-terminal-blue-gray text-terminal-light-gray font-retro">
<header class="bg-terminal-accent p-4 fixed top-0 left-0 w-full z-10">
<nav class="flex justify-between items-center">
<nav class="flex justify-between items-center relative">
<h1 class="text-terminal-green">SOCIAL CIRCLE</h1>
<ul class="flex space-x-4 list-none m-0 p-0">
<button class="hamburger" id="hamburger-btn" aria-label="Toggle navigation" style="display:none;">
<span style="display:block;width:25px;height:3px;margin:5px 0;background:#b2f2bb;border-radius:2px;"></span>
<span style="display:block;width:25px;height:3px;margin:5px 0;background:#b2f2bb;border-radius:2px;"></span>
<span style="display:block;width:25px;height:3px;margin:5px 0;background:#b2f2bb;border-radius:2px;"></span>
</button>
<ul class="flex space-x-4 list-none m-0 p-0 nav-links" id="nav-links">
<li><a href="/" class="text-terminal-light-gray no-underline hover:underline">HOME</a></li>
<% if (locals.isLoggedIn) { %>
<li><a href="/profile" class="text-terminal-light-gray no-underline hover:underline">PROFILE</a></li>
<li><a href="/logout" class="text-terminal-light-gray no-underline hover:underline">LOGOUT</a></li>
<% } else { %>
<li><a href="/login" class="text-terminal-light-gray no-underline hover:underline">LOGIN</a></li>
<li><a href="/login" class="text-terminal-light-gray no-underline hover:underline">LOGIN</a></li>
<% } %>
<li><a href="/characters" class="text-terminal-light-gray no-underline hover:underline">CHARACTERS</a></li>
<li><a href="/leaderboard" class="text-terminal-light-gray no-underline hover:underline">LEADERBOARD</a></li>
</ul>
</nav>
<style>
@media (max-width: 768px) {
.nav-links {
display: none;
flex-direction: column;
background: var(--terminal-accent, #222);
position: absolute;
top: 64px;
right: 0;
width: 100%;
z-index: 20;
}
.nav-links.open {
display: flex;
}
.hamburger {
display: block !important;
background: none;
border: none;
cursor: pointer;
padding: 8px;
}
}
@media (min-width: 769px) {
.hamburger {
display: none !important;
}
.nav-links {
display: flex !important;
position: static;
flex-direction: row;
background: none;
}
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
const hamburger = document.getElementById('hamburger-btn');
const navLinks = document.getElementById('nav-links');
function checkWidth() {
if (window.innerWidth <= 768) {
hamburger.style.display = 'block';
navLinks.classList.remove('open');
} else {
hamburger.style.display = 'none';
navLinks.classList.remove('open');
}
}
hamburger.addEventListener('click', function () {
navLinks.classList.toggle('open');
});
window.addEventListener('resize', checkWidth);
checkWidth();
});
</script>
</header>
<main class="pt-16">