@@ -7,6 +7,7 @@ import React, { createRef, useEffect, useState } from 'react'
77import ReactGA from 'react-ga'
88import ReCAPTCHA from 'react-google-recaptcha'
99import { FaAngleDoubleDown , FaAngleDoubleUp } from 'react-icons/fa'
10+ import { annotate } from 'rough-notation'
1011import TypeIt from 'typeit-react'
1112import { createApi } from 'unsplash-js'
1213
@@ -23,7 +24,7 @@ import {
2324} from '@/components/navbar'
2425import 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