Skip to content

Commit 488a782

Browse files
committed
wip
1 parent e667cf3 commit 488a782

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

components/navbar.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,24 @@ const Calendly = () => (<a title='Calendly' target="_blank"
9999
<CalendarIcon className='inline-block text-3xl transform hover:scale-125' /> {' '} Calendly
100100
</a>)
101101

102-
const AlertRobotComponent = ({ errorCaptcha }) => (errorCaptcha
103-
? (<div className="flex flex-row items-center p-5 mt-2 bg-red-200 border-b-2 border-red-300 rounded alert">
102+
const AlertRobotComponent = ({ errorCaptcha }) => (
103+
errorCaptcha &&
104+
(<div className="flex flex-row items-center max-w-sm p-5 mt-2 bg-red-200 border-b-2 border-red-300 rounded alert">
104105
<div className="flex items-center justify-center flex-shrink-0 bg-red-100 border-2 border-red-500 rounded-full alert-icon">
105-
<span className="text-red-600">
106+
<span className="p-1 text-red-600">
106107
<FaRobot size={'1.5em'} className='animate-pulse' />
107108
</span>
108109
</div>
109110
<div className="ml-4 alert-content">
110-
<div className="text-lg font-semibold text-red-800 alert-title">
111+
<div className="text-lg font-semibold text-gray-800 alert-title">
111112
¿Robot...?
112113
</div>
113-
<div className="text-sm text-red-600 alert-description">
114-
<p>Por alguna razón no pude comprobar que <br /> eres humano. Igual puedes acceder al Linkedin</p>
114+
<div className="text-sm text-gray-800 alert-description">
115+
<p>Por alguna razón no pude comprobar que eres humano. Igual puedes acceder al Linkedin.</p>
115116
</div>
116117
</div>
117118
</div>)
118-
: <></>)
119+
)
119120

120121
export {
121122
AlertRobotComponent,

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
"react-ga": "3.3.0",
2020
"react-google-recaptcha": "2.1.0",
2121
"react-icons": "4.4.0",
22-
"typeit-react": "2.3.0",
22+
"typeit-react": "2.3.3",
2323
"unsplash-js": "7.0.15"
2424
},
2525
"devDependencies": {
2626
"@babel/core": "7.18.2",
27-
"@babel/eslint-parser": "7.17.0",
27+
"@babel/eslint-parser": "7.18.2",
2828
"autoprefixer": "10.4.7",
2929
"eslint": "8.17.0",
3030
"eslint-config-eslint": "7.0.0",
3131
"eslint-config-next": "12.1.6",
32-
"eslint-config-standard": "16.0.3",
32+
"eslint-config-standard": "17.0.0",
3333
"eslint-import-resolver-typescript": "2.7.1",
3434
"eslint-plugin-jsdoc": "39.3.2",
3535
"eslint-plugin-node": "11.1.0",

pages/_document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MyDocument extends Document {
1111
<Html className={classNames(randomColorClass, 'from-gray-900 to-black')} lang='en'>
1212
<Head>
1313
<link rel="preconnect" href="https://fonts.googleapis.com" />
14-
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin={true} />
14+
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin={true.toString()} />
1515
<link href="https://fonts.googleapis.com/css2?family=Chilanka&display=swap"
1616
rel="stylesheet"
1717
/>

pages/index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ import useScript from '@/components/useScript'
2424

2525
const Home = ({ bio, avatar_url, blog, email, randomE }) => {
2626
const recaptchaRef = createRef()
27-
const [showMoreOptions, setShowMoreOptions] = useState(false)
27+
28+
const [isLoadPet, setIsLoadPet] = useState(0)
2829
const [showHuman, setShowHuman] = useState(false)
2930
const [errorCaptcha, setErrorCaptcha] = useState(false)
31+
const [showMoreOptions, setShowMoreOptions] = useState(false)
3032

3133
useEffect(() => {
3234
ReactGA.initialize(process.env.TRACKING_ID)
@@ -42,7 +44,8 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
4244
useEffect(() => {
4345
const DEFAULT_XML = window?.location?.origin + '/pets/neko.xml'
4446

45-
if (statusScript === 'ready') {
47+
if (statusScript === 'ready' && isLoadPet < 2) {
48+
setIsLoadPet(old => old + 1)
4649
// eslint-disable-next-line no-undef, new-cap
4750
new eSheep({ allowPets: 'none', allowPopup: 'no' }).Start(DEFAULT_XML)
4851
}
@@ -86,7 +89,7 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
8689
*/}
8790
<div
8891
style={{ '--bg-url': `url(${randomE})` }}
89-
className="bg-cover bg-[image:var(--bg-url)] absolute inset-0"
92+
className="bg-cover bg-[image:var(--bg-url)] absolute inset-0 blur-sm"
9093
/>
9194

9295
<div className="flex flex-col h-screen">
@@ -103,7 +106,7 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
103106
src={avatar_url}
104107
alt=""
105108
/>
106-
<span className="absolute bottom-0 right-0 block transform translate-x-1/2 border-2 border-white rounded-full">
109+
<span className="absolute bottom-0 right-0 block transform translate-x-1/2 translate-y-1/2 border-2 border-white rounded-full md:translate-y-0">
107110
<span className={classNames('block w-4 h-4 rounded-full', isOnline() ? 'bg-green-400' : 'bg-gray-300')} />
108111
</span>
109112
</span>
@@ -197,12 +200,11 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
197200
</Transition>
198201

199202
</div>
203+
<AlertRobotComponent errorCaptcha={errorCaptcha} />
200204
</div>
201205

202206
<div className="absolute bottom-1 left-0 w-full h-7 bg-zz-top border-0 bg-[length:1rem]" />
203207

204-
<AlertRobotComponent errorCaptcha={errorCaptcha} />
205-
206208
</div>
207209

208210
</div>
@@ -218,7 +220,7 @@ export async function getStaticProps () {
218220

219221
const unsplash = createApi({ accessKey: process.env.KEY_UNSPLASH })
220222
const result = await unsplash.search.getPhotos({
221-
query: randomElement(['dev', 'nodejs', 'python', 'php']),
223+
query: randomElement(['dev', 'nodejs', 'python', 'php', 'code']),
222224
orderBy: 'relevant',
223225
orientation: 'landscape'
224226
})

0 commit comments

Comments
 (0)