Skip to content
Draft
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
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@sveltejs/kit": "2.52.0",
"@tailwindcss/vite": "^4.1.18",
"@types/node": "24.10.13",
"daisyui": "^5.5.14",
"eslint": "9.39.2",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-svelte": "3.15.0",
Expand Down
47 changes: 42 additions & 5 deletions src/app.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
@layer theme, base, components, utilities;
@import 'tailwindcss/utilities.css' layer(utilities);

@plugin "daisyui" {
root: '.daisyui';
include: button, menu, navbar, drawer;
themes: false;
}

@plugin "daisyui/theme" {
root: '.daisyui';
name: 'light';
prefersdark: false;
color-scheme: 'light';

--color-base-100: oklch(98% 0.016 73.684);
--color-base-200: oklch(95% 0.038 75.164);
--color-base-300: oklch(90% 0.076 70.697);

--color-primary: #ff9930;
--color-primary-content: oklch(27% 0.077 45.635);
--color-secondary: #30ff99;
--color-secondary-content: oklch(26% 0.051 172.552);
--color-accent: #9930ff;
--color-accent-content: oklch(97% 0.014 308.299);
}

@plugin "daisyui/theme" {
root: '.daisyui';
name: 'dark';
prefersdark: true;
color-scheme: 'dark';

--color-base-100: oklch(14% 0.005 285.823);
--color-base-200: oklch(14% 0.004 49.25);
--color-base-300: oklch(26% 0.079 36.259);

--color-primary: #ff9930;
--color-primary-content: oklch(27% 0.077 45.635);
--color-secondary: #30ff99;
--color-secondary-content: oklch(26% 0.051 172.552);
--color-accent: #9930ff;
--color-accent-content: oklch(97% 0.014 308.299);
}

@font-face {
font-family: Roboto;
src: url('/Good Times Rg.otf');
Expand Down Expand Up @@ -28,11 +70,6 @@ html {

/* BUILDING BLOCKS */

.container {
display: flex;
flex-direction: column;
}

.section {
width: 90%;
margin: auto;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
let { isHomepage }: Props = $props();
</script>

<footer class="container">
<footer>
{#if !isHomepage}
<div class="quaternary-bg">
<div class="text-center">
Expand Down
15 changes: 1 addition & 14 deletions src/lib/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,7 @@
background: linear-gradient(90deg, rgba(255, 153, 48, 1) 50%, var(--quinary-color) 100%);
}

.header {
display: flex;
align-items: center;
justify-content: space-between;
color: white;
}

.header h1 {
h1 {
font-family: 'Roboto';
}

Expand All @@ -84,12 +77,6 @@
}

@media (min-width: 576px) {
.header {
justify-content: space-between;
flex-direction: row;
text-align: center;
}

.short-name {
display: none;
}
Expand Down
175 changes: 40 additions & 135 deletions src/lib/Navbar.svelte
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import { navExpanded } from '../stores.js';
import { Milestone, get } from '$lib/milestones';
import { pocketdddUrl } from '$lib/eventDetails';

interface Props {
isAbsolute?: boolean;
}

let { isAbsolute = false }: Props = $props();

let navItems = [
{ text: 'Home', href: '/', show: true },
{ text: 'About', href: '/about', show: true },
Expand All @@ -34,134 +26,47 @@
{ text: 'Privacy Policy', href: '/privacy-policy', show: true },
{ text: 'Code of Conduct', href: '/code-of-conduct', show: true }
];

let currentPage = $derived($page.url.pathname);

function toggleNav() {
$navExpanded = !$navExpanded;
}
</script>

<nav class:nav-absolute={isAbsolute}>
<button class="unset main-nav-button" onclick={toggleNav}>
<span class="nav-button-text">Find out more</span>

<span class="material-symbols-outlined icon">
{#if $navExpanded}
expand_less
{:else}
expand_more
{/if}
</span>
</button>
{#if $navExpanded}
<div>
<div class="nav-link-container" class:nav-link-container-absolute={!isAbsolute}>
{#each navItems as navItem}
{#if navItem.show}
<a
href={navItem.href}
onclick={toggleNav}
class="nav-link"
class:isActivePage={navItem.href === currentPage}>
{navItem.text}
</a>
{/if}
{/each}
{#snippet menuitems()}
{#each navItems as navItem}
{#if navItem.show}
<li><a href={navItem.href} class="not-prose">{navItem.text}</a></li>
{/if}
{/each}
{/snippet}

<div class="daisyui drawer sticky top-0">
<input id="my-drawer-2" type="checkbox" class="drawer-toggle" />
<div class="drawer-content flex flex-col">
<!-- Navbar -->
<div class="navbar w-full bg-base-300">
<div class="flex-none lg:hidden">
<label for="my-drawer-2" aria-label="open sidebar" class="btn btn-square btn-ghost">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="inline-block h-6 w-6 stroke-current">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</label>
</div>
<div class="hidden flex-none lg:block">
<ul class="menu menu-horizontal">
{@render menuitems()}
</ul>
</div>
</div>
{/if}
</nav>

<style>
nav {
display: flex;
flex-direction: column;
align-items: flex-end;
margin: 30px;
}
.nav-absolute {
position: absolute;
right: 0px;
top: 0px;
}

nav a {
color: black;
text-decoration: none;
}

nav a,
.main-nav-button {
font-size: 1.5rem;
}

.main-nav-button {
padding: 10px;
display: flex;
align-items: center;
}

.main-nav-button:hover {
cursor: pointer;
}

.nav-link-container {
background-color: white;
}

.nav-link-container-absolute {
position: absolute;
right: 30px;
z-index: 5000;
}

.nav-link {
padding: 10px;
border: 1px solid lightgrey;
display: block;
}

.nav-link,
.main-nav-button {
background-color: white;
color: black;
}

.isActivePage {
background-color: rgba(255, 153, 48, 0.8);
color: black;
}

.nav-link:hover,
.main-nav-button:hover {
background-color: var(--primary-color);
color: black;
}

.nav-button-text {
display: none;
}

.icon {
font-size: 3rem;
}

@media (min-width: 768px) {
nav {
margin: 67px 50px;
}

.nav-link-container {
right: 49px;
}

.nav-button-text {
display: inline;
}

.icon {
font-size: 2rem;
}
}
</style>
</div>
<div class="drawer-side">
<label for="my-drawer-2" aria-label="close sidebar" class="drawer-overlay"></label>
<ul class="menu min-h-full w-80 bg-base-200 p-4">
{@render menuitems()}
</ul>
</div>
</div>
4 changes: 1 addition & 3 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
</svelte:head>

<Header {isHomepage} />

<main class="container">
<main>
{@render children?.()}
</main>

<Footer {isHomepage} />
Loading