From cf9714fc616945944494f4308490c8bbe43bd302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Thu, 30 Apr 2026 13:07:45 -0300 Subject: [PATCH 1/2] fix: issue google indexing with logo alt --- src/app.html | 26 +++-- src/lib/components/Head.svelte | 89 ++++++++++++++++++ src/lib/components/Seo.svelte | 61 ------------ src/lib/translations/en-US/home.json | 3 +- src/lib/translations/pt-BR/home.json | 3 +- src/lib/utils/normalizeLocaleUnderscore.js | 15 +++ src/routes/+page.js | 12 --- src/routes/+page.svelte | 14 +-- src/routes/about/+page.js | 12 --- src/routes/about/+page.svelte | 19 ++-- src/routes/mobile-app/privacy-policy/+page.js | 12 --- .../mobile-app/privacy-policy/+page.svelte | 15 ++- src/routes/privacy-policy/+page.js | 12 --- src/routes/privacy-policy/+page.svelte | 15 ++- src/routes/support-us/+page.js | 12 --- src/routes/support-us/+page.svelte | 15 ++- src/routes/terms-of-service/+page.js | 12 --- src/routes/terms-of-service/+page.svelte | 15 ++- src/routes/viewer/+page.svelte | 15 ++- static/ads.txt | 1 - static/favicon.png | Bin 1571 -> 0 bytes 21 files changed, 174 insertions(+), 204 deletions(-) create mode 100644 src/lib/components/Head.svelte delete mode 100644 src/lib/components/Seo.svelte create mode 100644 src/lib/utils/normalizeLocaleUnderscore.js delete mode 100644 src/routes/+page.js delete mode 100644 src/routes/about/+page.js delete mode 100644 src/routes/mobile-app/privacy-policy/+page.js delete mode 100644 src/routes/privacy-policy/+page.js delete mode 100644 src/routes/support-us/+page.js delete mode 100644 src/routes/terms-of-service/+page.js delete mode 100644 static/ads.txt delete mode 100644 static/favicon.png diff --git a/src/app.html b/src/app.html index 6340008..c197de8 100644 --- a/src/app.html +++ b/src/app.html @@ -14,23 +14,31 @@ Buy me a coffee and help keep it running ☕" data-x_margin="18" data-y_margin="18" > + - - - - - - + + + + + + + + + + %sveltekit.head% diff --git a/src/lib/components/Head.svelte b/src/lib/components/Head.svelte new file mode 100644 index 0000000..05e87b1 --- /dev/null +++ b/src/lib/components/Head.svelte @@ -0,0 +1,89 @@ + + + + + {translatedTitle} + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/lib/components/Seo.svelte b/src/lib/components/Seo.svelte deleted file mode 100644 index c44773c..0000000 --- a/src/lib/components/Seo.svelte +++ /dev/null @@ -1,61 +0,0 @@ - - - - {$t(title)} - - - - - - - - - - - - - - - - diff --git a/src/lib/translations/en-US/home.json b/src/lib/translations/en-US/home.json index 59e8dd5..0287277 100644 --- a/src/lib/translations/en-US/home.json +++ b/src/lib/translations/en-US/home.json @@ -2,6 +2,5 @@ "seo.title": "Free Online Embroidery File Viewer - Fast, Private & No Signup", "seo.description": "Upload and preview embroidery files instantly with Embroidery Viewer. Supports DST, PES, JEF, EXP, VP3 and more. No installs, no uploads – 100% browser-based and free.", "seo.keywords": "embroidery viewer, online embroidery viewer, embroidery file preview, DST viewer, PES viewer, free embroidery tool, JEF viewer, EXP embroidery, VP3 embroidery viewer, embroidery preview tool, browser embroidery renderer, convert embroidery to PNG", - "seo.url": "https://embroideryviewer.xyz", - "seo.image": "https://embroideryviewer.xyz/og/" + "seo.url": "https://embroideryviewer.xyz" } diff --git a/src/lib/translations/pt-BR/home.json b/src/lib/translations/pt-BR/home.json index fa8244b..7ad5c33 100644 --- a/src/lib/translations/pt-BR/home.json +++ b/src/lib/translations/pt-BR/home.json @@ -2,6 +2,5 @@ "seo.title": "Visualizador de Bordado Online Grátis - Rápido, Privado e Sem Cadastro", "seo.description": "Envie e visualize arquivos de bordado instantaneamente com o Embroidery Viewer. Compatível com DST, PES, JEF, EXP, VP3 e mais. Sem instalações, sem uploads – 100% no navegador e gratuito.", "seo.keywords": "visualizador de bordado, visualizador online de bordado, visualizar arquivos de bordado, visualizar DST, visualizar PES, ferramenta gratuita de bordado, visualizador JEF, bordado EXP, visualizador VP3, pré-visualização de bordado, renderizador de bordado no navegador, converter bordado em PNG", - "seo.url": "https://embroideryviewer.xyz", - "seo.image": "https://embroideryviewer.xyz/og/" + "seo.url": "https://embroideryviewer.xyz" } diff --git a/src/lib/utils/normalizeLocaleUnderscore.js b/src/lib/utils/normalizeLocaleUnderscore.js new file mode 100644 index 0000000..dc42dc1 --- /dev/null +++ b/src/lib/utils/normalizeLocaleUnderscore.js @@ -0,0 +1,15 @@ +/** + * Converts a locale string from hyphen format (e.g., "en-US") + * to underscore format (e.g., "en_US"). + * + * Useful for APIs or systems that expect locales with underscores. + * + * @param {string} locale - The locale string in BCP 47 format (e.g., "en-US"). + * @returns {string} The normalized locale string using underscores (e.g., "en_US"). + * + * @example + * normalizeLocaleUnderscore("en-US"); // "en_US" + */ +export const normalizeLocaleUnderscore = (locale) => { + return locale.split('-').join('_'); +}; diff --git a/src/routes/+page.js b/src/routes/+page.js deleted file mode 100644 index b0adabb..0000000 --- a/src/routes/+page.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @type {import('./$types').PageLoad} */ -export function load() { - return { - metadata: { - title: 'home.seo.title', - description: 'home.seo.description', - keywords: 'home.seo.keywords', - url: 'home.seo.url', - image: 'home.seo.image', - }, - }; -} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 00e2ae0..cceb54f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,17 +1,17 @@ - + diff --git a/src/routes/about/+page.js b/src/routes/about/+page.js deleted file mode 100644 index b7c4e00..0000000 --- a/src/routes/about/+page.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @type {import('./$types').PageLoad} */ -export function load() { - return { - metadata: { - title: 'about.seo.title', - description: 'about.seo.description', - keywords: 'about.seo.keywords', - url: 'about.seo.url', - image: 'about.seo.image', - }, - }; -} diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index 9a0f2e3..b0c00ea 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -1,24 +1,23 @@ - +
import { t } from '$lib/translations'; - import Seo from '$lib/components/Seo.svelte'; - - /** @type {import('./$types').PageProps} */ - let { data } = $props(); - - // svelte-ignore state_referenced_locally - const metadata = data.metadata; + import Head from '$lib/components/Head.svelte'; - +

