diff --git a/bun.lockb b/bun.lockb index 4c833ee..282a714 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 4d2731a..2da7259 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "eslint-plugin-jsx-a11y": "^6.8.0", "husky": "^8.0.3", "jest": "^29.7.0", + "postcss-nesting": "^12.1.1", "prettier": "^3.1.1", "prettier-config-standard": "^7.0.0", "prettier-plugin-astro": "^0.12.3", diff --git a/postcss.config.mjs b/postcss.config.mjs index ecd53dd..6e873ab 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -1,6 +1,6 @@ export default { plugins: { - // "tailwindcss/nesting": "postcss-nesting", + "tailwindcss/nesting": "postcss-nesting", tailwindcss: {}, autoprefixer: {}, }, diff --git a/src/components/featured-and-projects/projects.tsx b/src/components/featured-and-projects/projects.tsx index 4d8d2e7..4e05866 100644 --- a/src/components/featured-and-projects/projects.tsx +++ b/src/components/featured-and-projects/projects.tsx @@ -9,6 +9,9 @@ const featured = shuffledData.filter((project) => project.featured) const notFeatured = shuffledData.filter((project) => !project.featured) const concatedData = featured.concat(notFeatured) +const screenWidth = window.innerWidth +const isScreenWidthEnough = screenWidth >= 1024 + const PROJECT_STYLES: string = [ 'col-span-6', 'row-span-4', @@ -22,7 +25,7 @@ const PROJECT_STYLES: string = [ 'font-bold', 'font-rubik-doodle', 'w-full', - 'h-80', + 'h-72', 'xl:h-full', 'transition-all', 'text-emerald-950', @@ -35,7 +38,8 @@ const PROJECT_STYLES: string = [ 'text-center' ].join(' ') -import { signal } from '@preact/signals' +import { signal, effect } from '@preact/signals' + const index = signal(0) const imagesIndex = signal(0) @@ -56,7 +60,15 @@ function SimpleIcon(key: string) { } const Icon = simpleIcons[key as keyof toExportType] if (typeof Icon === 'function') { - return + // return icon with title + return ( +
+ + + {key.split(' ').at(0)} + +
+ ) } return h('fragment', {}) } @@ -65,7 +77,7 @@ const BUTTONS_STYLES = [ 'absolute', 'bg-cyan-300', 'rounded-md', - 'flex', + 'hidden xl:flex', 'items-center', 'p-1', 'shadow-md shadow-black/90' @@ -203,16 +215,39 @@ function ResourceCard({ )} -
- {/*

Images

*/} - {project?.images && } -
+ {isScreenWidthEnough && ( +
+ {/*

Images

*/} + {project?.images && } +
+ )} {i === n - 1 && } ) } +const n = concatedData.length + +effect(() => { + let mainInterval = setInterval(() => { + index.value++ + if (index.value >= n) { + index.value = 0 + } + }, 21000) + let imagesInterval = setInterval(() => { + imagesIndex.value++ + if (imagesIndex.value >= concatedData[index.value].images.length) { + imagesIndex.value = 0 + } + }, 7000) + return function () { + clearInterval(mainInterval) + clearInterval(imagesInterval) + } +}) + export default function Resources({ n = 1, lang = 'en' }: ResourcesProps) { return ( <> diff --git a/src/components/featured-and-projects/resources.tsx b/src/components/featured-and-projects/resources.tsx index 198cf30..f369bed 100644 --- a/src/components/featured-and-projects/resources.tsx +++ b/src/components/featured-and-projects/resources.tsx @@ -6,15 +6,15 @@ const RESOURCE_STYLES: string = [ 'rounded-sm', 'shadow-[0_0_0.1rem_rgb(8_51_68)]', // rgb(8, 51, 68) 'flex', - 'flex-col', - 'gap-0', + 'xl:flex-col', + 'gap-5', 'items-center', 'justify-center', 'font-bold', 'font-rubik-doodle', 'w-full', 'xl:h-full', - 'h-[15%]', + 'h-16', 'transition-all', 'text-cyan-950', 'dark:text-cyan-300', @@ -25,7 +25,7 @@ const RESOURCE_STYLES: string = [ 'relative' ].join(' ') -import { signal } from '@preact/signals' +import { signal, effect } from '@preact/signals' const index = signal(0) import { Fragment } from 'preact/jsx-runtime' @@ -87,6 +87,20 @@ const DoubleRightButton = ({ _f }: { _f: () => void }) => ( ) +const n = data.length + +effect(() => { + let interval = setInterval(() => { + index.value++ + if (index.value >= n) { + index.value = 0 + } + }, 14000) + return function () { + clearInterval(interval) + } +}) + export default function Resources({ n = 3 }: ResourceProps) { const goRight = () => { index.value++ diff --git a/src/components/icons/icon.astro b/src/components/icons/icon.astro index e113584..338d426 100644 --- a/src/components/icons/icon.astro +++ b/src/components/icons/icon.astro @@ -23,6 +23,9 @@ const { svg, hex = '#000', href = '', title = 'Generic Icon' } = Astro.props set:html={svg} fill={hex} /> + + {title === 'Curriculum Vitae' ? 'CV' : title} + ) : ( { lang === 'en' - ? 'The best way to achieve something is by starting it' - : 'La mejor forma de lograr algo es comenzándolo' + ? 'The best (and only) way to achieve something is by starting it' + : 'La mejor (y única) forma de lograr algo es comenzándolo' }

diff --git a/src/components/main/container.astro b/src/components/main/container.astro index 5646d41..7132b86 100644 --- a/src/components/main/container.astro +++ b/src/components/main/container.astro @@ -8,8 +8,8 @@ justify-items: center; color: white; border-radius: 0.5rem; - background-color: #1b383c; - font-family: 'Rubik Doodle Shadow', sans-serif; + background-color: #1b383c66; + font-family: 'Rubik Doodle Subset', sans-serif; text-align: center; padding: 1rem; box-shadow: 0 0.05rem 0 0.1rem #000; diff --git a/src/components/main/project.astro b/src/components/main/project.astro index e059e51..a5fe03b 100644 --- a/src/components/main/project.astro +++ b/src/components/main/project.astro @@ -27,8 +27,8 @@ const project = projects.at(index) as Project const SVGS_STYLES = [ 'w-5', 'h-5', - 'xl:w-8', - 'xl:h-8', + 'xl:w-7', + 'xl:h-7', 'hover:scale-110', 'shadow bg-white/50 p-1 rounded dark:bg-slate-900/80' ].join(' ') @@ -58,7 +58,7 @@ import { Image } from 'astro:assets' loading='eager' class='aspect-[4/3] w-40' /> -
{ project.technologies.map((t) => { diff --git a/src/components/main/socials.astro b/src/components/main/socials.astro index 102ae95..ec3ddab 100644 --- a/src/components/main/socials.astro +++ b/src/components/main/socials.astro @@ -16,11 +16,11 @@ import getIconsFn from '@data/socials.ts' const socials = getIconsFn(lang) --- - +
-

Contact

+

Contact Links

diff --git a/src/components/main/working-on.tsx b/src/components/main/working-on.tsx index c0685d3..4f2483b 100644 --- a/src/components/main/working-on.tsx +++ b/src/components/main/working-on.tsx @@ -43,15 +43,16 @@ interface ProjectCardProps { } } -function getIndexBasedOnDay() { - const date = new Date().toLocaleString('es-CO', { - timeZone: 'America/Bogota' - }) - const day = +(date.replace(/,(.*)/g, '')?.split('/')?.at(0) ?? 0) - return day % projects.length -} +// function getIndexBasedOnMonth() { +// const date = new Date().toLocaleString('es-CO', { +// timeZone: 'America/Bogota' +// }) +// const month = +(date.replace(/,(.*)/g, '')?.split('/')?.at(1) ?? 0) +// const index = month % projects.length +// return index +// } -const index = signal(getIndexBasedOnDay()) +const index = signal(0) const n = projects?.length ?? 0 import { IndexPicker } from '@components/featured-and-projects/projects' @@ -65,19 +66,20 @@ function ProjectCard({ lang = 'en', project }: ProjectCardProps) {
{days}+ {lang === 'en' ? 'days' : 'días'}
+

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

-
+
{`snap -
diff --git a/src/data/projects.json b/src/data/projects.json index 12e90b1..2c17361 100644 --- a/src/data/projects.json +++ b/src/data/projects.json @@ -186,7 +186,7 @@ "React", "Tailwind CSS", "Express", - "PostgresSql", + "PostgreSQL", "NodeJS" ], "private": true, @@ -215,7 +215,8 @@ "demo": "https://www.freecodecamp.org/certification/jamerrq/foundational-c-sharp-with-microsoft", "repository": "https://github.com/jamerrq/Foundational-CSharp-with-Microsoft", "images": [ - "foundational-csharp-microsoft.webp" + "foundational-csharp-microsoft.webp", + "foundational-csharp-microsoft-2.webp" ] }, { diff --git a/src/data/working-on.json b/src/data/working-on.json index 56beaba..993887c 100644 --- a/src/data/working-on.json +++ b/src/data/working-on.json @@ -51,8 +51,7 @@ }, "image": "/img/working-on/leetcode.webp", "technologies": [ - "Python", - "JavaScript" + "Python" ], "private": "false", "time": "2", diff --git a/src/imgs/projects/foundational-csharp-microsoft-2.webp b/src/imgs/projects/foundational-csharp-microsoft-2.webp new file mode 100644 index 0000000..cb16d38 Binary files /dev/null and b/src/imgs/projects/foundational-csharp-microsoft-2.webp differ diff --git a/src/imgs/projects/foundational-csharp-microsoft.webp b/src/imgs/projects/foundational-csharp-microsoft.webp index 637d6d3..a88fcf9 100644 Binary files a/src/imgs/projects/foundational-csharp-microsoft.webp and b/src/imgs/projects/foundational-csharp-microsoft.webp differ diff --git a/src/imgs/projects/js-algorithms.webp b/src/imgs/projects/js-algorithms.webp index 0e16e28..32464ea 100644 Binary files a/src/imgs/projects/js-algorithms.webp and b/src/imgs/projects/js-algorithms.webp differ diff --git a/src/imgs/projects/responsive-web-design.webp b/src/imgs/projects/responsive-web-design.webp index 0d55830..112726b 100644 Binary files a/src/imgs/projects/responsive-web-design.webp and b/src/imgs/projects/responsive-web-design.webp differ diff --git a/src/pages/404.astro b/src/pages/404.astro index e81736e..4d882ad 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -50,7 +50,7 @@ import Container from '@components/main/container.astro' a, button { - font-family: 'Rubik Doodle Shadow', sans-serif; + font-family: 'Rubik Doodle Subset', sans-serif; } diff --git a/src/pages/blog/convert-astro-app-to-pwa.mdx b/src/pages/blog/convert-astro-app-to-pwa.mdx index 078badb..f482e50 100644 --- a/src/pages/blog/convert-astro-app-to-pwa.mdx +++ b/src/pages/blog/convert-astro-app-to-pwa.mdx @@ -9,9 +9,8 @@ import Code from '@components/main/code.astro' import { pwaSeoConfig } from '@data/codes.ts' import CityInABottle from '@movies/city-in-a-bottle.astro' -import Magic3d from '@components/ascii/magic3d.astro' - + ## First of all, what is a PWA? diff --git a/src/pages/es/blog/convertir-astro-app-en-pwa.mdx b/src/pages/es/blog/convertir-astro-app-en-pwa.mdx index b5a7a8e..f2bab61 100644 --- a/src/pages/es/blog/convertir-astro-app-en-pwa.mdx +++ b/src/pages/es/blog/convertir-astro-app-en-pwa.mdx @@ -8,6 +8,10 @@ import { Image } from 'astro:assets' import Code from '@components/main/code.astro' import { pwaSeoConfig } from '@data/codes.ts' +import CityInABottle from '@movies/city-in-a-bottle.astro' + + + ## Antes que nada ¿Qué es una PWA? Si has navegado con frequencia recientemente por la web, te habrás encontrado el diff --git a/src/styles/index.css b/src/styles/index.css index fe833df..4f8efb3 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -29,7 +29,7 @@ p { } @font-face { - font-family: 'Rubik Doodle Subset', sans-serif; + font-family: 'Rubik Doodle Subset'; src: url('/fonts/rubik-doodle-shadow-latin-400-patched.woff2') format('woff2'); font-weight: 400; font-style: normal;