refactor: optimize fonts, images

This commit is contained in:
dusk 2025-02-21 16:07:08 +03:00
parent 7b81f9590d
commit 0749c30db0
Signed by: dusk
SSH Key Fingerprint: SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw
45 changed files with 40 additions and 36 deletions

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/icons/gaze_site.png" />
<link rel="icon" href="%sveltekit.assets%/icons/gaze_site.webp" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>

@ -21,10 +21,10 @@
}
const menuItems: MenuItem[] = [
{ href: '', name: 'home', iconUri: '/icons/home.png' },
{ href: 'entries', name: 'entries', iconUri: '/icons/entries.png' },
{ href: 'guestbook', name: 'guestbook', iconUri: '/icons/guestbook.png' },
{ href: 'about', name: 'about', iconUri: '/icons/about.png' }
{ href: '', name: 'home', iconUri: '/icons/home.webp' },
{ href: 'entries', name: 'entries', iconUri: '/icons/entries.webp' },
{ href: 'guestbook', name: 'guestbook', iconUri: '/icons/guestbook.webp' },
{ href: 'about', name: 'about', iconUri: '/icons/about.webp' }
];
$: routeComponents = data.route.split('/');
@ -49,7 +49,7 @@
<title>{title}</title>
<meta property="og:site_name" content="gaze.systems" />
<meta property="og:url" content="https://gaze.systems/" />
<meta property="og:image" content="https://gaze.systems/icons/gaze_website.png" />
<meta property="og:image" content="https://gaze.systems/icons/gaze_website.webp" />
</svelte:head>
<div
@ -155,7 +155,7 @@
{@const highlight = isRoute(item.href)}
<NavButton {highlight} {...item} />
{#if doAddPostItem && menuIdx == 1}
<NavButton highlight name={routeComponents[2]} href={data.route.slice(1)} iconUri='/icons/entry.png'/>
<NavButton highlight name={routeComponents[2]} href={data.route.slice(1)} iconUri='/icons/entry.webp'/>
{/if}
{/each}
<div class="hidden md:block grow" />

@ -20,7 +20,7 @@
<div class="flex flex-col md:flex-row gap-y-2 lg:gap-y-0 md:h-full h-card">
<div class="flex flex-col gap-y-2 lg:gap-y-0 mx-auto">
<Window title="readme?" iconUri="/icons/question.png" removePadding>
<Window title="readme?" iconUri="/icons/question.webp" removePadding>
<div class="flex flex-col p-1.5 gap-1.5 prose prose-ralsei prose-img:m-0 leading-none">
<div
class="flex flex-row gap-3 mx-auto bg-ralsei-black bg-opacity-30 overflow-hidden"
@ -44,7 +44,7 @@
<div
class="w-36 [padding:8px] place-content-center place-self-center bg-ralsei-black bg-opacity-30"
>
<img class="w-36 u-photo hover:invert transition-all [transition-duration:300ms]" src="/pfp-iojkqpwerojnasduijf.png" alt="my character" title="hi ;)"/>
<img class="w-36 u-photo hover:invert transition-all [transition-duration:300ms]" src="/pfp-iojkqpwerojnasduijf.webp" alt="my character" title="hi ;)"/>
</div>
<div
class="flex flex-row flex-grow place-content-center ml-1.5 [padding:8px] bg-ralsei-black bg-opacity-30"
@ -99,7 +99,7 @@
</Window>
</div>
<div class="flex flex-col gap-y-2 lg:gap-y-0 mx-auto w-full md:w-fit place-items-end">
<Window title="links!" iconUri="/icons/contact.png">
<Window title="links!" iconUri="/icons/contact.webp">
<div class="prose prose-ralsei prose-ul:leading-[1.1rem] prose-headings:leading-none">
<ul>
<li>discord: yusdacra</li>
@ -176,7 +176,7 @@
<img
class="border-4 w-16 h-16 p-2"
style="border-style: none double none none; image-rendering: pixelated;"
src="/icons/cd_audio.png"
src="/icons/cd_audio.webp"
/>
{/if}
<div class="flex flex-col max-w-[40ch] p-2 overflow-hidden">

@ -1,6 +1,6 @@
<script lang="ts">
import Window from '../../components/window.svelte';
import type { PostData } from './+layout';
import type { PostData } from './+layout.server.js';
import LogPage from '../log/+page.svelte';
export let data;
@ -11,7 +11,7 @@
<div class="mx-auto md:max-w-fit flex flex-col-reverse md:flex-row gap-y-4 gap-x-16">
<div class="flex flex-col gap-y-4">
{#each posts as post}
<Window title={post.metadata.title} iconUri='/icons/entry.png'>
<Window title={post.metadata.title} iconUri='/icons/entry.webp'>
<a
href="/entries/{post.path}"
title="cd /entries/{post.path}"

@ -18,7 +18,7 @@
</svelte:head>
<article class="mx-auto max-w-fit flex flex-wrap lg:flex-nowrap gap-4 h-entry">
<Window {title} iconUri="/icons/entry.png" entry>
<Window {title} iconUri="/icons/entry.webp" entry>
<div class="prose prose-ralsei max-w-[80ch] e-content">
<slot />
</div>

@ -1,5 +1,5 @@
import { PUBLIC_BASE_URL } from '$env/static/public';
import { _allPosts, type PostData } from '../+layout.ts';
import { _allPosts, type PostData } from '../+layout.server.ts';
const entriesUrl = `${PUBLIC_BASE_URL}/entries`;

@ -15,7 +15,7 @@
</script>
<div class="flex flex-col-reverse md:flex-row gap-2 md:gap-4">
<Window title="guestbook" style="ml-auto" iconUri="/icons/guestbook.png">
<Window title="guestbook" style="ml-auto" iconUri="/icons/guestbook.webp">
<div class="flex flex-col gap-1 max-w-[50ch] leading-6">
<div class="prose prose-ralsei leading-6 entry p-2">
<p>hia, here is the guestbook if you wanna post anything :)</p>
@ -57,7 +57,7 @@
</form>
</div>
</Window>
<Window id='guestbookentries' style="mr-auto" title="entries" iconUri="/icons/entries.png" removePadding>
<Window id='guestbookentries' style="mr-auto" title="entries" iconUri="/icons/entries.webp" removePadding>
<div class="flex flex-col gap-2 md:gap-4 2xl:w-[60ch]">
{#if data.getRatelimited}
<p class="text-error">

@ -6,4 +6,4 @@ layout = false
currently working on a game under the name `packet.runner`, read some very WIP stuff about it [here](https://doc.gaze.systems/LsE08EU7QOSKm7xps_treA).
![WIP character model screenshot](https://cdn.bsky.app/img/feed_fullsize/plain/did:plc:dfl62fgb7wtjj3fcbb72naae/bafkreig2rk5tbwp4ncsbuw67u66pv5tvimfv47pusubnkcnao6fowbltlu@jpeg)
![WIP character model screenshot](https://cdn.bsky.app/img/feed_fullsize/plain/did:plc:dfl62fgb7wtjj3fcbb72naae/bafkreig2rk5tbwp4ncsbuw67u66pv5tvimfv47pusubnkcnao6fowbltlu@webp)

@ -8,7 +8,7 @@
:root {
@apply font-sans-serif bg-ralsei-black text-ralsei-white;
@apply prose-code:font-monospace prose-headings:font-monospace;
cursor: url('/icons/gaze_closed.png'), default;
cursor: url('/icons/gaze_closed.webp'), default;
scrollbar-color: theme(colors.ralsei.green.dark) transparent;
}
@ -76,7 +76,7 @@
a,button,input[type=submit] {
@apply text-shadow-green;
cursor: url('/icons/gaze.png'), pointer;
cursor: url('/icons/gaze.webp'), pointer;
}
@font-face {
@ -87,25 +87,29 @@
@font-face {
font-family: 'Comic Sans';
font-style: normal;
font-display: swap;
src: url('/fonts/comic.woff2') format('woff2');
}
@font-face {
font-family: 'Comic Sans';
font-style: normal;
font-weight: bold;
font-display: swap;
src: url('/fonts/comicbd.woff2') format('woff2');
}
@font-face {
font-family: 'Comic Sans';
src: url('/fonts/subset-ComicSansMS-Italic.woff2') format('woff2');
font-weight: normal;
font-style: italic;
font-display: swap;
src: url('/fonts/comici.woff2') format('woff2');
}
@font-face {
font-family: 'Comic Sans';
src: url('/fonts/subset-ComicSansMS.woff2') format('woff2');
font-weight: normal;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Comic Sans';
src: url('/fonts/subset-ComicSansMS-Bold.woff2') format('woff2');
font-weight: bold;
font-style: normal;
font-display: swap;
}
.animate-squiggle {
animation: squigglevision 0.3s infinite;

Binary file not shown.

Before

(image error) Size: 17 KiB

After

(image error) Size: 8.6 KiB

Binary file not shown.

Before

(image error) Size: 7.9 KiB

After

(image error) Size: 4.0 KiB

Binary file not shown.

Before

(image error) Size: 8.1 KiB

After

(image error) Size: 4.0 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

(image error) Size: 446 B

BIN
static/icons/about.webp Normal file

Binary file not shown.

After

(image error) Size: 170 B

Binary file not shown.

Before

(image error) Size: 631 B

BIN
static/icons/cd_audio.webp Normal file

Binary file not shown.

After

(image error) Size: 350 B

Binary file not shown.

Before

(image error) Size: 406 B

BIN
static/icons/contact.webp Normal file

Binary file not shown.

After

(image error) Size: 128 B

Binary file not shown.

Before

(image error) Size: 451 B

BIN
static/icons/entries.webp Normal file

Binary file not shown.

After

(image error) Size: 162 B

Binary file not shown.

Before

(image error) Size: 507 B

BIN
static/icons/entry.webp Normal file

Binary file not shown.

After

(image error) Size: 214 B

Binary file not shown.

Before

(image error) Size: 2.1 KiB

BIN
static/icons/gaze.webp Normal file

Binary file not shown.

After

(image error) Size: 1.2 KiB

Binary file not shown.

Before

(image error) Size: 1.3 KiB

Binary file not shown.

After

(image error) Size: 818 B

Binary file not shown.

Before

(image error) Size: 1.8 KiB

BIN
static/icons/gaze_site.webp Normal file

Binary file not shown.

After

(image error) Size: 1.3 KiB

Binary file not shown.

Before

(image error) Size: 563 B

BIN
static/icons/guestbook.webp Normal file

Binary file not shown.

After

(image error) Size: 250 B

Binary file not shown.

Before

(image error) Size: 677 B

BIN
static/icons/home.webp Normal file

Binary file not shown.

After

(image error) Size: 354 B

Binary file not shown.

Before

(image error) Size: 448 B

BIN
static/icons/question.webp Normal file

Binary file not shown.

After

(image error) Size: 160 B

Binary file not shown.

Before

(image error) Size: 442 B

BIN
static/icons/warning.webp Normal file

Binary file not shown.

After

(image error) Size: 150 B

Binary file not shown.

Before

(image error) Size: 45 KiB

Binary file not shown.

After

(image error) Size: 984 B