{$t('mobile.app.privacy.policy.title')}

diff --git a/src/routes/privacy-policy/+page.js b/src/routes/privacy-policy/+page.js deleted file mode 100644 index a32f173..0000000 --- a/src/routes/privacy-policy/+page.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @type {import('./$types').PageLoad} */ -export function load() { - return { - metadata: { - title: 'privacy.policy.seo.title', - description: 'privacy.policy.seo.description', - keywords: 'privacy.policy.seo.keywords', - url: 'privacy.policy.seo.url', - image: 'privacy.policy.seo.image', - }, - }; -} diff --git a/src/routes/privacy-policy/+page.svelte b/src/routes/privacy-policy/+page.svelte index 25fb084..c4d6638 100644 --- a/src/routes/privacy-policy/+page.svelte +++ b/src/routes/privacy-policy/+page.svelte @@ -1,15 +1,14 @@ - +

{$t('privacy.policy.title')}

diff --git a/src/routes/support-us/+page.js b/src/routes/support-us/+page.js deleted file mode 100644 index 8074bda..0000000 --- a/src/routes/support-us/+page.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @type {import('./$types').PageLoad} */ -export function load() { - return { - metadata: { - title: 'support-us.seo.title', - description: 'support-us.seo.description', - keywords: 'support-us.seo.keywords', - url: 'support-us.seo.url', - image: 'support-us.seo.image', - }, - }; -} diff --git a/src/routes/support-us/+page.svelte b/src/routes/support-us/+page.svelte index fff8723..acb1619 100644 --- a/src/routes/support-us/+page.svelte +++ b/src/routes/support-us/+page.svelte @@ -4,20 +4,19 @@ import { isMobile } from '$lib/utils/isMobile'; import BuyMeACoffeeIcon from '$lib/components/icons/BuyMeACoffeeIcon.svelte'; - import Seo from '$lib/components/Seo.svelte'; - - /** @type {import('./$types').PageProps} */ - let { data } = $props(); - - // svelte-ignore state_referenced_locally - const metadata = data.metadata; + import Head from '$lib/components/Head.svelte'; const backgroundImage = isMobile() ? `${PUBLIC_IMAGE_BASE_URL}/t/f_webp/embroidery-viewer/route-wallpaper-mobile.webp` : `${PUBLIC_IMAGE_BASE_URL}/t/f_webp,w_1920,h_1080/embroidery-viewer/route-wallpaper.webp`; - +
import { t } from '$lib/translations'; - import Seo from '$lib/components/Seo.svelte'; - - /** @type {import('./$types').PageProps} */ - let { data } = $props(); - - // svelte-ignore state_referenced_locally - const metadata = data.metadata; + import Head from '$lib/components/Head.svelte'; - +

