website

#astro#js#html#css

git clone https://git.pyrossh.dev/website

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


fa80d41 — pyrossh 2024-02-22T15:28:38+05:30
fix sentry

Generated files not shown: package-lock.json

package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "@iconify/json": "^2.2.185",
24
24
  "@playwright/test": "^1.28.1",
25
25
  "@sveltejs/adapter-static": "^3.0.1",
26
- "@sveltejs/kit": "^2.0.0",
26
+ "@sveltejs/kit": "2.5.1",
27
27
  "@types/eslint": "8.56.0",
28
28
  "@unocss/svelte-scoped": "^0.58.5",
29
29
  "@unocss/transformer-directives": "^0.58.5",
@@ -33,7 +33,7 @@
33
33
  "eslint-plugin-svelte": "^2.36.0-next.4",
34
34
  "prettier": "^3.1.1",
35
35
  "prettier-plugin-svelte": "^3.1.2",
36
- "svelte": "^5.0.0-next.1",
36
+ "svelte": "4.2.11",
37
37
  "svelte-check": "^3.6.0",
38
38
  "typescript": "^5.0.0",
39
39
  "unocss": "^0.58.5",
src/lib/components/Slide.svelte CHANGED
@@ -1,5 +1,6 @@
1
1
  <script>
2
- let { title, link, children } = $props();
2
+ // let { title, link, children } = $props();
3
+ export let title, link;
3
4
  </script>
4
5
 
5
6
  <article class="overflow-hidden rounded bg-[#f0ede2]">
@@ -14,7 +15,8 @@
14
15
  <div class="i-mdi-github mr-2" />
15
16
  <p>{title}</p>
16
17
  </a>
17
- {@render children()}
18
+ <!-- {@render children()} -->
19
+ <slot />
18
20
  </div>
19
21
  </div>
20
22
  </article>
src/routes/+layout.svelte CHANGED
@@ -1,9 +1,20 @@
1
1
  <script>
2
- import { page } from '$app/stores';
2
+ import { getStores } from '$app/stores';
3
3
  import Footer from '$lib/components/Footer.svelte';
4
4
  import Header from '$lib/components/Header.svelte';
5
+ import { onMount } from 'svelte';
5
- let { children } = $props();
6
+ // let { children } = $props();
7
+
8
+ const { page } = getStores();
6
9
  let url = `https://pyros.sh${$page.url.pathname}`;
10
+
11
+ let isPosts = false;
12
+ onMount(() => {
13
+ page.subscribe(($page) => {
14
+ isPosts = $page.url.pathname.includes('posts');
15
+ console.log(isPosts);
16
+ });
17
+ });
7
18
  </script>
8
19
 
9
20
  <svelte:head>
@@ -21,14 +32,15 @@
21
32
  ></script>
22
33
  </svelte:head>
23
34
  <div
24
- style="display: contents"
35
+ class:h-screen={isPosts}
25
36
  class="leading-8 flex flex-1 flex-col font-normal text-lg sm:leading-7 m-0"
26
37
  >
27
38
  <Header />
28
39
  <main class="w-full h-full block bg-white">
29
40
  <div class="flex w-full flex-1 flex-row justify-center">
30
41
  <div class="flex w-full flex-1 flex-row items-center max-w-5xl mt-4 mb-20 p-4">
31
- {@render children()}
42
+ <!-- {@render children()} -->
43
+ <slot />
32
44
  </div>
33
45
  </div>
34
46
  </main>
src/routes/posts/+page.svelte CHANGED
@@ -2,7 +2,7 @@
2
2
  <title>pyros.sh | Posts</title>
3
3
  <meta name="description" content="Peter John's Posts" />
4
4
  </svelte:head>
5
- <div class="h-screen">
5
+ <div>
6
6
  <div class="px-4 py-40 mx-auto">TBD</div>
7
7
  </div>
8
8