Skip to content

Commit 3ab413d

Browse files
committed
fixed site's language font
1 parent 023a470 commit 3ab413d

4 files changed

Lines changed: 19 additions & 11 deletions

File tree

src/app.css

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap");
2-
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;700&display=swap");
3-
41
@import "tailwindcss";
52
@import "@catppuccin/tailwindcss/mocha.css";
63

@@ -12,6 +9,11 @@
129
--font-sans: "JetBrains Mono", sans-serif;
1310
--font-hebrew: "Noto Sans Hebrew", sans-serif;
1411
}
12+
@layer base {
13+
*:lang(he) {
14+
@apply font-hebrew;
15+
}
16+
}
1517
* {
1618
box-sizing: border-box;
1719
}
@@ -56,10 +58,6 @@ main {
5658

5759
/* --- ASCII UI Styles --- */
5860

59-
.ascii-border {
60-
@apply border-2 border-ctp-surface0 p-4;
61-
}
62-
6361
/* Base style for a clickable file line */
6462
.ascii-file-container {
6563
@apply relative pl-4 pr-4; /* Add padding to make space for brackets */
@@ -143,7 +141,7 @@ body::after {
143141
z-index: 101;
144142
animation: crt-noise 0.5s linear infinite;
145143
}
146-
/* FIX: CANT BE TURNED OFF WITH THE SLIDER */
144+
147145
/* This wrapper applies the text glow to the entire app */
148146
.crt-wrapper {
149147
/* The blur is always active */

src/app.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<link rel="preconnect" href="https://fonts.googleapis.com" />
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9+
<link
10+
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Noto+Sans+Hebrew:wght@400;700&display=swap"
11+
rel="stylesheet" />
12+
713
%sveltekit.head%
814
</head>
915
<body data-sveltekit-preload-data="hover" class="bg-ctp-base text-ctp-text">

src/lib/components/features/terminal/Terminal.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
<div
3030
bind:this={terminalElement}
31+
dir="ltr"
3132
class="
3233
relative
3334
w-full
@@ -42,7 +43,7 @@
4243
text-ctp-green
4344
p-4
4445
rounded
45-
ascii-border
46+
border-2 border-ctp-surface0
4647
">
4748
{#if $terminalStore.state === "waiting"}
4849
<div class="absolute inset-0 p-4">

src/lib/stores/language.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ const createLanguageStore = () => {
1212
subscribe,
1313
setLang: (/** @type {string} */ lang) => {
1414
if (browser) {
15+
document.documentElement.lang = lang;
16+
document.documentElement.dir = lang === "he" ? "rtl" : "ltr";
1517
localStorage.setItem("language", lang);
16-
console.log("Setting language to:", lang);
1718
}
1819
set(lang);
1920
},
2021
init: () => {
2122
if (browser) {
2223
const savedLang = localStorage.getItem("language") || "en";
23-
console.log("Initializing language to:", savedLang);
24+
document.documentElement.lang = savedLang;
25+
document.documentElement.dir =
26+
savedLang === "he" ? "rtl" : "ltr";
2427
set(savedLang);
2528
}
2629
},

0 commit comments

Comments
 (0)