fixed all warnings and error

This commit is contained in:
Jonas_Jones 2025-06-07 18:36:37 +02:00
parent 4b286dd305
commit ff1f70761c
9 changed files with 74 additions and 53 deletions

View file

@ -1,5 +1,11 @@
<script>
let images = [];
<script lang="ts">
interface Image {
id: number;
src: string;
property: string;
}
let images: Image[] = [];
let selectedSquares = new Set();
let loading = false;
@ -35,7 +41,7 @@
}, 1000);
};
const toggleSquareSelection = (image) => {
const toggleSquareSelection = (image: Image) => {
if (selectedSquares.has(image.id)) {
selectedSquares.delete(image.id);
} else {
@ -58,6 +64,8 @@
<div class="grid">
{#each images as image}
<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
<img
class="image {selectedSquares.has(image.id) ? 'selected' : ''}"
src={image.src}

View file

@ -97,10 +97,11 @@
<div class="navbar">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div class="hamburger-menu {showMenu ? 'open' : ''}" on:click={toggleMenu}>
<div class="hamburger-line line-1" />
<div class="hamburger-line line-2" />
<div class="hamburger-line line-3" />
<div class="hamburger-line line-1"></div>
<div class="hamburger-line line-2"></div>
<div class="hamburger-line line-3"></div>
</div>
<div class="logo">
<a href="/">
@ -117,27 +118,28 @@
</nav>
</div>
<div class="lastfm">
<a href="https://fm.jonasjones.dev">
<span class="link" />
<a href="https://fm.jonasjones.dev" aria-label="Last.fm Profile">
<span class="link"></span>
</a>
<div class="lastfmlogoclass" id="lastfm_logo">
<img src="" alt=" " class="lastfmlogooverlay" id="lastfm_logo_overlay" />
</div>
<div class="lastfm-text">
<p id="lastfm_title" />
<p id="lastfm_artist" />
<p id="lastfm_title"></p>
<p id="lastfm_artist"></p>
</div>
</div>
<div class="navigation-menu {showMenu ? 'show' : ''}">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div
class="hamburger-menu close-button {showMenu ? 'open' : ''}"
on:click={toggleMenu}
>
<div class="hamburger-line line-1" />
<div class="hamburger-line line-2" />
<div class="hamburger-line line-3" />
<div class="hamburger-line line-1"></div>
<div class="hamburger-line line-2"></div>
<div class="hamburger-line line-3"></div>
</div>
<ul class="links">
{#each navLinks as link}

View file

@ -19,7 +19,7 @@
</div>
<div class="bottom">
<div class="content">
<div />
<div></div>
<div class="project-topline">
<div class="project-title">{project.title}</div>
<div class="project-titleinfo">

View file

@ -6,8 +6,8 @@
import { language_colors } from "../scripts/langs";
let languageLength = Object.values(project.languages).reduce(
(acc, curr) => acc + curr,
let languageLength = (Object.values(project.languages) as number[]).reduce(
(acc: number, curr: number) => acc + curr,
0
);
</script>
@ -17,7 +17,7 @@
<div
class="language-color"
style="background-color: {language_colors[
language
language as keyof typeof language_colors
]}; width: {(project.languages[language] / languageLength) * 100}%"
>
<p>{language}</p>

View file

@ -13,21 +13,21 @@
rel="noopener noreferrer"
>
{#if platform === "GH"}
<i class="fa fa-github" aria-hidden="true" />
<i class="fa fa-github" aria-hidden="true"></i>
{:else if platform === "WB"}
<i class="fa fa-globe" aria-hidden="true" />
<i class="fa fa-globe" aria-hidden="true"></i>
{:else if platform === "YT"}
<i class="fa fa-youtube" aria-hidden="true" />
<i class="fa fa-youtube" aria-hidden="true"></i>
{:else if platform === "TW"}
<i class="fa fa-twitter" aria-hidden="true" />
<i class="fa fa-twitter" aria-hidden="true"></i>
{:else if platform === "DC"}
<i class="fa fa-discord" aria-hidden="true" />
<i class="fa fa-discord" aria-hidden="true"></i>
{:else if platform === "PT"}
<i class="fa fa-patreon" aria-hidden="true" />
<i class="fa fa-patreon" aria-hidden="true"></i>
{:else if platform === "SP"}
<i class="fa fa-spotify" aria-hidden="true" />
<i class="fa fa-spotify" aria-hidden="true"></i>
{:else if platform === "IG"}
<i class="fa fa-instagram" aria-hidden="true" />
<i class="fa fa-instagram" aria-hidden="true"></i>
{:else}
{platform}
{/if}

View file

@ -1,3 +1,5 @@
<!-- please god dont send me to hell for doing this -->
<!-- svelte-ignore a11y_missing_content -->
<h1> </h1>
<!-- svelte-ignore a11y_missing_content -->
<h1> </h1>

View file

@ -1,4 +1,4 @@
<script>
<script lang="ts">
import NavBar from "../components/NavBar.svelte";
import Footer from "../components/Footer.svelte";
import ParallaxBg from "../components/ParallaxBg.svelte";
@ -11,14 +11,19 @@
}
function toggleTaeyong() {
const taeyong = document.querySelector(".taeyong");
taeyong.style.display = "block";
const taeyong = document.querySelector(".taeyong") as HTMLElement;
if (taeyong) {
taeyong.style.display = "block";
}
}
function toggleTaeyongoff() {
const taeyong = document.querySelector(".taeyong");
taeyong.style.display = "none";
const taeyong = document.querySelector(".taeyong") as HTMLElement;
if (taeyong) {
taeyong.style.display = "none";
}
}
</script>
<ParallaxBg>
@ -30,27 +35,31 @@
<h2>Page not found</h2>
<!-- svelte-ignore a11y-missing-attribute -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<a on:click={toggleTaeyong}>오류다</a>
<div style="height:300px;width:600px">
<a role="button" tabindex="0" on:click={toggleTaeyong}>오류다</a>
<div style="height:300px;width:600px;">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<img
src={isGif1 ? "/johnrefs1.gif" : "/johnrefs2.gif"}
alt="Toggle GIF"
on:click={toggleGif}
/>
<button on:click={toggleGif} style="background: none; border: none; padding: 0; cursor: pointer;">
<img
src={isGif1 ? "/johnrefs1.gif" : "/johnrefs2.gif"}
alt="Toggle GIF"
style="display: block;"
/>
</button>
</div>
</center>
<Footer />
</ParallaxBg>
<div class="taeyong">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<img
src="/taeyong.gif"
alt="taeyong"
on:click={toggleTaeyongoff}
height="100%"
width="100%"
/>
<button on:click={toggleTaeyongoff} style="background: none; border: none; padding: 0; width: 100%; height: 100%; cursor: pointer;">
<img
src="/taeyong.gif"
alt="taeyong"
height="100%"
width="100%"
style="display: block; width: 100%; height: 100%;"
/>
</button>
</div>
<style>
@ -73,5 +82,6 @@
height: 100%;
z-index: 1;
display: none;
overflow:hidden;
}
</style>

View file

@ -25,12 +25,10 @@
</div>
<div class="social-media">
<div class="row">
<a href="https://github.com/JonasunderscoreJones"><i class="fab fa-github" /></a>
<a href="https://www.youtube.com/channel/UCVIxvKBIMSMgurYS8pK7fSg"
><i class="fab fa-youtube" /></a
>
<a href="https://discord.gg/V2EsuUVmWh"><i class="fab fa-discord" /></a>
<a href="mailto:me@jonasjones.dev"><i class="fas fa-envelope" /></a>
<a href="https://github.com/JonasunderscoreJones" aria-label="github-link"><i class="fab fa-github"></i></a>
<a href="https://www.youtube.com/channel/UCVIxvKBIMSMgurYS8pK7fSg" aria-label="youtube-link"><i class="fab fa-youtube"></i></a>
<a href="https://discord.gg/V2EsuUVmWh" aria-label="discord-link"><i class="fab fa-discord"></i></a>
<a href="mailto:me@jonasjones.dev" aria-label="email-link"><i class="fas fa-envelope"></i></a>
</div>
</div>
</ParallaxBg>

View file

@ -67,6 +67,7 @@
}
// use onmount to fetch projects from https://cdn.jonasjones.dev/api/projects/projects.json
onMount(async () => {
console.log("Fetching projects...");
const res = await fetch(
"https://cdn.jonasjones.dev/api/projects/projects.json"
);
@ -92,7 +93,7 @@
placeholder="Search projects"
on:input={handleSearchText}
/>
<i class="fa fa-folder-open" aria-hidden="true" />
<i class="fa fa-folder-open" aria-hidden="true"></i>
<select name="category" id="category" on:change={handleSearchCategory}>
<option value="">All</option>
<optgroup label="Minecraft">
@ -111,7 +112,7 @@
<option value="lib">Library</option>
</optgroup>
</select>
<i class="fa fa-globe" aria-hidden="true" />
<i class="fa fa-globe" aria-hidden="true"></i>
<select name="language" id="language" on:change={handleSearchLang}>
<option value="">All</option>
<option value="clang">C</option>
@ -128,7 +129,7 @@
<option value="ps2">PowerShell 2</option>
<option value="godot">Godot Lang</option>
</select>
<i class="fa fa-tasks" aria-hidden="true" />
<i class="fa fa-tasks" aria-hidden="true"></i>
<select name="status" id="status" on:change={handleSearchStatus}>
<option value="">All</option>
<option value="planned">Planned</option>