website

#astro#js#html#css

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

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


7eb30e3 — Peter John 2025-02-03T13:47:44+05:30
update website

Generated files not shown: package-lock.json

package.json CHANGED
@@ -25,14 +25,13 @@
25
25
  "@sveltejs/kit": "^2.7.3",
26
26
  "@sveltejs/vite-plugin-svelte": "^4.0.0",
27
27
  "@sveltejs/vite-plugin-svelte-inspector": "^3.0.1",
28
- "@tailwindcss/typography": "^0.5.15",
28
+ "@tailwindcss/vite": "^4.0.3",
29
29
  "@types/eslint": "8.56.0",
30
30
  "autoprefixer": "^10.4.19",
31
31
  "eslint": "^8.56.0",
32
32
  "eslint-config-prettier": "^9.1.0",
33
33
  "eslint-plugin-svelte": "^2.45.1",
34
34
  "mdsvex": "^0.12.3",
35
- "postcss": "^8.4.47",
36
35
  "prettier": "^3.3.3",
37
36
  "prettier-plugin-svelte": "^3.2.7",
38
37
  "remark-github": "^12.0.0",
@@ -40,7 +39,7 @@
40
39
  "super-sitemap": "^0.14.14",
41
40
  "svelte": "^5.1.3",
42
41
  "svelte-check": "^4.0.5",
43
- "tailwindcss": "^3.4.14",
42
+ "tailwindcss": "^4.0.3",
44
43
  "vite": "^5.4.10",
45
44
  "vitest": "^2.1.3"
46
45
  }
postcss.config.js DELETED
@@ -1,6 +0,0 @@
1
- export default {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- };
src/app.css CHANGED
@@ -1,3 +1 @@
1
- @tailwind base;
2
- @tailwind components;
1
+ @import "tailwindcss";
3
- @tailwind utilities;
src/index.test.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { describe, it, expect } from 'vitest';
2
2
 
3
3
  describe('sum test', () => {
4
- it('adds 1 + 2 to equal 3', () => {
4
+ it('adds 1 + 2 to equal 3', () => {
5
- expect(1 + 2).toBe(3);
5
+ expect(1 + 2).toBe(3);
6
- });
6
+ });
7
7
  });
src/routes/+page.svelte CHANGED
@@ -244,24 +244,32 @@
244
244
  </div>
245
245
  </div>
246
246
 
247
- <style lang="postcss">
247
+ <style>
248
248
  h2 {
249
- @apply text-xl font-semibold;
249
+ font-size: 1.5rem;
250
+ font-weight: 600;
250
251
  }
251
252
 
252
253
  section {
254
+ display: flex;
253
- @apply flex flex-col mt-6 mb-4;
255
+ flex-direction: column;
256
+ margin-top: 1.5rem;
257
+ margin-bottom: 1rem;
254
258
  }
255
259
 
256
260
  .soft-link {
261
+ display: flex;
262
+ flex-direction: row;
257
- @apply text-base text-left flex flex-row items-center;
263
+ align-items: center;
264
+ text-align: left;
258
265
 
259
- div {
266
+ & > div {
267
+ flex: 1;
260
- @apply flex-1 ml-2;
268
+ margin-left: 0.5rem;
261
269
  }
262
270
  }
263
271
 
264
272
  .soft-icon {
265
- @apply w-8;
273
+ width: 32px;
266
274
  }
267
275
  </style>
src/routes/cv/+page.svelte CHANGED
@@ -185,19 +185,20 @@
185
185
  </section>
186
186
  </div>
187
187
 
188
- <style lang="postcss">
188
+ <style>
189
189
  b {
190
190
  font-weight: 600;
191
191
  }
192
192
 
193
193
  ul {
194
+ margin: 0.5rem;
194
- @apply m-2 pl-2 sm:pl-5;
195
+ padding-left: 1rem;
195
196
  }
196
197
 
197
- /* li {
198
+ li {
198
199
  list-style-type: disc;
199
200
  list-style-position: outside;
200
- } */
201
+ }
201
202
 
