-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
53,867 additions
and
477 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
"react/no-unescaped-entities": "off", | ||
"@next/next/no-page-custom-font": "off" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import NextLink from 'next/link' | ||
import { Link } from '@chakra-ui/react' | ||
import { forwardRef } from 'react' | ||
|
||
export const MenuLink = forwardRef(function MenuLink(props, ref) { | ||
return <Link ref={ref} as={NextLink} {...props} /> | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import React, { useState, useEffect } from 'react' | ||
|
||
const BinaryRain = () => { | ||
const [rainColor, setRainColor] = useState('#90EE90') // Estado para controlar el color de la lluvia | ||
const maxRainDrops = 73 // Limitamos el número máximo de gotas de lluvia | ||
|
||
useEffect(() => { | ||
generateRain() // Llama a la función para generar la lluvia cuando el componente se monta | ||
|
||
const interval = setInterval(() => { | ||
moveRainDrops() // Mueve las gotas de lluvia en cada intervalo | ||
}, 73) | ||
|
||
return () => clearInterval(interval) // Limpia el intervalo cuando el componente se desmonta | ||
}) | ||
|
||
const createRainDrop = () => { | ||
const rainDrop = document.createElement('div') | ||
rainDrop.className = 'rain-drop' | ||
rainDrop.textContent = Math.random() < 0.5 ? '1' : '0' | ||
rainDrop.style.position = 'absolute' | ||
rainDrop.style.width = '23px' | ||
rainDrop.style.height = '23px' | ||
rainDrop.style.fontSize = '23px' | ||
rainDrop.style.textAlign = 'center' | ||
rainDrop.style.color = 'var(--rain-color)' | ||
rainDrop.style.left = `${Math.random() * window.innerWidth}px` | ||
rainDrop.style.top = '0px' | ||
document.getElementById('rain-container').appendChild(rainDrop) | ||
} | ||
|
||
const generateRain = () => { | ||
for (let i = 0; i < maxRainDrops; i++) { | ||
createRainDrop() | ||
} | ||
} | ||
|
||
const moveRainDrops = () => { | ||
const rainDrops = document.querySelectorAll('.rain-drop') | ||
rainDrops.forEach(rainDrop => { | ||
const currentTop = parseFloat(rainDrop.style.top) || 0 | ||
const rainDropHeight = rainDrop.offsetHeight | ||
if (currentTop + rainDropHeight >= window.innerHeight) { | ||
rainDrop.style.top = '0px' | ||
rainDrop.style.left = `${Math.random() * window.innerWidth}px` | ||
} else { | ||
rainDrop.style.top = `${currentTop + 73}px` | ||
} | ||
}) | ||
|
||
resolveRainCollision() // Resuelve la colisión de las gotas de lluvia | ||
} | ||
|
||
const resolveRainCollision = () => { | ||
const rainDrops = document.querySelectorAll('.rain-drop') | ||
rainDrops.forEach((dropA, index) => { | ||
for (let j = index + 1; j < rainDrops.length; j++) { | ||
const dropB = rainDrops[j] | ||
if ( | ||
Math.abs(dropA.offsetLeft - dropB.offsetLeft) < 10 && | ||
Math.abs(dropA.offsetTop - dropB.offsetTop) < 10 | ||
) { | ||
dropB.style.top = `${parseFloat(dropB.style.top) + 20}px` | ||
} | ||
} | ||
}) | ||
} | ||
|
||
return ( | ||
<div | ||
id="rain-container" | ||
style={{ | ||
position: 'absolute', | ||
top: '0', | ||
left: '0', | ||
width: '100%', | ||
height: '100%', | ||
pointerEvents: 'none' | ||
}} | ||
> | ||
{/* Contenedor para las gotas de lluvia */} | ||
</div> | ||
) | ||
} | ||
|
||
export default BinaryRain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "pageProps": { "cookies": "" }, "__N_SSG": true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "pageProps": { "cookies": "" }, "__N_SSG": true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "pageProps": { "cookies": "" }, "__N_SSG": true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "pageProps": { "cookies": "" }, "__N_SSG": true } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
;(self.__BUILD_MANIFEST = (function (e) { | ||
return { | ||
__rewrites: { afterFiles: [], beforeFiles: [], fallback: [] }, | ||
'/': [e, 'static/chunks/pages/index-934c21fffb2a8f39.js'], | ||
'/404': ['static/chunks/pages/404-c912757db2feb1cd.js'], | ||
'/_error': ['static/chunks/pages/_error-ee5b5fb91d29d86f.js'], | ||
'/portfolio': [e, 'static/chunks/pages/portfolio-2ad90beecdc65ba7.js'], | ||
'/portfolio/reveal_js': [ | ||
'static/chunks/pages/portfolio/reveal_js-46dbfd912c05e87e.js' | ||
], | ||
'/portfolio/webPage': [ | ||
'static/chunks/pages/portfolio/webPage-742bde8c2558f9eb.js' | ||
], | ||
sortedPages: [ | ||
'/', | ||
'/404', | ||
'/_app', | ||
'/_error', | ||
'/portfolio', | ||
'/portfolio/reveal_js', | ||
'/portfolio/webPage' | ||
] | ||
} | ||
})('static/chunks/675-67bdaa0e55284a2f.js')), | ||
self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
self.__SSG_MANIFEST = new Set([ | ||
'\u002F', | ||
'\u002Fportfolio', | ||
'\u002Fportfolio\u002Freveal_js', | ||
'\u002Fportfolio\u002FwebPage' | ||
]) | ||
self.__SSG_MANIFEST_CB && self.__SSG_MANIFEST_CB() |
Oops, something went wrong.