fix colours and add current page highlight on nav

This commit is contained in:
Akis 2022-08-06 16:04:03 +03:00
parent efbc2d935d
commit 2c49e8dc41
Signed by untrusted user: akis
GPG Key ID: 267BF5C6677944ED
11 changed files with 45 additions and 44 deletions

View File

@ -104,7 +104,7 @@
border-radius: 10px; border-radius: 10px;
border: none; border: none;
padding: 0.5rem; padding: 0.5rem;
font-family: "Comfortaa", sans-serif; font-family: var(--font-primary);
outline: none; outline: none;
} }
@ -120,7 +120,7 @@
} }
.button:not(select):hover { .button:not(select):hover {
background-color: var(--accent-tertiary); background-color: var(--accent);
text-decoration: none; text-decoration: none;
transition: all 0.5s; transition: all 0.5s;
color: var(--secondary); color: var(--secondary);

View File

@ -61,7 +61,7 @@
img { img {
width: 270px; width: 270px;
background: var(--accent-primary); background: var(--accent);
padding: 0.5rem; padding: 0.5rem;
border-radius: 10px; border-radius: 10px;
} }

View File

@ -20,7 +20,6 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-family: var(--font-header);
} }
.hero > * { .hero > * {
@ -31,12 +30,12 @@
p { p {
font-size: 30px; font-size: 30px;
color: #b6b6b6; color: var(--text);
} }
h1 { h1 {
font-size: 50px; font-size: 50px;
font-weight: 800; font-weight: 800;
color: var(--accent-primary); color: var(--accent);
} }
</style> </style>

View File

@ -1,8 +1,24 @@
<script> <script lang="ts">
import IconBars from "~icons/fa6-solid/bars"; import IconBars from "~icons/fa6-solid/bars";
import IconMatrix from "~icons/simple-icons/matrix"; import IconMatrix from "~icons/simple-icons/matrix";
import IconGitHub from "~icons/simple-icons/github"; import IconGitHub from "~icons/simple-icons/github";
import ThemeToggle from "./ThemeToggle.svelte"; import ThemeToggle from "./ThemeToggle.svelte";
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/"},
]
</script> </script>
<nav> <nav>
@ -19,16 +35,9 @@
</label> </label>
<div class="links"> <div class="links">
<a href="https://instances.projectsegfau.lt/">Instances</a> {#each menus as { url, name }}
<a href="/minecraft">Minecraft</a> <a sveltekit:prefetch class:active={url !== "/" ? currentPage.match(url) : url === currentPage} href={url}>{name}</a>
<a href="/donate">Donate</a> {/each}
<a href="/faq">FAQ</a>
<a href="/contact">Contact us</a>
<a href="/team">Our team</a>
<a href="/timeline">Timeline</a>
<a href="https://blog.projectsegfau.lt/">Blog</a>
<a href="/legal">Legal</a>
<a href="https://status.projectsegfau.lt/">Status</a>
<a href="https://matrix.to/#/#project-segfault:projectsegfau.lt/"> <a href="https://matrix.to/#/#project-segfault:projectsegfau.lt/">
<IconMatrix /> <IconMatrix />
</a> </a>
@ -60,6 +69,10 @@
transition: opacity 0.25s; transition: opacity 0.25s;
} }
a.active {
color: var(--accent);
}
a.brand:hover { a.brand:hover {
opacity: 0.6; opacity: 0.6;
} }
@ -83,7 +96,7 @@
.links > *:hover { .links > *:hover {
text-decoration: none; text-decoration: none;
color: var(--accent-primary); color: var(--accent);
} }
img { img {

View File

@ -1,15 +1,3 @@
@font-face {
font-family: Comfortaa;
src: url("/Comfortaa.ttf");
font-display: swap;
}
@font-face {
font-family: Inter;
src: url("/Inter.ttf");
font-display: swap;
}
@font-face { @font-face {
font-family: Raleway; font-family: Raleway;
src: url("/Raleway.ttf"); src: url("/Raleway.ttf");
@ -17,8 +5,7 @@
} }
html { html {
--accent-primary: #b59bd8; --accent: #b59bd8;
--accent-secondary: #b59bd8;
--accent-translucent: #b59bd898; --accent-translucent: #b59bd898;
--font-primary: Raleway; --font-primary: Raleway;
--font-header: Raleway; --font-header: Raleway;
@ -34,10 +21,11 @@ html.dark {
html.light { html.light {
--primary: #dddddd; --primary: #dddddd;
--secondary: #bbbbbb; --secondary: #f9f3f3;
--tertiary: #939393; --tertiary: #939393;
--text: #1f1f1f; --text: #444444;
--grey: #292929; --grey: #444444;
--accent: #8c68bb;
} }
body { body {
@ -50,6 +38,7 @@ body {
position: relative; position: relative;
min-height: 100vh; min-height: 100vh;
line-height: 1.625; line-height: 1.625;
transition: all .25s;
} }
::selection { ::selection {
@ -62,7 +51,7 @@ main {
a { a {
text-decoration: underline; text-decoration: underline;
color: var(--accent-primary); color: var(--accent);
text-underline-offset: 5px; text-underline-offset: 5px;
transition: filter 0.25s; transition: filter 0.25s;
} }

View File

@ -112,7 +112,7 @@
.buttons a { .buttons a {
text-decoration: none; text-decoration: none;
background-color: var(--accent-primary); background-color: var(--accent);
padding: 8px 1em 8px 1em; padding: 8px 1em 8px 1em;
color: var(--primary); color: var(--primary);
border-radius: 10px; border-radius: 10px;
@ -133,7 +133,7 @@
} }
.announcement { .announcement {
color: var(--primary); color: #252525 !important;
padding: 2rem 1rem; padding: 2rem 1rem;
border-radius: 10px; border-radius: 10px;
width: fit-content; width: fit-content;
@ -142,7 +142,7 @@
} }
.announcement a { .announcement a {
color: var(--primary); color: #252525;
} }
.announcement .general { .announcement .general {

View File

@ -93,7 +93,7 @@
} }
.web:hover { .web:hover {
background-color: var(--accent-tertiary); background-color: var(--accent);
color: var(--secondary) !important; color: var(--secondary) !important;
} }

View File

@ -75,7 +75,7 @@
} }
.team-inner { .team-inner {
background-color: #252525; background-color: var(--secondary);
border-radius: 10px; border-radius: 10px;
padding: 1rem; padding: 1rem;
width: 30em; width: 30em;
@ -104,7 +104,7 @@
} }
.matrixcolored { .matrixcolored {
background-color: #fff; background-color: var(--tertiary);
font-size: 20px; font-size: 20px;
height: 23px; height: 23px;
} }
@ -138,7 +138,7 @@
} }
.web:hover { .web:hover {
background-color: var(--accent-tertiary); background-color: var(--accent);
color: var(--secondary) !important; color: var(--secondary) !important;
} }

View File

@ -224,6 +224,6 @@
} }
span { span {
color: var(--accent-primary); color: var(--accent);
} }
</style> </style>

Binary file not shown.

Binary file not shown.