Skip to content

Commit 6415be5

Browse files
committed
typography
1 parent a57115e commit 6415be5

5 files changed

Lines changed: 46 additions & 5 deletions

File tree

package-lock.json

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
"@sveltejs/adapter-static": "^3.0.8",
1616
"@sveltejs/kit": "^2.16.0",
1717
"@sveltejs/vite-plugin-svelte": "^5.0.0",
18-
"@tailwindcss/typography": "^0.5.15",
18+
"@tailwindcss/typography": "^0.5.16",
1919
"@tailwindcss/vite": "^4.0.0",
20+
"@types/node": "^24.0.12",
2021
"svelte": "^5.0.0",
2122
"svelte-check": "^4.0.0",
2223
"tailwindcss": "^4.0.0",

src/app.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ body {
1212
html {
1313
scroll-behavior: smooth;
1414
}
15+
16+
.lang-en {
17+
font-family: "JetBrains Mono", sans-serif;
18+
}
19+
20+
.lang-he {
21+
font-family: "Noto Sans Hebrew", sans-serif;
22+
}

src/routes/+layout.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
language.init();
1010
</script>
1111

12-
<div class="bg-ctp-base text-ctp-text transition-colors duration-300" dir={$language === "he" ? "rtl" : "ltr"}>
12+
<div class="bg-ctp-base text-ctp-text transition-colors duration-300 {$language === 'he' ? 'lang-he' : 'lang-en'}" dir={$language === "he" ? "rtl" : "ltr"}>
1313
<Header />
14-
<main>
14+
<main class="prose lg:prose-xl max-w-none">
1515
<slot />
1616
</main>
1717
<Footer />

vite.config.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
import tailwindcss from '@tailwindcss/vite';
22
import { sveltekit } from '@sveltejs/kit/vite';
33
import { defineConfig } from 'vite';
4+
import typography from '@tailwindcss/typography';
45

56
export default defineConfig({
6-
plugins: [tailwindcss(), sveltekit()],
7+
plugins: [tailwindcss({
8+
content: [
9+
'./src/**/*.{html,js,svelte,ts}',
10+
],
11+
theme: {
12+
extend: {
13+
fontFamily: {
14+
sans: ['"JetBrains Mono"', 'sans-serif'],
15+
hebrew: ['"Noto Sans Hebrew"', 'sans-serif'],
16+
},
17+
},
18+
},
19+
plugins: [typography],
20+
}), sveltekit()],
721
base: process.env.BASE_PATH
822
});

0 commit comments

Comments
 (0)