{$t('terms.of.service.title')}

diff --git a/src/routes/viewer/+page.svelte b/src/routes/viewer/+page.svelte index 45e997c..fc7ece2 100644 --- a/src/routes/viewer/+page.svelte +++ b/src/routes/viewer/+page.svelte @@ -6,7 +6,7 @@ import CardList from '$lib/components/CardList.svelte'; import Dropzone from '$lib/components/Dropzone.svelte'; import FileList from '$lib/components/FileList.svelte'; - import Seo from '$lib/components/Seo.svelte'; + import Head from '$lib/components/Head.svelte'; import { filterFiles } from '$lib/utils/filterFiles'; import { supportedFormats } from '$lib/format-readers'; @@ -78,15 +78,14 @@ if (el) el.click(); } } - - /** @type {import('./$types').PageProps} */ - let { data } = $props(); - - // svelte-ignore state_referenced_locally - const metadata = data.metadata; - +
diff --git a/static/ads.txt b/static/ads.txt deleted file mode 100644 index fc2c368..0000000 --- a/static/ads.txt +++ /dev/null @@ -1 +0,0 @@ -google.com, pub-5761689301112420, DIRECT, f08c47fec0942fa0 diff --git a/static/favicon.png b/static/favicon.png deleted file mode 100644 index 825b9e65af7c104cfb07089bb28659393b4f2097..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>B?-(Hr@X&W@|R-$}W@Z zgj#$x=!~7LGqHW?IO8+*oE1MyDp!G=L0#^lUx?;!fXv@l^6SvTnf^ac{5OurzC#ZMYc20lI%HhX816AYVs1T3heS1*WaWH z%;x>)-J}YB5#CLzU@GBR6sXYrD>Vw(Fmt#|JP;+}<#6b63Ike{Fuo!?M{yEffez;| zp!PfsuaC)>h>-AdbnwN13g*1LowNjT5?+lFVd#9$!8Z9HA|$*6dQ8EHLu}U|obW6f z2%uGv?vr=KNq7YYa2Roj;|zooo<)lf=&2yxM@e`kM$CmCR#x>gI>I|*Ubr({5Y^rb zghxQU22N}F51}^yfDSt786oMTc!W&V;d?76)9KXX1 z+6Okem(d}YXmmOiZq$!IPk5t8nnS{%?+vDFz3BevmFNgpIod~R{>@#@5x9zJKEHLHv!gHeK~n)Ld!M8DB|Kfe%~123&Hz1Z(86nU7*G5chmyDe ziV7$pB7pJ=96hpxHv9rCR29%bLOXlKU<_13_M8x)6;P8E1Kz6G<&P?$P^%c!M5`2` zfY2zg;VK5~^>TJGQzc+33-n~gKt{{of8GzUkWmU110IgI0DLxRIM>0US|TsM=L|@F z0Bun8U!cRB7-2apz=y-7*UxOxz@Z0)@QM)9wSGki1AZ38ceG7Q72z5`i;i=J`ILzL z@iUO?SBBG-0cQuo+an4TsLy-g-x;8P4UVwk|D8{W@U1Zi z!M)+jqy@nQ$p?5tsHp-6J304Q={v-B>66$P0IDx&YT(`IcZ~bZfmn11#rXd7<5s}y zBi9eim&zQc0Dk|2>$bs0PnLmDfMP5lcXRY&cvJ=zKxI^f0%-d$tD!`LBf9^jMSYUA zI8U?CWdY@}cRq6{5~y+)#h1!*-HcGW@+gZ4B};0OnC~`xQOyH19z*TA!!BJ%9s0V3F?CAJ{hTd#*tf+ur-W9MOURF-@B77_-OshsY}6 zOXRY=5%C^*26z?l)1=$bz30!so5tfABdSYzO+H=CpV~aaUefmjvfZ3Ttu9W&W3Iu6 zROlh0MFA5h;my}8lB0tAV-Rvc2Zs_CCSJnx@d`**$idgy-iMob4dJWWw|21b4NB=LfsYp0Aeh{Ov)yztQi;eL4y5 zMi>8^SzKqk8~k?UiQK^^-5d8c%bV?$F8%X~czyiaKCI2=UH Date: Thu, 30 Apr 2026 13:08:05 -0300 Subject: [PATCH 2/2] chore: update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 061d5c7..bfa32c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "embroidery-viewer", "private": true, - "version": "3.0.2", + "version": "3.0.3", "type": "module", "scripts": { "dev": "vite dev",