Skip to content

Commit c8c9f3c

Browse files
remove: delete unused files including README, index.html, index.js, and style.css
1 parent 10bcf69 commit c8c9f3c

File tree

5 files changed

+40
-367
lines changed

5 files changed

+40
-367
lines changed

README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

index.html

Lines changed: 0 additions & 80 deletions
This file was deleted.

index.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

portfolio/src/routes/+layout.svelte

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,53 @@
22
import '../app.css';
33
import Footer from './footer.svelte';
44
import { page } from '$app/stores';
5+
import { onMount } from 'svelte';
6+
57
let { children } = $props();
8+
let isLoading = $state(true); // Loading state
69
710
const isActive = (route: string) => {
811
return $page.url.pathname === route;
912
};
13+
14+
// Wait for all assets (images, fonts) to load
15+
onMount(() => {
16+
const handleLoad = () => {
17+
isLoading = false; // Hide the loader once everything is loaded
18+
};
19+
20+
// Check if the document is already loaded
21+
if (document.readyState === 'complete') {
22+
handleLoad();
23+
} else {
24+
window.addEventListener('load', handleLoad);
25+
}
26+
27+
// Cleanup event listener
28+
return () => {
29+
window.removeEventListener('load', handleLoad);
30+
};
31+
});
1032
</script>
1133

12-
<div class="md:h-[89vh] md:grid md:grid-cols-6">
13-
<nav class="font-dm-serif col-span-1 space-x-10 border-r px-7 md:pt-10 pt-5 text-xl md:flex flex-col gap-3">
14-
<span><a href="/" class={`hover:underline ${isActive('/') && 'underline'}`}>Intro</a></span>
15-
<span><a href="/history" class={`hover:underline ${isActive('/history') && 'underline'}`}>History</a></span>
16-
<span><a href="/works" class={`hover:underline ${isActive('/works') && 'underline'}`}>Works</a></span>
17-
</nav>
34+
{#if isLoading}
35+
<!-- Loading Animation -->
36+
<div class="fixed inset-0 flex items-center justify-center bg-yellow-50 z-50">
37+
<p class="absolute bottom-10 right-10 text-7xl font-black font-mono">LOADING...</p>
38+
</div>
39+
{:else}
40+
<!-- Main Content -->
41+
<div class="md:h-[89vh] md:grid md:grid-cols-6">
42+
<nav class="font-dm-serif col-span-1 space-x-10 border-r px-7 md:pt-10 pt-5 text-xl md:flex flex-col gap-3">
43+
<span><a href="/" class={`hover:underline ${isActive('/') && 'underline'}`}>Intro</a></span>
44+
<span><a href="/history" class={`hover:underline ${isActive('/history') && 'underline'}`}>History</a></span>
45+
<span><a href="/works" class={`hover:underline ${isActive('/works') && 'underline'}`}>Works</a></span>
46+
</nav>
1847

19-
<div class="col-span-5 overflow-y-auto py-10 px-10 md:px-20 ">
20-
{@render children()}
48+
<div class="col-span-5 overflow-y-auto py-10 px-10 md:px-20 ">
49+
{@render children()}
50+
</div>
2151
</div>
22-
</div>
2352

24-
<Footer />
53+
<Footer />
54+
{/if}

0 commit comments

Comments
 (0)