Skip to content

Commit 89ba665

Browse files
committed
mejora algo el portaolio
1 parent 7dc3495 commit 89ba665

File tree

5 files changed

+424
-400
lines changed

5 files changed

+424
-400
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"next/core-web-vitals"
1515
],
1616
"rules": {
17+
"space-before-function-paren": "off",
1718
"simple-import-sort/imports": "error",
1819
"simple-import-sort/exports": "error",
1920
"indent": [

.vscode/settings.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@
44
"activityBar.background": "#183231",
55
"titleBar.activeBackground": "#214644",
66
"titleBar.activeForeground": "#F8FCFC"
7-
}
8-
}
7+
},
8+
"eslint.validate": [
9+
"javascript",
10+
"javascriptreact",
11+
"typescript",
12+
"typescriptreact"
13+
],
14+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"react-ga": "3.3.1",
2222
"react-google-recaptcha": "2.1.0",
2323
"react-icons": "4.8.0",
24-
"react-rough-notation": "^1.0.3",
24+
"rough-notation": "^0.5.1",
2525
"typeit-react": "2.6.4",
2626
"unsplash-js": "7.0.15"
2727
},

pages/index.js

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import React, { createRef, useEffect, useState } from 'react'
77
import ReactGA from 'react-ga'
88
import ReCAPTCHA from 'react-google-recaptcha'
99
import { FaAngleDoubleDown, FaAngleDoubleUp } from 'react-icons/fa'
10+
import { annotate } from 'rough-notation'
1011
import TypeIt from 'typeit-react'
1112
import { createApi } from 'unsplash-js'
1213

@@ -23,7 +24,7 @@ import {
2324
} from '@/components/navbar'
2425
import useScript from '@/components/useScript'
2526

26-
const Home = ({ bio, avatar_url, blog, email, randomE }) => {
27+
const Home = ({ bio, avatar_url, blog, email, randomE, tracking = false }) => {
2728
const recaptchaRef = createRef()
2829

2930
const [isLoadPet, setIsLoadPet] = useState(0)
@@ -32,7 +33,7 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
3233
const [showMoreOptions, setShowMoreOptions] = useState(false)
3334

3435
useEffect(() => {
35-
ReactGA.initialize(process.env.TRACKING_ID)
36+
tracking && ReactGA.initialize(tracking)
3637
recaptchaRef.current.execute()
3738
ReactGA.set({ page: window.location.pathname })
3839
ReactGA.pageview(window.location.pathname)
@@ -53,7 +54,7 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
5354
}, [statusScript])
5455

5556
const isOnline = () => {
56-
const hours = new Date().getHours()
57+
const hours = new Date().getHours() - 5
5758
return hours > 8 && hours < 20
5859
}
5960

@@ -144,8 +145,10 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
144145
>
145146
<div className={'max-w-[18rem] my-3 select-none'}>
146147
<p className='text-sm text-justify md:pt-1'>
147-
I am a full-stack developer focused on WS integrations with Artificial Intelligence from the cloud. {' '}
148+
I am a Solution Architect focused on WS integrations with <span id="animate-01">Artificial Intelligence</span> from the cloud. {' '}
149+
from the cloud. {' '}
148150
<TypeIt
151+
149152
options={{
150153
speed: 50,
151154
waitUntilVisible: true,
@@ -158,15 +161,34 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
158161
}}
159162
getBeforeInit={(instance) => {
160163
instance
161-
.type('I have solid experience in technologies like Javascript/NodeJS (7 ')
164+
.exec(() => {
165+
const annotation1 = annotate(document.querySelector('#animate-01'), { type: 'highlight', color: '#FFD700' })
166+
annotation1.show()
167+
})
168+
.pause(500)
169+
.type('I have solid experience in technologies like <span id="animate-02">Javascript/NodeJS</span> (7 ')
162170
.pause(750)
163171
.delete(2)
164172
.pause(500)
165-
.type('8 years), Python (4 years), PHP (10 ')
173+
.type('8 years), <span id="animate-03">Python</span> (4 years), <span id="animate-04">PHP</span> (10 ')
166174
.pause(750)
167175
.delete(2)
168176
.pause(500)
169177
.type('1 years), also other technologies <span class="font-bold">awesome.!</span>')
178+
.exec(() => {
179+
const annotation = annotate(document.querySelector('#animate-02'), { type: 'circle', color: '#F44336' })
180+
annotation.show()
181+
})
182+
.pause(1000)
183+
.exec(() => {
184+
const annotation = annotate(document.querySelector('#animate-03'), { type: 'circle', color: '#F44336' })
185+
annotation.show()
186+
})
187+
.pause(1000)
188+
.exec(() => {
189+
const annotation = annotate(document.querySelector('#animate-04'), { type: 'circle', color: '#F44336' })
190+
annotation.show()
191+
})
170192

171193
return instance
172194
}}
@@ -224,7 +246,7 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
224246
)
225247
}
226248

227-
export async function getStaticProps () {
249+
export async function getStaticProps() {
228250
const octokit = new Octokit({ auth: process.env.TOKEN_GITHUB })
229251

230252
const response = await octokit.request('GET /user')
@@ -243,9 +265,11 @@ export async function getStaticProps () {
243265
? filterResults.urls.full
244266
: ''
245267

268+
const tracking = process.env.TRACKING_ID ?? false
269+
246270
return {
247271
props: {
248-
bio, avatar_url, blog, email, randomE
272+
bio, avatar_url, blog, email, randomE, tracking
249273
}
250274
}
251275
}

0 commit comments

Comments
 (0)