-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
688 lines (587 loc) · 24.5 KB
/
script.js
File metadata and controls
688 lines (587 loc) · 24.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
// ========================================
// TRANSLATIONS / i18n
// ========================================
const translations = {
pt: {
// Navigation
'nav-home': 'Início',
'nav-about': 'Sobre',
'nav-experience': 'Experiência',
'nav-skills': 'Habilidades',
'nav-projects': 'Projetos',
'nav-contact': 'Contato',
// Hero
'hero-label': 'Solution Engineer',
'hero-greeting': 'Olá, eu sou',
'hero-description': 'Especialista em transformar processos, integrar sistemas e criar soluções digitais que geram valor real para empresas. Experiência sólida com Python, Power BI, Azure, RPA e DevOps.',
'hero-btn-projects': 'Ver Projetos',
'hero-btn-contact': 'Entrar em Contato',
// About
'about-label': 'Conheça-me',
'about-title': 'Sobre Mim',
'about-text-1': 'Engenheiro de soluções apaixonado por automação, dados e tecnologia. Atuo há mais de 6 anos desenvolvendo integrações, robôs, dashboards e sistemas inteligentes para empresas de diversos segmentos.',
'about-text-2': 'Meu foco é criar soluções que simplificam rotinas, aumentam a produtividade e trazem resultados mensuráveis. Domino Python, Power BI, Azure, UiPath, SQL e práticas DevOps.',
'about-text-3': 'Já liderei projetos de automação financeira, integração de APIs, análise de dados e implantação de pipelines CI/CD. Busco sempre unir visão técnica e estratégica para entregar valor ao negócio.',
'stat-experience': 'Anos de Experiência',
'stat-skills': 'Habilidades',
'stat-certifications': 'Certificações',
'detail-location': 'Localização',
'detail-availability': 'Disponibilidade',
'detail-availability-value': 'Remoto | Realocação',
'detail-languages': 'Idiomas',
'detail-languages-value': 'Português | Inglês (Intermediário)',
// Experience
'experience-label': 'Minha Jornada',
'experience-title': 'Experiência Profissional',
'exp1-item1': 'Liderança técnica em soluções de automação e integrações backend/frontend',
'exp1-item2': 'Aplicação de padrões arquiteturais (camadas, modularização e APIs) para garantir manutenibilidade',
'exp1-item3': 'Participação em práticas de DevOps e versionamento de código integrado ao Azure DevOps',
'exp1-item4': 'Desenvolvimento de automações inteligentes integradas a bancos relacionais (SQL Server, PostgreSQL)',
'exp2-item1': 'Desenvolvimento de scripts e APIs em Python com integração a bancos relacionais',
'exp2-item2': 'Criação de soluções com Power Automate e RPA, integrando dados entre sistemas internos',
'exp2-item3': 'Participação em rotinas de deploy contínuo (CI/CD) e versionamento com Git',
'exp2-item4': 'Implementação de boas práticas de código limpo e testes unitários',
'exp3-item1': 'Criação e suporte a soluções RPA utilizando UiPath e Automation Anywhere',
'exp3-item2': 'Desenvolvimento de scripts em Python e .NET (C#) para automação de processos',
'exp3-item3': 'Implementação de dashboards internos para monitoramento de bots e indicadores de desempenho',
'exp3-item4': 'Participação em projetos de modernização de sistemas legados',
'exp4-item1': 'Criação e suporte a soluções RPA com UiPath e Automation Anywhere',
'exp4-item2': 'Foco na eficiência operacional e suporte a clientes em demandas de automação',
'exp4-item3': 'Integração de sistemas via API',
'certifications-title': 'Certificações',
// Skills
'skills-label': 'Minhas Competências',
'skills-title': 'Habilidades Técnicas',
'skill-cat-languages': 'Linguagens',
'skill-cat-architecture': 'Arquitetura',
'skill-cat-databases': 'Bancos de Dados',
'skill-cat-rpa': 'RPA & Automação',
'skill-cat-quality': 'Qualidade',
'skill-cat-bi': 'BI & Produtividade',
'skill-patterns': 'Padrões MVC',
'skill-testing': 'Testes Unitários',
'skill-practices': 'Boas Práticas',
// Projects
'projects-label': 'Meu Trabalho',
'projects-title': 'Projetos em Destaque',
'project1-category': 'Automação',
'project1-title': 'Automação Financeira RPA',
'project1-description': 'Robô de automação para conciliação bancária e processamento de faturas. Redução de 80% no tempo de processamento.',
'project2-category': 'Business Intelligence',
'project2-title': 'Dashboard Power BI Embedded',
'project2-description': 'Dashboard executivo com indicadores de performance em tempo real integrado a aplicações web.',
'project3-category': 'Backend',
'project3-title': 'API REST Python + SQL',
'project3-description': 'API RESTful para integração de sistemas legados com arquitetura moderna e documentação Swagger.',
'project4-category': 'Conversacional',
'project4-title': 'Bot Conversacional BLIP',
'project4-description': 'Chatbot inteligente para atendimento ao cliente com integração WhatsApp e análise de sentimentos.',
'project5-title': 'Pipeline CI/CD Azure',
'project5-description': 'Implementação de pipeline de integração e deploy contínuo com testes automatizados e monitoramento.',
'project6-category': 'Integração',
'project6-title': 'Integração Multi-sistemas',
'project6-description': 'Orquestração de dados entre ERP, CRM e sistemas internos com tratamento de erros e logs centralizados.',
// Contact
'contact-label': 'Entre em Contato',
'contact-title': 'Vamos Conversar?',
'contact-description': 'Estou disponível para novos projetos e oportunidades. Entre em contato comigo através dos canais abaixo ou envie uma mensagem!',
'contact-location-title': 'Localização',
'form-name': 'Nome',
'form-email': 'Email',
'form-subject': 'Assunto',
'form-message': 'Mensagem',
'form-submit': 'Enviar Mensagem',
// Footer
'footer-rights': 'Todos os direitos reservados.'
},
en: {
// Navigation
'nav-home': 'Home',
'nav-about': 'About',
'nav-experience': 'Experience',
'nav-skills': 'Skills',
'nav-projects': 'Projects',
'nav-contact': 'Contact',
// Hero
'hero-label': 'Solution Engineer',
'hero-greeting': 'Hello, I am',
'hero-description': 'Specialist in transforming processes, integrating systems and creating digital solutions that generate real value for companies. Solid experience with Python, Power BI, Azure, RPA and DevOps.',
'hero-btn-projects': 'View Projects',
'hero-btn-contact': 'Get in Touch',
// About
'about-label': 'Get to Know Me',
'about-title': 'About Me',
'about-text-1': 'Solution engineer passionate about automation, data and technology. I have been working for over 6 years developing integrations, robots, dashboards and intelligent systems for companies in various sectors.',
'about-text-2': 'My focus is to create solutions that simplify routines, increase productivity and bring measurable results. I master Python, Power BI, Azure, UiPath, SQL and DevOps practices.',
'about-text-3': 'I have led financial automation projects, API integration, data analysis and CI/CD pipeline implementation. I always seek to combine technical and strategic vision to deliver business value.',
'stat-experience': 'Years of Experience',
'stat-skills': 'Skills',
'stat-certifications': 'Certifications',
'detail-location': 'Location',
'detail-availability': 'Availability',
'detail-availability-value': 'Remote | Relocation',
'detail-languages': 'Languages',
'detail-languages-value': 'Portuguese | English (Intermediate)',
// Experience
'experience-label': 'My Journey',
'experience-title': 'Professional Experience',
'exp1-item1': 'Technical leadership in automation solutions and backend/frontend integrations',
'exp1-item2': 'Application of architectural patterns (layers, modularization and APIs) to ensure maintainability',
'exp1-item3': 'Participation in DevOps practices and code versioning integrated with Azure DevOps',
'exp1-item4': 'Development of intelligent automations integrated with relational databases (SQL Server, PostgreSQL)',
'exp2-item1': 'Development of scripts and APIs in Python with integration to relational databases',
'exp2-item2': 'Creation of solutions with Power Automate and RPA, integrating data between internal systems',
'exp2-item3': 'Participation in continuous deployment (CI/CD) routines and versioning with Git',
'exp2-item4': 'Implementation of clean code best practices and unit testing',
'exp3-item1': 'Creation and support of RPA solutions using UiPath and Automation Anywhere',
'exp3-item2': 'Development of scripts in Python and .NET (C#) for process automation',
'exp3-item3': 'Implementation of internal dashboards for bot monitoring and performance indicators',
'exp3-item4': 'Participation in legacy system modernization projects',
'exp4-item1': 'Creation and support of RPA solutions with UiPath and Automation Anywhere',
'exp4-item2': 'Focus on operational efficiency and customer support in automation demands',
'exp4-item3': 'System integration via API',
'certifications-title': 'Certifications',
// Skills
'skills-label': 'My Competencies',
'skills-title': 'Technical Skills',
'skill-cat-languages': 'Languages',
'skill-cat-architecture': 'Architecture',
'skill-cat-databases': 'Databases',
'skill-cat-rpa': 'RPA & Automation',
'skill-cat-quality': 'Quality',
'skill-cat-bi': 'BI & Productivity',
'skill-patterns': 'MVC Patterns',
'skill-testing': 'Unit Testing',
'skill-practices': 'Best Practices',
// Projects
'projects-label': 'My Work',
'projects-title': 'Featured Projects',
'project1-category': 'Automation',
'project1-title': 'Financial Automation RPA',
'project1-description': 'Automation robot for bank reconciliation and invoice processing. 80% reduction in processing time.',
'project2-category': 'Business Intelligence',
'project2-title': 'Power BI Embedded Dashboard',
'project2-description': 'Executive dashboard with real-time performance indicators integrated into web applications.',
'project3-category': 'Backend',
'project3-title': 'REST API Python + SQL',
'project3-description': 'RESTful API for legacy system integration with modern architecture and Swagger documentation.',
'project4-category': 'Conversational',
'project4-title': 'BLIP Conversational Bot',
'project4-description': 'Intelligent chatbot for customer service with WhatsApp integration and sentiment analysis.',
'project5-title': 'Azure CI/CD Pipeline',
'project5-description': 'Implementation of continuous integration and deployment pipeline with automated tests and monitoring.',
'project6-category': 'Integration',
'project6-title': 'Multi-system Integration',
'project6-description': 'Data orchestration between ERP, CRM and internal systems with error handling and centralized logs.',
// Contact
'contact-label': 'Get in Touch',
'contact-title': "Let's Talk?",
'contact-description': 'I am available for new projects and opportunities. Contact me through the channels below or send a message!',
'contact-location-title': 'Location',
'form-name': 'Name',
'form-email': 'Email',
'form-subject': 'Subject',
'form-message': 'Message',
'form-submit': 'Send Message',
// Footer
'footer-rights': 'All rights reserved.'
}
};
// ========================================
// STATE MANAGEMENT
// ========================================
let currentLang = localStorage.getItem('language') || 'pt';
let currentTheme = localStorage.getItem('theme') || 'dark';
// ========================================
// THEME MANAGEMENT
// ========================================
function initTheme() {
const themeToggle = document.getElementById('themeToggle');
const themeIcon = document.getElementById('themeIcon');
// Apply saved theme
if (currentTheme === 'light') {
document.body.classList.add('light-theme');
themeIcon.classList.remove('fa-moon');
themeIcon.classList.add('fa-sun');
}
// Theme toggle event
themeToggle.addEventListener('click', () => {
document.body.classList.toggle('light-theme');
const isLight = document.body.classList.contains('light-theme');
currentTheme = isLight ? 'light' : 'dark';
// Update icon
if (isLight) {
themeIcon.classList.remove('fa-moon');
themeIcon.classList.add('fa-sun');
} else {
themeIcon.classList.remove('fa-sun');
themeIcon.classList.add('fa-moon');
}
// Save to localStorage
localStorage.setItem('theme', currentTheme);
});
}
// ========================================
// LANGUAGE MANAGEMENT
// ========================================
function initLanguage() {
const langToggle = document.getElementById('langToggle');
const currentLangLabel = document.getElementById('currentLang');
// Apply saved language
updateLanguage();
// Language toggle event
langToggle.addEventListener('click', () => {
currentLang = currentLang === 'pt' ? 'en' : 'pt';
currentLangLabel.textContent = currentLang.toUpperCase();
localStorage.setItem('language', currentLang);
updateLanguage();
});
}
function updateLanguage() {
const elements = document.querySelectorAll('[data-i18n]');
const currentLangLabel = document.getElementById('currentLang');
elements.forEach(element => {
const key = element.getAttribute('data-i18n');
if (translations[currentLang] && translations[currentLang][key]) {
element.textContent = translations[currentLang][key];
}
});
if (currentLangLabel) {
currentLangLabel.textContent = currentLang.toUpperCase();
}
// Update typing text
updateTypingText();
// Update HTML lang attribute
document.documentElement.lang = currentLang === 'pt' ? 'pt-BR' : 'en';
}
// ========================================
// TYPING EFFECT
// ========================================
const typingTexts = {
pt: [
'Solution Engineer | Automação, Dados & Cloud',
'Especialista em Python, Power BI & Azure',
'Desenvolvedor RPA | UiPath & Power Automate',
'Arquiteto de Soluções | DevOps & CI/CD'
],
en: [
'Solution Engineer | Automation, Data & Cloud',
'Specialist in Python, Power BI & Azure',
'RPA Developer | UiPath & Power Automate',
'Solution Architect | DevOps & CI/CD'
]
};
let typingIndex = 0;
let charIndex = 0;
let isDeleting = false;
let typingTimeout;
function updateTypingText() {
const typingElement = document.getElementById('typingText');
const texts = typingTexts[currentLang];
const currentText = texts[typingIndex];
if (!typingElement) return;
clearTimeout(typingTimeout);
if (isDeleting) {
typingElement.textContent = currentText.substring(0, charIndex - 1);
charIndex--;
if (charIndex === 0) {
isDeleting = false;
typingIndex = (typingIndex + 1) % texts.length;
typingTimeout = setTimeout(updateTypingText, 500);
} else {
typingTimeout = setTimeout(updateTypingText, 50);
}
} else {
typingElement.textContent = currentText.substring(0, charIndex + 1);
charIndex++;
if (charIndex === currentText.length) {
isDeleting = true;
typingTimeout = setTimeout(updateTypingText, 2000);
} else {
typingTimeout = setTimeout(updateTypingText, 100);
}
}
}
// ========================================
// NAVIGATION
// ========================================
function initNavigation() {
const navbar = document.getElementById('navbar');
const navLinks = document.querySelectorAll('.nav-link');
const mobileToggle = document.getElementById('mobileToggle');
const navMenu = document.getElementById('navMenu');
// Sticky navbar on scroll
window.addEventListener('scroll', () => {
if (window.scrollY > 100) {
navbar.classList.add('scrolled');
} else {
navbar.classList.remove('scrolled');
}
// Update active section
updateActiveSection();
});
// Smooth scroll for nav links
navLinks.forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault();
const targetId = link.getAttribute('href');
const targetSection = document.querySelector(targetId);
if (targetSection) {
const offsetTop = targetSection.offsetTop - 80;
window.scrollTo({
top: offsetTop,
behavior: 'smooth'
});
// Close mobile menu
navMenu.classList.remove('active');
mobileToggle.classList.remove('active');
}
});
});
// Mobile menu toggle
mobileToggle.addEventListener('click', () => {
navMenu.classList.toggle('active');
mobileToggle.classList.toggle('active');
});
// Close mobile menu on outside click
document.addEventListener('click', (e) => {
if (!navMenu.contains(e.target) && !mobileToggle.contains(e.target)) {
navMenu.classList.remove('active');
mobileToggle.classList.remove('active');
}
});
}
function updateActiveSection() {
const sections = document.querySelectorAll('section[id]');
const navLinks = document.querySelectorAll('.nav-link');
let current = '';
sections.forEach(section => {
const sectionTop = section.offsetTop - 150;
const sectionHeight = section.clientHeight;
if (window.scrollY >= sectionTop && window.scrollY < sectionTop + sectionHeight) {
current = section.getAttribute('id');
}
});
navLinks.forEach(link => {
link.classList.remove('active');
if (link.getAttribute('href') === `#${current}`) {
link.classList.add('active');
}
});
}
// ========================================
// SCROLL ANIMATIONS
// ========================================
function initScrollAnimations() {
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
// Animate skill bars
if (entry.target.classList.contains('skill-category')) {
animateSkillBars(entry.target);
}
}
});
}, observerOptions);
// Observe elements
const elements = document.querySelectorAll('.about-content, .timeline-item, .skill-category, .project-card, .contact-card, .cert-card');
elements.forEach(el => {
el.classList.add('fade-in');
observer.observe(el);
});
}
function animateSkillBars(category) {
const skillBars = category.querySelectorAll('.skill-progress');
skillBars.forEach((bar, index) => {
setTimeout(() => {
const width = bar.style.width;
bar.style.width = '0%';
setTimeout(() => {
bar.style.width = width;
}, 100);
}, index * 100);
});
}
// ========================================
// SCROLL TO TOP BUTTON
// ========================================
function initScrollToTop() {
const scrollTopBtn = document.getElementById('scrollTopBtn');
window.addEventListener('scroll', () => {
if (window.scrollY > 500) {
scrollTopBtn.classList.add('visible');
} else {
scrollTopBtn.classList.remove('visible');
}
});
scrollTopBtn.addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
}
// ========================================
// CONTACT FORM
// ========================================
function initContactForm() {
const form = document.getElementById('contactForm');
form.addEventListener('submit', (e) => {
e.preventDefault();
// Get form data
const formData = {
name: document.getElementById('name').value,
email: document.getElementById('email').value,
subject: document.getElementById('subject').value,
message: document.getElementById('message').value
};
// Here you would typically send the data to a server
console.log('Form submitted:', formData);
// Show success message
showToast(
currentLang === 'pt'
? 'Mensagem enviada com sucesso!'
: 'Message sent successfully!',
'success'
);
// Reset form
form.reset();
});
}
// ========================================
// TOAST NOTIFICATIONS
// ========================================
function showToast(message, type = 'info') {
const toast = document.createElement('div');
toast.className = `toast toast-${type}`;
toast.textContent = message;
// Add styles
Object.assign(toast.style, {
position: 'fixed',
bottom: '2rem',
right: '2rem',
padding: '1rem 1.5rem',
background: type === 'success' ? 'var(--accent-primary)' : 'var(--bg-glass)',
color: 'white',
borderRadius: 'var(--radius-lg)',
boxShadow: 'var(--shadow-lg)',
backdropFilter: 'blur(10px)',
zIndex: '1000',
animation: 'fadeInUp 0.3s ease',
fontWeight: '600'
});
document.body.appendChild(toast);
setTimeout(() => {
toast.style.animation = 'fadeOut 0.3s ease';
setTimeout(() => {
document.body.removeChild(toast);
}, 300);
}, 3000);
}
// Add fadeOut animation
const style = document.createElement('style');
style.textContent = `
@keyframes fadeOut {
from { opacity: 1; transform: translateY(0); }
to { opacity: 0; transform: translateY(20px); }
}
`;
document.head.appendChild(style);
// ========================================
// PROJECT CARDS HOVER EFFECT
// ========================================
function initProjectCards() {
const projectCards = document.querySelectorAll('.project-card');
projectCards.forEach(card => {
card.addEventListener('mouseenter', function() {
this.style.transform = 'translateY(-8px) scale(1.02)';
});
card.addEventListener('mouseleave', function() {
this.style.transform = 'translateY(-8px)';
setTimeout(() => {
this.style.transform = '';
}, 100);
});
});
}
// ========================================
// INITIALIZATION
// ========================================
document.addEventListener('DOMContentLoaded', () => {
// Initialize all features
initTheme();
initLanguage();
initNavigation();
initScrollAnimations();
initScrollToTop();
initContactForm();
initProjectCards();
// Start typing effect after a short delay
setTimeout(updateTypingText, 500);
// Log initialization
console.log('🚀 Portfolio initialized successfully!');
console.log(`📍 Language: ${currentLang.toUpperCase()}`);
console.log(`🎨 Theme: ${currentTheme}`);
});
// ========================================
// PERFORMANCE OPTIMIZATION
// ========================================
// Debounce function for scroll events
function debounce(func, wait) {
let timeout;
return function executedFunction(...args) {
const later = () => {
clearTimeout(timeout);
func(...args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
};
}
// Optimize scroll events
const optimizedScroll = debounce(() => {
updateActiveSection();
}, 100);
window.addEventListener('scroll', optimizedScroll);
// ========================================
// EASTER EGGS & FUN FEATURES
// ========================================
// Konami Code Easter Egg
let konamiCode = [];
const konamiSequence = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a'];
document.addEventListener('keydown', (e) => {
konamiCode.push(e.key);
konamiCode = konamiCode.slice(-10);
if (konamiCode.join(',') === konamiSequence.join(',')) {
activateEasterEgg();
}
});
function activateEasterEgg() {
// Add rainbow effect to gradient text
const gradientTexts = document.querySelectorAll('.gradient-text');
gradientTexts.forEach(text => {
text.style.background = 'linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3)';
text.style.backgroundSize = '200% 200%';
text.style.animation = 'rainbow 3s ease infinite';
});
// Add style for rainbow animation
const rainbowStyle = document.createElement('style');
rainbowStyle.textContent = `
@keyframes rainbow {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
`;
document.head.appendChild(rainbowStyle);
showToast('🎉 Konami Code Activated! Rainbow Mode ON!', 'success');
}
// Console message for developers
console.log('%c👋 Hello Developer!', 'font-size: 20px; font-weight: bold; color: #00d4ff;');
console.log('%c🔥 Interested in the code? Check out the GitHub repo!', 'font-size: 14px; color: #7000ff;');
console.log('%c💼 https://github.com/marcelomcd', 'font-size: 12px; color: #9ca3af;');