saeidmp's picture
fully vibe coder
a866b8e verified
document.addEventListener('DOMContentLoaded', () => {
// Add vibe mode toggle
const body = document.body;
let vibeMode = false;
// Create vibe mode toggle button
const vibeToggle = document.createElement('button');
vibeToggle.innerHTML = '🎡';
vibeToggle.style.cssText = `
position: fixed;
bottom: 20px;
right: 20px;
width: 60px;
height: 60px;
border-radius: 50%;
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
border: none;
font-size: 24px;
cursor: pointer;
z-index: 1000;
transition: all 0.3s;
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
`;
vibeToggle.addEventListener('click', () => {
vibeMode = !vibeMode;
if (vibeMode) {
body.classList.add('vibe-mode');
vibeToggle.style.transform = 'scale(1.2) rotate(360deg)';
document.querySelectorAll('.feature-card, .primary-button, .logo').forEach(el => {
el.classList.add('vibe-mode');
});
} else {
body.classList.remove('vibe-mode');
vibeToggle.style.transform = 'scale(1) rotate(0deg)';
document.querySelectorAll('.vibe-mode').forEach(el => {
el.classList.remove('vibe-mode');
});
}
});
document.body.appendChild(vibeToggle);
// Typewriter effect
const typewriter = document.getElementById('typewriter');
if (typewriter) {
const texts = ["🎸 Jam", "🎡 Vibe", "🎹 Code", "🎀 Flow"];
let count = 0;
let index = 0;
let currentText = '';
let letter = '';
(function type() {
if (count === texts.length) {
count = 0;
}
currentText = texts[count];
letter = currentText.slice(0, ++index);
typewriter.textContent = letter;
if (letter.length === currentText.length) {
count++;
index = 0;
setTimeout(type, 1500);
} else {
setTimeout(type, 150);
}
})();
}
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
});