From 28d0e36ee77437dc6a2613a668af2cbab8f6507b Mon Sep 17 00:00:00 2001 From: aleidk Date: Sat, 6 Apr 2024 18:30:46 -0300 Subject: [PATCH] feat(Localization): add more text in landing page --- public/locales/en/translation.json | 16 ++++++- public/locales/es/translation.json | 15 +++++-- src/assets/icons/email.svg | 9 ++++ src/assets/icons/github.svg | 7 +++ src/assets/icons/linkedin.svg | 7 +++ src/assets/style/_utils.scss | 16 +++++++ src/pages/es/index.astro | 19 ++++---- src/pages/index.astro | 72 +++++++++++++++++------------- 8 files changed, 117 insertions(+), 44 deletions(-) create mode 100644 src/assets/icons/email.svg create mode 100644 src/assets/icons/github.svg create mode 100644 src/assets/icons/linkedin.svg diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index ae10e63..b3ba4c5 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -1,5 +1,17 @@ { "titles": { - "featuredWork": "Featured Work" - } + "featuredWork": "Featured Work", + "whatIveBeenUpTo": "What I've been up to...", + "whoAmI": "Who am I?", + "contact": "Contact" + }, + "home": { + "moreProjects": "View more projects", + "viewCurriculum": "View full curriculum" + }, + "misc": { + "seeMore": "See more..." + }, + "blog": "blog", + "games": "games" } diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index d5142e7..89044a6 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -1,8 +1,17 @@ { "titles": { - "featuredWork": "Trabajo Destacado" + "featuredWork": "Trabajo Destacado", + "whatIveBeenUpTo": "Que he estado haciendo...", + "whoAmI": "¿Quién soy?", + "contact": "Contacto" }, "home": { - "brief": "I like to code stuff, then watch my creations come to life and do things for me!" - } + "moreProjects": "Ver más proyectos", + "viewCurriculum": "Ver curriculum completo" + }, + "misc": { + "seeMore": "Ver más..." + }, + "blog": "blog", + "games": "juegos" } diff --git a/src/assets/icons/email.svg b/src/assets/icons/email.svg new file mode 100644 index 0000000..ba4a6cb --- /dev/null +++ b/src/assets/icons/email.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/github.svg b/src/assets/icons/github.svg new file mode 100644 index 0000000..a19367a --- /dev/null +++ b/src/assets/icons/github.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/linkedin.svg b/src/assets/icons/linkedin.svg new file mode 100644 index 0000000..eb0c526 --- /dev/null +++ b/src/assets/icons/linkedin.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/assets/style/_utils.scss b/src/assets/style/_utils.scss index 35aa187..3beaa64 100644 --- a/src/assets/style/_utils.scss +++ b/src/assets/style/_utils.scss @@ -311,3 +311,19 @@ .border-radius { border-radius: var(--prj-border-radius); } + +.text-none { + text-transform: none; +} +.text-capitalize { + text-transform: capitalize; +} +.text-uppercase { + text-transform: uppercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-lowercase { + text-transform: lowercase; +} diff --git a/src/pages/es/index.astro b/src/pages/es/index.astro index c910a86..1aead2b 100644 --- a/src/pages/es/index.astro +++ b/src/pages/es/index.astro @@ -59,7 +59,7 @@ const portafolio = [

{data.brief}

- See more... + {t('misc.seeMore')}
@@ -68,16 +68,18 @@ const portafolio = [
- +
-

What I've been up to...

+

{t('titles.whatIveBeenUpTo')}

@@ -249,4 +250,4 @@ const portafolio = [ } } - +out> out> diff --git a/src/pages/index.astro b/src/pages/index.astro index b72f82a..3e42e99 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,20 +1,25 @@ --- -import { getCollection, getEntry } from "astro:content"; -import { t, changeLanguage } from "i18next"; -import Layout from "../layouts/Layout.astro"; -import Card from "../components/Card.astro"; -import LocalizedMarkdown from "@components/LocalizedMarkdown.astro"; -import Button from "../components/Button/Button.astro"; -import { Image } from "astro:assets"; -import portrait from "../assets/images/portrait.jpg"; +import { getCollection, getEntry } from 'astro:content'; +import { t, changeLanguage } from 'i18next'; +import Layout from '../layouts/Layout.astro'; +import Card from '../components/Card.astro'; +import LocalizedMarkdown from '@components/LocalizedMarkdown.astro'; +import Button from '../components/Button/Button.astro'; +import { Image } from 'astro:assets'; +import portrait from '../assets/images/portrait.jpg'; +import iconEmail from '../assets/icons/email.svg'; +import iconLinkedin from '../assets/icons/linkedin.svg'; +import iconGithub from '../assets/icons/github.svg'; -changeLanguage("en"); +changeLanguage('en'); -const blog = await getCollection("blog", ({ data }) => import.meta.env.PROD ? data.draft !== true : true); +const blog = await getCollection('blog', ({ data }) => + import.meta.env.PROD ? data.draft !== true : true, +); const portafolio = [ - await getEntry("portafolio", "piloto-go"), - await getEntry("portafolio", "destino-temuco"), - await getEntry("portafolio", "sercotec"), + await getEntry('portafolio', 'piloto-go'), + await getEntry('portafolio', 'destino-temuco'), + await getEntry('portafolio', 'sercotec'), ]; --- @@ -59,7 +64,7 @@ const portafolio = [

{data.brief}

- See more... + {t('misc.seeMore')}
@@ -68,16 +73,18 @@ const portafolio = [
- +
-

What I've been up to...

+

{t('titles.whatIveBeenUpTo')}

-

Contact

+

{t('titles.contact')}

@@ -196,20 +202,20 @@ const portafolio = [ { [ { - link: '#', - img: 'https://placehold.co/60', + link: 'https://github.com/aleee-idk', + img: iconGithub, alt: '', text: 'Github', }, { - link: '#', - img: 'https://placehold.co/60', + link: 'https://www.linkedin.com/in/alexander-navarro-parra-0516062a3', + img: iconLinkedin, alt: '', text: 'Linkedin', }, { - link: '#', - img: 'https://placehold.co/60', + link: 'mailto:ale.navarro.parra@gmail.com', + img: iconEmail, alt: '', text: 'Email', }, @@ -217,10 +223,16 @@ const portafolio = [
  • <> - {item.alt} + {item.alt} {item.text} @@ -249,4 +261,4 @@ const portafolio = [ } } - +out> out>