From 3ed99ca29b47a80576fd93a44b58212bc22215ba Mon Sep 17 00:00:00 2001 From: jamerrq Date: Mon, 18 Mar 2024 22:21:49 -0500 Subject: [PATCH] chore: some fixes and styles --- .../featured-and-projects/projects.tsx | 17 +++++++++++-- .../featured-and-projects/resources.tsx | 24 +++++++++++++++++-- src/components/main/project.astro | 15 ++++-------- src/components/main/socials.astro | 8 ++++--- src/components/main/tech-stack.astro | 2 +- src/data/blog.json | 2 +- 6 files changed, 49 insertions(+), 19 deletions(-) diff --git a/src/components/featured-and-projects/projects.tsx b/src/components/featured-and-projects/projects.tsx index fad3a5a..d602581 100644 --- a/src/components/featured-and-projects/projects.tsx +++ b/src/components/featured-and-projects/projects.tsx @@ -70,7 +70,8 @@ const BUTTONS_STYLES = [ 'rounded-md', 'flex', 'items-center', - 'p-1' + 'p-1', + 'shadow-md shadow-black/90' ].join(' ') const DoubleLeftButton = ({ _f }: { _f: () => void }) => ( @@ -103,13 +104,25 @@ function ResourceCard({ const goRight = () => { index.value++ if (index.value > data.length - 1) index.value = 0 + // insert the 'animate-fade-in-left' class + const el = document.querySelector('#project-card') + el?.classList.add('animate-fade-in-left') + el?.addEventListener('animationend', () => { + el?.classList.remove('animate-fade-in-left') + }) } const goLeft = () => { index.value-- if (index.value < 0) index.value = data.length - 1 + // insert the 'animate-fade-in-left' class + const el = document.querySelector('#project-card') + el?.classList.add('animate-fade-in-left') + el?.addEventListener('animationend', () => { + el?.classList.remove('animate-fade-in-left') + }) } return ( -
+
{i === 0 && } {project?.featured && ( diff --git a/src/components/featured-and-projects/resources.tsx b/src/components/featured-and-projects/resources.tsx index 67879a0..53fb887 100644 --- a/src/components/featured-and-projects/resources.tsx +++ b/src/components/featured-and-projects/resources.tsx @@ -4,7 +4,7 @@ const RESOURCE_STYLES: string = [ 'col-span-2', 'row-span-4', 'rounded-sm', - 'shadow-[0_0_0.3rem_rgb(8_51_68)]', // rgb(8, 51, 68) + 'shadow-[0_0_0.1rem_rgb(8_51_68)]', // rgb(8, 51, 68) 'flex', 'flex-col', 'gap-2', @@ -49,7 +49,8 @@ const BUTTONS_STYLES = [ 'items-center', 'justify-center', 'py-1', - 'px-0.5' + 'px-0.5', + 'shadow-md shadow-black/90' ].join(' ') import { shuffle } from '@utils' @@ -92,10 +93,20 @@ export default function Resources({ n = 3 }: ResourceProps) { const goRight = () => { index.value++ if (index.value > data.length - 1) index.value = 0 + const lastResource = document.getElementById('last-resource') + lastResource?.classList.add('animate-fade-in-left') + lastResource?.addEventListener('animationend', () => { + lastResource?.classList.remove('animate-fade-in-left') + }) } const goLeft = () => { index.value-- if (index.value < 0) index.value = data.length - 1 + const firstResource = document.getElementById('first-resource') + firstResource?.classList.add('animate-fade-in-right') + firstResource?.addEventListener('animationend', () => { + firstResource?.classList.remove('animate-fade-in-right') + }) } return ( @@ -107,6 +118,15 @@ export default function Resources({ n = 3 }: ResourceProps) {
{i === 0 && } {i === 1 && } diff --git a/src/components/main/project.astro b/src/components/main/project.astro index 373e1e1..b33f717 100644 --- a/src/components/main/project.astro +++ b/src/components/main/project.astro @@ -35,20 +35,15 @@ import { Image } from 'astro:assets' class='grid justify-items-center items-center gap-1 [&>*]:text-center relative [&>*]:rounded-sm [&>span]:text-sm [&>span]:xl:text-base' >
{project?.time}+ {lang === 'en' ? 'months' : 'meses'}
- -

- {lang === 'en' ? project?.title.en : project?.title.es} -

-
+ {lang === 'en' ? project?.title.en : project?.title.es} +
jamerrq@gmail.com
diff --git a/src/components/main/tech-stack.astro b/src/components/main/tech-stack.astro index 8d10396..4e63f84 100644 --- a/src/components/main/tech-stack.astro +++ b/src/components/main/tech-stack.astro @@ -22,7 +22,7 @@ const TECH_STACK_STYLES: string = [ 'dark:bg-slate-900', 'hover:scale-[1.02]', 'hover:transition-all', - 'text-2xl' + 'text-2xl', // 'animate-blurred-fade-in', // 'animate-delay-300' ].join(' ') diff --git a/src/data/blog.json b/src/data/blog.json index 8ebd15a..d32e459 100644 --- a/src/data/blog.json +++ b/src/data/blog.json @@ -79,7 +79,7 @@ "date": "2024-Mar-14", "titleEs": "Cómo convertir tu app de astro en una PWA", "href": "blog/convert-astro-app-to-pwa", - "hrefEs": "blog/convertir-app-astro-a-pwa", + "hrefEs": "blog/convertir-astro-app-en-pwa", "readTimeMins": "5", "tags": [ "astro",