202
203
  h3 {
203
204
  font-weight: 700;
src/routes/only-bible-app/+layout.svelte CHANGED
@@ -9,7 +9,7 @@
9
9
  let { children } = $props();
10
10
  </script>
11
11
 
12
- <div class="prose h-full sm:w-6/12 mx-auto">
12
+ <div class="h-full sm:w-6/12 mx-auto">
13
13
  <header class="flex flex-col mx-4 text-sm mt-4">
14
14
  <nav class="flex flex-1 justify-between" aria-label="Global">
15
15
  <div class="flex flex-1">
@@ -36,13 +36,7 @@
36
36
  <main class="flex flex-col mx-4 mt-10 sm:mt-0">
37
37
  {@render children?.()}
38
38
  </main>
39
- <footer class="not-prose text-center py-5 mt-20">
39
+ <footer class="text-center py-5 mt-20">
40
40
  <Copyright />
41
41
  </footer>
42
42
  </div>
43
-
44
- <style lang="postcss">
45
- :global(html) {
46
- background-color: #482929;
47
- }
48
- </style>
src/routes/only-bible-app/+page.svelte CHANGED
@@ -50,7 +50,7 @@
50
50
  </div>
51
51
  </div>
52
52
  <div
53
- class="not-prose flex items-center mt-10 sm:mt-20 sm:flex-row [&>picture]:flex [&>picture]:justify-center sm:[&>picture]:justify-end"
53
+ class="flex items-center mt-10 sm:mt-20 sm:flex-row [&>picture]:flex [&>picture]:justify-center sm:[&>picture]:justify-end"
54
54
  >
55
55
  <enhanced:img class="w-9/12" src={AppImagePng} alt="app screenshot" />
56
56
  </div>
src/routes/posts/[slug]/+page.svelte CHANGED
@@ -31,7 +31,58 @@
31
31
  {/each}
32
32
  </div>
33
33
  </hgroup>
34
- <div class="prose">
34
+ <div class="content">
35
35
  <data.content />
36
36
  </div>
37
37
  </article>
38
+
39
+ <style>
40
+ .content {
41
+ max-width: 70rem;
42
+ }
43
+
44
+ .content :global {
45
+ h1 {
46
+ font-weight: 500;
47
+ margin-top: 1rem;
48
+ }
49
+ h2 {
50
+ font-weight: 700;
51
+ }
52
+
53
+ h3 {
54
+ font-size: 1.5rem;
55
+ font-weight: 700;
56
+ color: black;
57
+ margin: 24px 0px 12px 0px;
58
+ }
59
+
60
+ blockquote {
61
+ font-size: 1.2rem;
62
+ font-weight: 600;
63
+ font-style: normal;
64
+ background: #f8ffaa;
65
+ padding: 0.4rem;
66
+ margin: 16px 0px;
67
+ }
68
+
69
+ pre {
70
+ font-size: 0.8rem;
71
+ font-family: 'monospace';
72
+ line-height: 1.6;
73
+ padding: 16px;
74
+ border-radius: 16px;
75
+ margin: 12px 0px;
76
+ }
77
+
78
+ code {
79
+ color: #d14;
80
+ word-wrap: break-word;
81
+ box-decoration-break: clone;
82
+ padding: 2px 4px;
83
+ border-radius: 0.2rem;
84
+ font-weight: 400;
85
+ font-size: 0.8rem;
86
+ }
87
+ }
88
+ </style>
tailwind.config.js DELETED
@@ -1,96 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- export default {
3
- content: ['./src/**/*.{html,js,svelte,ts}'],
4
- theme: {
5
- fontFamily: {
6
- sans: 'system-ui',
7
- serif: 'system-ui',
8
- mono: 'monospace',
9
- logo: 'cursive',
10
- },
11
- extend: {
12
- typography: ({ theme }) => ({
13
- DEFAULT: {
14
- css: {
15
- maxWidth: '70rem',
16
- h1: {
17
- fontWeight: '500',
18
- marginTop: '1rem',
19
- },
20
- h2: {
21
- color: theme('colors.black'),
22
- },
23
- h3: {
24
- color: theme('colors.black'),
25
- },
26
- pre: {
27
- padding: '16px',
28
- borderRadius: '16px',
29
- fontSize: '0.8rem',
30
- fontFamily: 'monospace',
31
- },
32
- 'code::before': {
33
- content: '&nbsp;&nbsp;',
34
- },
35
- 'code::after': {
36
- content: '&nbsp;&nbsp;',
37
- },
38
- code: {
39
- color: '#d14',
40
- background: '#f6f6f6',
41
- border: '1px solid #e1e1e8',
42
- wordWrap: 'break-word',
43
- boxDecorationBreak: 'clone',
44
- padding: '2px 4px',
45
- borderRadius: '.2rem',
46
- fontWeight: 400,
47
- fontSize: '0.8rem',
48
- },
49
- blockquote: {
50
- background: '#f8ffaa',
51
- fontWeight: 600,
52
- fontStyle: 'normal',
53
- padding: '0.4rem',
54
- },
55
- 'blockquote p:first-of-type': { margin: 0 },
56
- 'blockquote p:first-of-type::before': { content: 'none' },
57
- 'blockquote p:first-of-type::after': { content: 'none' },
58
- '--tw-prose-body': theme('colors.black'),
59
- '--tw-prose-headings': theme('colors.gray[100]'),
60
- '--tw-prose-lead': theme('colors.black'),
61
- '--tw-prose-links': theme('colors.blue[900]'),
62
- '--tw-prose-bold': theme('colors.black'),
63
- '--tw-prose-counters': theme('colors.black'),
64
- '--tw-prose-bullets': theme('colors.black'),
65
- '--tw-prose-hr': theme('colors.black'),
66
- '--tw-prose-quotes': theme('colors.black'),
67
- '--tw-prose-quote-borders': theme('colors.black'),
68
- '--tw-prose-captions': theme('colors.black'),
69
- '--tw-prose-code': theme('colors.black'),
70
- '--tw-prose-pre-code': theme('colors.black'),
71
- '--tw-prose-pre-bg': theme('colors.black'),
72
- '--tw-prose-th-borders': theme('colors.black'),
73
- '--tw-prose-td-borders': theme('colors.black'),
74
- '--tw-prose-invert-body': theme('colors.black'),
75
- '--tw-prose-invert-headings': theme('colors.white'),
76
- '--tw-prose-invert-lead': theme('colors.black'),
77
- '--tw-prose-invert-links': theme('colors.blue[900]'),
78
- '--tw-prose-invert-bold': theme('colors.white'),
79
- '--tw-prose-invert-counters': theme('colors.black'),
80
- '--tw-prose-invert-bullets': theme('colors.black'),
81
- '--tw-prose-invert-hr': theme('colors.black'),
82
- '--tw-prose-invert-quotes': theme('colors.black'),
83
- '--tw-prose-invert-quote-borders': theme('colors.black'),
84
- '--tw-prose-invert-captions': theme('colors.black'),
85
- '--tw-prose-invert-code': theme('colors.white'),
86
- '--tw-prose-invert-pre-code': theme('colors.black'),
87
- '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
88
- '--tw-prose-invert-th-borders': theme('colors.black'),
89
- '--tw-prose-invert-td-borders': theme('colors.black'),
90
- },
91
- },
92
- }),
93
- },
94
- },
95
- plugins: [import('@tailwindcss/typography')],
96
- };
vite.config.js CHANGED
@@ -1,11 +1,17 @@
1
1
  import { enhancedImages } from '@sveltejs/enhanced-img';
2
2
  import { sveltekit } from '@sveltejs/kit/vite';
3
+ import tailwindcss from '@tailwindcss/vite';
3
4
  import svg from '@poppanator/sveltekit-svg';
4
5
  import { defineConfig } from 'vitest/config';
5
6
 
6
7
  export default defineConfig({
8
+ plugins: [
9
+ tailwindcss(),
7
- plugins: [enhancedImages(), sveltekit(), svg()],
10
+ enhancedImages(),
11
+ sveltekit(),
12
+ svg()
13
+ ],
8
- test: {
14
+ test: {
9
- include: ['src/**/*.{test,spec}.{js,ts}'],
15
+ include: ['src/**/*.{test,spec}.{js,ts}'],
10
- },
16
+ },
11
17
  });