diff --git a/src/lib/locales/de.json b/src/lib/locales/de.json index 9ece840..9748996 100644 --- a/src/lib/locales/de.json +++ b/src/lib/locales/de.json @@ -41,7 +41,8 @@ "flDisable": "Displaybeleuchtung deaktivieren", "httpAuthUser": "WebUI-Benutzername", "httpAuthPass": "WebUI-Passwort", - "httpAuthText": "Schützt nur die WebUI mit einem Passwort, nicht API-Aufrufe." + "httpAuthText": "Schützt nur die WebUI mit einem Passwort, nicht API-Aufrufe.", + "currencies": "Währungen" }, "control": { "systemInfo": "Systeminfo", diff --git a/src/lib/locales/en.json b/src/lib/locales/en.json index 2d85180..c518200 100644 --- a/src/lib/locales/en.json +++ b/src/lib/locales/en.json @@ -51,7 +51,8 @@ "httpAuthEnabled": "Require authentication for WebUI", "httpAuthUser": "WebUI Username", "httpAuthPass": "WebUI Password", - "httpAuthText": "Only password-protects WebUI, not API-calls." + "httpAuthText": "Only password-protects WebUI, not API-calls.", + "currencies": "Currencies" }, "control": { "systemInfo": "System info", diff --git a/src/lib/locales/es.json b/src/lib/locales/es.json index af5cc35..06bf3fa 100644 --- a/src/lib/locales/es.json +++ b/src/lib/locales/es.json @@ -40,7 +40,8 @@ "flDisable": "Desactivar luz de la pantalla", "httpAuthUser": "Nombre de usuario WebUI", "httpAuthPass": "Contraseña WebUI", - "httpAuthText": "Solo la WebUI está protegida con contraseña, no las llamadas API." + "httpAuthText": "Solo la WebUI está protegida con contraseña, no las llamadas API.", + "currencies": "Monedas" }, "control": { "turnOff": "Apagar", diff --git a/src/lib/locales/nl.json b/src/lib/locales/nl.json index eab8ea7..2bc7d80 100644 --- a/src/lib/locales/nl.json +++ b/src/lib/locales/nl.json @@ -41,7 +41,8 @@ "flDisable": "Schakel Displaylicht uit", "httpAuthUser": "WebUI-gebruikersnaam", "httpAuthPass": "WebUI-wachtwoord", - "httpAuthText": "Beveiligd enkel WebUI, niet de API." + "httpAuthText": "Beveiligd enkel WebUI, niet de API.", + "currencies": "Valuta's" }, "control": { "systemInfo": "Systeeminformatie", diff --git a/src/lib/style/app.scss b/src/lib/style/app.scss index c8b6e52..ef598ac 100644 --- a/src/lib/style/app.scss +++ b/src/lib/style/app.scss @@ -4,7 +4,9 @@ //@import "@fontsource/antonio/latin-400.css"; @import '@fontsource/ubuntu/latin-400.css'; -@import '@fontsource/oswald/latin-400.css'; +//@import '@fontsource/oswald/latin-400.css'; +@import '@fontsource/antonio/latin-400.css'; + @import './satsymbol'; $color-mode-type: media-query; @@ -62,7 +64,7 @@ nav { background: #000; display: flex; font-size: calc(3vw + 3vh); - font-family: 'Oswald', sans-serif; + font-family: 'Antonio', sans-serif; font-weight: 400; padding: 10px; gap: 10px; @@ -76,7 +78,7 @@ nav { align-items: center; justify-content: center; text-align: center; - padding: 10px; + padding: 10px 10px 15px 10px; width: calc(12vw + 12vh); /* Set a dynamic width based on viewport */ aspect-ratio: 1 / 1.5; /* Maintain a 1:1 aspect ratio */ @@ -90,6 +92,10 @@ nav { } } + .digit.sats { + padding-top: 35px; + } + .mediumText { font-size: calc(1.25vw + 1.25vh); } diff --git a/src/routes/Rendered.svelte b/src/routes/Rendered.svelte index b29cf27..4c4167b 100644 --- a/src/routes/Rendered.svelte +++ b/src/routes/Rendered.svelte @@ -9,6 +9,38 @@ }; export let className = 'btclock-wrapper'; + + // Define the currency symbols as constants + const CURRENCY_USD = '$'; + const CURRENCY_EUR = '['; + const CURRENCY_GBP = ']'; + const CURRENCY_JPY = '^'; + const CURRENCY_AUD = '_'; + //const CURRENCY_CHF = '_'; + const CURRENCY_CAD = '`'; + + function getCurrencySymbol(input: string): string { + // Split the string into an array of characters to process each one + return input + .split('') + .map((char) => { + switch (char) { + case CURRENCY_EUR: + return '€'; // Euro symbol + case CURRENCY_GBP: + return '£'; // Pound symbol + case CURRENCY_JPY: + return '¥'; // Yen symbol + case CURRENCY_AUD: + case CURRENCY_CAD: + case CURRENCY_USD: + return '$'; // Dollar symbol + default: + return char; // Return the original character if no match + } + }) + .join(''); // Join the array back into a string + }