Skip to content

Commit

Permalink
static assets
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Nov 16, 2024
1 parent 7b5859d commit c1abe9b
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 11 deletions.
12 changes: 4 additions & 8 deletions src/components/TopBar.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script>
export let user;
export let isDark;
export let theme;
import { base } from '$app/paths';
import cookie from 'cookie';
import ms from 'ms';
const toggle = () => {
document.cookie = cookie.serialize('theme', isDark ? 'light' : 'dark', {
document.cookie = cookie.serialize('theme', theme === 'dark' ? 'light' : 'dark', {
maxAge: ms('1y') / 1000,
path: '/',
sameSite: 'lax'
Expand All @@ -21,11 +21,7 @@
<div>
<a href={base + '/settings'} class="flex justify-center md:justify-start">
<!-- <img src="/logo.png" class="h-8" alt="Discord Tickets" /> -->
<img
src="https://static.eartharoid.me/discord-tickets/logo/{isDark ? 'white' : 'dark'}.png"
class="h-8"
alt="Discord Tickets"
/>
<img src="/assets/wordmark-{theme}.png" class="h-8" alt="Discord Tickets" />
</a>
</div>
<div>
Expand All @@ -45,7 +41,7 @@
<span class="ml-3">{user.username}</span>
</a>
<div class="ml-4">
{#if isDark}
{#if theme === 'dark'}
<i
class="fa-solid fa-moon text-lg p-1 cursor-pointer hover:text-blurple transition duration-300"
title="Switch to light mode"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(default)/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</div>
<div
class="lg:w-1/2 bg-cover bg-no-repeat"
style={`background-image: url("/topgg-${theme}.png")`}
style={`background-image: url("/assets/topgg-${theme}.png")`}
>
<div class="bg-gradient-to-br from-blurple/20 to-white/10 dark:to-[#090510]/10">
<div class="flex items-center justify-stretch lg:min-h-screen p-8 backdrop-blur-sm">
Expand Down
2 changes: 1 addition & 1 deletion src/routes/settings/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
{#if $navigating || !mounted}
<Spinner />
{:else}
<TopBar {user} isDark={theme === 'dark'} />
<TopBar {user} {theme} />
<slot />
<footer class="text-center my-16">
<div class="text-sm p-2 mb-6">
Expand Down
2 changes: 1 addition & 1 deletion src/routes/settings/[guild]/feedback/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="text-center max-w-lg mx-auto my-8">
<div class="my-8">
<img
src={`${base}/img/undraw_reviews.svg`}
src={`${base}/assets/undraw_reviews.svg`}
alt="Reviews illustration"
width="70%"
height="auto"
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added static/assets/wordmark-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/wordmark-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/logo.png
Binary file not shown.

0 comments on commit c1abe9b

Please sign in to comment.