Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
stirlhoss committed Sep 26, 2024
1 parent 98bdabe commit d6229f4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/components/Navigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
<a href="/about"> About </a>
<div class="nav-seperator">|</div>
<a href="/blog"> Blog </a>
<div class="nav-seperator">|</div>
<a href="/tutorials"> Tutorials </a>
<div class="nav-seperator">|</div>
<a href="/docs"> Docs </a>
</div>
12 changes: 12 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ import Card from '../components/Card.astro';
title="Community"
body="Join our Discord and help with the development."
/>
<Card
href="/tutorials"
title="Getting Started"
body="Check out some tutorials and write your first language!"
/>
<Card
href="/docs"
title="Documentation"
body="Read the docs."
/>
</ul>
</main>
</Layout>
Expand Down Expand Up @@ -59,5 +69,7 @@ import Card from '../components/Card.astro';
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
gap: 2rem;
padding: 0;
max-width: 800px;
margin: auto;
}
</style>
11 changes: 8 additions & 3 deletions src/scripts/menu.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
document.querySelector('.hamburger').addEventListener('click', () => {
document.querySelector('.nav-links').classList.toggle('expanded');
});
document.querySelector(".hamburger").addEventListener("click", () => {
document.querySelector(".nav-links").classList.toggle("expanded");

let seperators = document.querySelectorAll(".nav-seperator");
for (let seperator of seperators) {
seperator.classList.toggle("nav-seperator-expanded");
}
});
9 changes: 7 additions & 2 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@
color: var(--accent-text);
}

.nav-links a:hover, a:focus {
.nav-links a:hover,
a:focus {
text-decoration: underline;
}

.expanded {
display: unset;
}

.nav-seperator-expanded {
display: none;
}

@media screen and (min-width: 636px) {
.nav-links {
display: inline-flex;
Expand All @@ -59,4 +64,4 @@
font-size: 40px;
font-weight: 200;
}
}
}

0 comments on commit d6229f4

Please sign in to comment.