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}
+
) : (