2022-08-06 18:34:03 +05:30
|
|
|
<script lang="ts">
|
2022-07-27 22:20:48 +05:30
|
|
|
import IconBars from "~icons/fa6-solid/bars";
|
2022-08-04 21:20:02 +05:30
|
|
|
import IconMatrix from "~icons/simple-icons/matrix";
|
|
|
|
import IconGitHub from "~icons/simple-icons/github";
|
2022-08-06 13:26:25 +05:30
|
|
|
import ThemeToggle from "./ThemeToggle.svelte";
|
2022-08-06 18:34:03 +05:30
|
|
|
import { page } from "$app/stores";
|
|
|
|
|
|
|
|
$: currentPage = $page.url.pathname;
|
|
|
|
|
|
|
|
const menus = [
|
|
|
|
{name: "Instances", url: "https://instances.projectsegfau.lt/"},
|
|
|
|
{name: "Minecraft", url: "/minecraft"},
|
|
|
|
{name: "Donate", url: "/donate"},
|
|
|
|
{name: "FAQ", url: "/faq"},
|
|
|
|
{name: "Contact us", url: "/contact"},
|
|
|
|
{name: "Our team", url: "/team"},
|
|
|
|
{name: "Timeline", url: "/timeline"},
|
|
|
|
{name: "Blog", url: "https://blog.projectsegfau.lt/"},
|
|
|
|
{name: "Legal", url: "/legal"},
|
|
|
|
{name: "Status", url: "https://status.projectsegfau.lt/"},
|
|
|
|
]
|
2022-07-27 22:15:53 +05:30
|
|
|
</script>
|
|
|
|
|
2022-06-18 00:22:07 +05:30
|
|
|
<nav>
|
2022-06-18 21:56:58 +05:30
|
|
|
<a class="brand" href="/">
|
2022-07-03 01:23:41 +05:30
|
|
|
<img src="/logo.png" alt="Project Segfault logo" />
|
2022-08-04 20:00:24 +05:30
|
|
|
<span>Project Segfault</span>
|
2022-06-18 21:56:58 +05:30
|
|
|
</a>
|
2022-07-27 22:20:48 +05:30
|
|
|
|
|
|
|
<input type="checkbox" id="toggle-menu" />
|
2022-07-27 22:15:53 +05:30
|
|
|
<label class="menu-icon" for="toggle-menu">
|
2022-07-28 18:52:11 +05:30
|
|
|
<div id="menu-icon">
|
2022-07-27 22:15:53 +05:30
|
|
|
<IconBars />
|
2022-07-28 18:52:11 +05:30
|
|
|
</div>
|
2022-07-27 22:15:53 +05:30
|
|
|
</label>
|
2022-07-27 22:20:48 +05:30
|
|
|
|
2022-06-18 21:56:58 +05:30
|
|
|
<div class="links">
|
2022-08-06 18:34:03 +05:30
|
|
|
{#each menus as { url, name }}
|
|
|
|
<a sveltekit:prefetch class:active={url !== "/" ? currentPage.match(url) : url === currentPage} href={url}>{name}</a>
|
|
|
|
{/each}
|
2022-08-04 21:20:02 +05:30
|
|
|
<a href="https://matrix.to/#/#project-segfault:projectsegfau.lt/">
|
|
|
|
<IconMatrix />
|
|
|
|
</a>
|
|
|
|
<a href="https://github.com/ProjectSegfault/">
|
|
|
|
<IconGitHub />
|
|
|
|
</a>
|
2022-08-06 13:26:25 +05:30
|
|
|
<div>
|
|
|
|
<ThemeToggle />
|
|
|
|
</div>
|
2022-07-27 22:20:48 +05:30
|
|
|
</div>
|
2022-06-18 00:22:07 +05:30
|
|
|
</nav>
|
|
|
|
|
|
|
|
<style>
|
2022-06-18 21:56:58 +05:30
|
|
|
nav {
|
2022-08-04 20:00:24 +05:30
|
|
|
background-color: var(--primary);
|
|
|
|
border-bottom: 1px solid var(--grey);
|
2022-06-18 21:56:58 +05:30
|
|
|
display: flex;
|
2022-08-05 19:31:15 +05:30
|
|
|
padding: 0.5rem;
|
2022-06-18 21:56:58 +05:30
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
a.brand {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
text-decoration: none;
|
2022-08-04 20:00:24 +05:30
|
|
|
color: var(--text);
|
|
|
|
gap: 8px;
|
2022-08-05 19:31:15 +05:30
|
|
|
transition: opacity 0.25s;
|
2022-08-04 20:00:24 +05:30
|
|
|
}
|
|
|
|
|
2022-08-06 18:34:03 +05:30
|
|
|
a.active {
|
|
|
|
color: var(--accent);
|
|
|
|
}
|
|
|
|
|
2022-08-04 20:00:24 +05:30
|
|
|
a.brand:hover {
|
2022-08-05 19:31:15 +05:30
|
|
|
opacity: 0.6;
|
2022-06-18 21:56:58 +05:30
|
|
|
}
|
2022-07-27 22:20:48 +05:30
|
|
|
|
2022-07-27 22:15:53 +05:30
|
|
|
.links {
|
|
|
|
display: flex;
|
2022-07-27 22:20:48 +05:30
|
|
|
gap: 0.5rem;
|
2022-07-27 22:15:53 +05:30
|
|
|
}
|
2022-06-18 00:22:07 +05:30
|
|
|
|
2022-06-18 21:56:58 +05:30
|
|
|
.links > * {
|
2022-08-05 19:31:15 +05:30
|
|
|
padding: 0.5rem;
|
2022-06-18 21:56:58 +05:30
|
|
|
cursor: pointer;
|
|
|
|
color: var(--text);
|
|
|
|
text-decoration: none;
|
2022-08-05 19:31:15 +05:30
|
|
|
transition: color 0.25s;
|
2022-08-04 20:00:24 +05:30
|
|
|
font-size: 13px;
|
|
|
|
font-weight: 500;
|
2022-08-04 21:20:02 +05:30
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2022-06-18 21:56:58 +05:30
|
|
|
}
|
2022-06-18 11:15:20 +05:30
|
|
|
|
2022-06-18 21:56:58 +05:30
|
|
|
.links > *:hover {
|
|
|
|
text-decoration: none;
|
2022-08-06 18:34:03 +05:30
|
|
|
color: var(--accent);
|
2022-06-18 21:56:58 +05:30
|
|
|
}
|
2022-06-18 14:47:19 +05:30
|
|
|
|
2022-06-18 21:56:58 +05:30
|
|
|
img {
|
2022-08-04 20:00:24 +05:30
|
|
|
height: 30px;
|
2022-06-18 21:56:58 +05:30
|
|
|
border-radius: 50%;
|
|
|
|
}
|
2022-06-18 00:22:07 +05:30
|
|
|
|
2022-07-27 22:15:53 +05:30
|
|
|
.menu-icon {
|
|
|
|
cursor: pointer;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#toggle-menu {
|
|
|
|
display: none;
|
2022-06-18 21:56:58 +05:30
|
|
|
}
|
2022-06-18 00:22:07 +05:30
|
|
|
|
2022-08-06 22:06:00 +05:30
|
|
|
@media screen and (max-width: 984px) {
|
2022-07-27 22:15:53 +05:30
|
|
|
.links {
|
|
|
|
display: none;
|
|
|
|
width: 100%;
|
2022-08-04 20:00:24 +05:30
|
|
|
padding-top: 12px;
|
2022-07-27 22:15:53 +05:30
|
|
|
}
|
|
|
|
|
2022-06-18 21:56:58 +05:30
|
|
|
nav {
|
2022-07-27 22:15:53 +05:30
|
|
|
display: flex;
|
2022-06-18 21:56:58 +05:30
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-start;
|
|
|
|
}
|
2022-06-18 00:22:07 +05:30
|
|
|
|
2022-07-27 22:15:53 +05:30
|
|
|
.links a {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.menu-icon {
|
2022-08-04 20:00:24 +05:30
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2022-07-27 22:15:53 +05:30
|
|
|
z-index: 1;
|
|
|
|
position: absolute;
|
|
|
|
right: 1rem;
|
2022-08-05 19:31:15 +05:30
|
|
|
top: 0.5rem;
|
2022-07-27 22:15:53 +05:30
|
|
|
border: none;
|
|
|
|
border-radius: 10px;
|
2022-08-04 20:00:24 +05:30
|
|
|
height: 30px;
|
|
|
|
width: 30px;
|
2022-07-27 22:15:53 +05:30
|
|
|
cursor: pointer;
|
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#menu-icon {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
color: var(--text);
|
|
|
|
}
|
|
|
|
|
|
|
|
#toggle-menu:checked ~ .links {
|
|
|
|
display: flex;
|
2022-06-18 21:56:58 +05:30
|
|
|
flex-direction: column;
|
2022-07-27 22:15:53 +05:30
|
|
|
gap: 1rem;
|
2022-06-18 21:56:58 +05:30
|
|
|
}
|
|
|
|
}
|
2022-07-27 22:20:48 +05:30
|
|
|
</style>
|