@@ -7,6 +7,7 @@ import React, { createRef, useEffect, useState } from 'react'
7
7
import ReactGA from 'react-ga'
8
8
import ReCAPTCHA from 'react-google-recaptcha'
9
9
import { FaAngleDoubleDown , FaAngleDoubleUp } from 'react-icons/fa'
10
+ import { annotate } from 'rough-notation'
10
11
import TypeIt from 'typeit-react'
11
12
import { createApi } from 'unsplash-js'
12
13
@@ -23,7 +24,7 @@ import {
23
24
} from '@/components/navbar'
24
25
import useScript from '@/components/useScript'
25
26
26
- const Home = ( { bio, avatar_url, blog, email, randomE } ) => {
27
+ const Home = ( { bio, avatar_url, blog, email, randomE, tracking = false } ) => {
27
28
const recaptchaRef = createRef ( )
28
29
29
30
const [ isLoadPet , setIsLoadPet ] = useState ( 0 )
@@ -32,7 +33,7 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
32
33
const [ showMoreOptions , setShowMoreOptions ] = useState ( false )
33
34
34
35
useEffect ( ( ) => {
35
- ReactGA . initialize ( process . env . TRACKING_ID )
36
+ tracking && ReactGA . initialize ( tracking )
36
37
recaptchaRef . current . execute ( )
37
38
ReactGA . set ( { page : window . location . pathname } )
38
39
ReactGA . pageview ( window . location . pathname )
@@ -53,7 +54,7 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
53
54
} , [ statusScript ] )
54
55
55
56
const isOnline = ( ) => {
56
- const hours = new Date ( ) . getHours ( )
57
+ const hours = new Date ( ) . getHours ( ) - 5
57
58
return hours > 8 && hours < 20
58
59
}
59
60
@@ -144,8 +145,10 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
144
145
>
145
146
< div className = { 'max-w-[18rem] my-3 select-none' } >
146
147
< 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. { ' ' }
148
150
< TypeIt
151
+
149
152
options = { {
150
153
speed : 50 ,
151
154
waitUntilVisible : true ,
@@ -158,15 +161,34 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
158
161
} }
159
162
getBeforeInit = { ( instance ) => {
160
163
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 ' )
162
170
. pause ( 750 )
163
171
. delete ( 2 )
164
172
. 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 ' )
166
174
. pause ( 750 )
167
175
. delete ( 2 )
168
176
. pause ( 500 )
169
177
. 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
+ } )
170
192
171
193
return instance
172
194
} }
@@ -224,7 +246,7 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
224
246
)
225
247
}
226
248
227
- export async function getStaticProps ( ) {
249
+ export async function getStaticProps ( ) {
228
250
const octokit = new Octokit ( { auth : process . env . TOKEN_GITHUB } )
229
251
230
252
const response = await octokit . request ( 'GET /user' )
@@ -243,9 +265,11 @@ export async function getStaticProps () {
243
265
? filterResults . urls . full
244
266
: ''
245
267
268
+ const tracking = process . env . TRACKING_ID ?? false
269
+
246
270
return {
247
271
props : {
248
- bio, avatar_url, blog, email, randomE
272
+ bio, avatar_url, blog, email, randomE, tracking
249
273
}
250
274
}
251
275
}
0 commit comments