The Volunteer Program is a core feature of Siloé Perú that enables volunteers to accompany children and families during their hospital stay at Hospital del Niño and in vulnerable communities throughout Peru.
The volunteer section features a 3D flip card gallery that showcases volunteer stories and impact. When users click on an image, it flips to reveal an inspirational message.
Each gallery item follows this structure from index.html:66-84:
<div class="galeria-item"> <div class="galeria-flip-card"> <div class="galeria-flip-front"> <img src="./img voluntario/img2.png" alt="Voluntarios ayudando"> <div class="galeria-overlay"> <p>Juntos Somos Más Fuertes</p> </div> </div> <div class="galeria-flip-back"> <div class="galeria-historia"> <p class="historia-titulo">🤝 Comunidad</p> <p class="historia-texto">"Un voluntario es fuerte, pero una comunidad de voluntarios es invencible. Trabajamos juntos para crear un impacto tan grande que ningún niño se sienta abandonado."</p> <p class="historia-autor">— Misión Siloé</p> </div> </div> </div></div>
The flip functionality is controlled by JavaScript in index.html:831-854:
// Select all flip cardsconst flipCards = document.querySelectorAll('.galeria-flip-card');let currentFlipped = null; // Track currently flipped card// Add click listener to each cardflipCards.forEach(card => { card.addEventListener('click', function() { // If another card is flipped, flip it back if (currentFlipped && currentFlipped !== this) { currentFlipped.classList.remove('flipped'); } // Toggle 'flipped' class on current card this.classList.toggle('flipped'); // Update reference to flipped card if (this.classList.contains('flipped')) { currentFlipped = this; } else { currentFlipped = null; } });});
The JavaScript ensures only one card is flipped at a time. When clicking a new card, the previously flipped card automatically flips back.
The volunteer section uses these color variables defined in style.css:4-11:
:root { --azul-siloe: #29abe2; /* Main blue color */ --celeste-claro: #e1f5fe; /* Light blue for cards */ --gris-oscuro: #333; /* Main text color */ --blanco: #ffffff; /* Main background */ --amarillo-vibrante: #FFD700; /* Yellow accent */ --rosa-vibrante: #FF69B4; /* Pink accent */}
The volunteer program primarily uses --azul-siloe (blue) for its branding, while the clown section uses the vibrant yellow and pink gradient.