Spaces:
Running
utiliza esto como inspiración para los botones del blog, porque no se visualizan bien:
Browse filesimport { useState } from 'react';
import { Card } from '@/components/ui/card';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { Badge } from '@/components/ui/badge';
import { Sparkles, BookOpen, Music, Languages, Globe } from 'lucide-react';
export default function Passions() {
const [activeTab, setActiveTab] = useState('mitologia');
const books = [
{
title: 'Cien Años de Soledad',
author: 'Gabriel García Márquez',
review: 'Una obra maestra del realismo mágico que explora la historia de la familia Buendía.',
},
{
title: 'El Nombre de la Rosa',
author: 'Umberto Eco',
review: 'Una fascinante novela histórica que combina misterio, filosofía y semiótica medieval.',
},
{
title: 'La Odisea',
author: 'Homero',
review: 'El viaje épico de Odiseo, lleno de aventuras mitológicas y lecciones atemporales.',
},
];
const musicGenres = [
'Rock Clásico',
'Jazz',
'Música Clásica',
'Folk',
'Indie',
'World Music',
];
return (
<section id="pasiones" className="py-20 bg-gradient-to-b from-muted/30 to-white">
<div className="container mx-auto px-4">
<h2 className="text-4xl md:text-5xl font-bold text-center mb-4 text-primary">
Más Allá de las Palabras
</h2>
<div className="w-24 h-1 bg-accent mx-auto mb-4"></div>
<p className="text-center text-lg text-muted-foreground mb-12 max-w-2xl mx-auto">
El mundo que me inspira y enriquece mi trabajo como traductora
</p>
<div className="max-w-6xl mx-auto">
<Tabs value={activeTab} onValueChange={setActiveTab} className="w-full">
<TabsList className="grid w-full grid-cols-2 md:grid-cols-5 mb-8 h-auto">
<TabsTrigger value="mitologia" className="flex items-center gap-2 py-3">
<Sparkles className="w-4 h-4" />
<span className="hidden sm:inline">Mitología</span>
</TabsTrigger>
<TabsTrigger value="lectura" className="flex items-center gap-2 py-3">
<BookOpen className="w-4 h-4" />
<span className="hidden sm:inline">Lectura</span>
</TabsTrigger>
<TabsTrigger value="musica" className="flex items-center gap-2 py-3">
<Music className="w-4 h-4" />
<span className="hidden sm:inline">Música</span>
</TabsTrigger>
<TabsTrigger value="etimologia" className="flex items-center gap-2 py-3">
<Languages className="w-4 h-4" />
<span className="hidden sm:inline">Etimología</span>
</TabsTrigger>
<TabsTrigger value="idiomas" className="flex items-center gap-2 py-3">
<Globe className="w-4 h-4" />
<span className="hidden sm:inline">Idiomas</span>
</TabsTrigger>
</TabsList>
<TabsContent value="mitologia" className="mt-6">
<Card className="p-8 md:p-12">
<div className="grid md:grid-cols-2 gap-8 items-center">
<div>
<h3 className="text-3xl font-bold mb-4 text-primary">El Poder de los Mitos</h3>
<p className="text-lg leading-relaxed mb-4">
La mitología ha sido mi pasión desde la infancia. Los mitos antiguos no son solo historias
fascinantes, sino ventanas a la comprensión de diferentes culturas y la psique humana.
</p>
<p className="text-lg leading-relaxed mb-4">
Cada mito encierra lecciones universales sobre el valor, el amor, la traición y la redención.
Mi favorito es el mito de Orfeo y Eurídice, una historia sobre el amor que trasciende la muerte
y el poder transformador de la música.
</p>
<p className="text-muted-foreground italic">
"Los mitos son historias que nunca sucedieron pero siempre están sucediendo." - Salustio
</p>
</div>
<div className="rounded-lg overflow-hidden shadow-xl">
<img
src="/assets/mythology-theme.jpg"
alt="Mitología"
className="w-full h-full object-cover"
/>
</div>
</div>
</Card>
</TabsContent>
<TabsContent value="lectura" className="mt-6">
<Card className="p-8 md:p-12">
<div className="grid md:grid-cols-2 gap-8 items-center">
<div className="rounded-lg overflow-hidden shadow-xl order-2 md:order-1">
<img
src="/assets/books-reading.jpg"
alt="Lectura"
className="w-full h-full object-cover"
/>
</div>
<div className="order-1 md:order-2">
<h3 className="text-3xl font-bold mb-4 text-primary">Mi Estante de Libros</h3>
<p className="text-lg leading-relaxed mb-6">
La lectura es mi refugio y mi fuente constante de inspiración. Aquí algunos de mis libros favoritos:
</p>
<div className="space-y-4">
{books.map((book, index) => (
<div key={index} className="border-l-4 border-accent pl-4 py-2">
<h4 className="font-semibold text-lg">{book.title}</h4>
<p className="text-sm text-muted-foreground mb-1">{book.author}</p>
<p className="text-sm">{book.review}</p>
</div>
))}
</div>
</div>
</div>
</Card>
</TabsContent>
<TabsContent value="musica" className="mt-6">
<Card className="p-8 md:p-12">
<div className="grid md:grid-cols-2 gap-8 items-center">
<div>
<h3 className="text-3xl font-bold mb-4 text-primary">La Banda Sonora de Mi Vida</h3>
<p className="text-lg leading-relaxed mb-6">
La música es el lenguaje universal que trasciende las barreras culturales.
Me acompaña en cada traducción, inspirando creatividad y concentración.
</p>
<h4 className="font-semibold text-xl mb-4">Mis Géneros Favoritos:</h4>
<div className="flex flex-wrap gap-3 mb-6">
{musicGenres.map((genre, index) => (
<Badge key={index} variant="secondary" className="text-base px-4 py-2">
{genre}
</Badge>
))}
</div>
<p className="text-muted-foreground italic">
"La música es el arte más directo, entra por el oído y va al corazón." - Magdalena Martínez
</p>
</div>
<div className="rounded-lg overflow-hidden shadow-xl">
<img
src="/assets/music-passion.jpg"
alt="Música"
className="w-full h-full object-cover"
/>
</div>
</div>
</Card>
</TabsContent>
<TabsContent value="etimologia" className="mt-6">
<Card className="p-8 md:p-12">
<div className="grid md:grid-cols-2 gap-8 items-center">
<div className="rounded-lg overflow-hidden shadow-xl order-2 md:order-1">
<img
src="/assets/etymology-words.jpg"
alt="Etimología"
className="w-full h-full object-cover"
/>
</div>
<div className="order-1 md:order-2">
<h3 className="text-3xl font-bold mb-4 text-primary">El Rincón de la Etimología</h3>
<p className="text-lg leading-relaxed mb-6">
Cada palabra tiene una historia fascinante. La etimología me permite entender
el viaje de las palabras a través del tiempo y las culturas.
</p>
<div className="bg-muted/50 p-6 rounded-lg mb-4">
<h4 className="font-semibold text-xl mb-2 text-accent">Palabra del Día: "Nostalgia"</h4>
<p className="mb-2">
<strong>Origen:</strong> Del griego <em>nostos</em> (regreso) + <em>algos</em> (dolor)
</p>
<p className="text-muted-foreground">
Literalmente significa "el dolor del regreso". Originalmente era un término médico
para describir la melancolía de los soldados suizos que añoraban su hogar.
</p>
</div>
<p className="text-muted-foreground italic">
"Las palabras son las huellas del pensamiento humano a través de la historia."
</p>
</div>
</div>
</Card>
</TabsContent>
<TabsContent value="idiomas" className="mt-6">
<Card className="p-8 md:p-12">
<div className="grid md:grid-cols-2 gap-8 items-center">
<div>
<h3 className="text-3xl font-bold mb-4 text-primary">El Arte de Aprender Idiomas</h3>
<p className="text-lg leading-relaxed mb-4">
Cada idioma que aprendo es una nueva ventana al mundo. No solo adquiero vocabulario
y gramática, sino que desc
- index.html +8 -8
- script.js +3 -5
- style.css +32 -2
|
@@ -92,29 +92,29 @@
|
|
| 92 |
El mundo que me inspira y enriquece mi trabajo como traductora
|
| 93 |
</p>
|
| 94 |
<div class="max-w-6xl mx-auto">
|
| 95 |
-
<div class="flex flex-wrap justify-center gap-
|
| 96 |
-
<button data-category="mitologia" class="category-btn active-category flex items-center gap-2
|
| 97 |
<i data-feather="award" class="w-4 h-4"></i>
|
| 98 |
<span>Mitología</span>
|
| 99 |
</button>
|
| 100 |
-
<button data-category="lectura" class="category-btn flex items-center gap-2
|
| 101 |
<i data-feather="book-open" class="w-4 h-4"></i>
|
| 102 |
-
<span>Lectura</span>
|
| 103 |
</button>
|
| 104 |
-
<button data-category="musica" class="category-btn flex items-center gap-2
|
| 105 |
<i data-feather="music" class="w-4 h-4"></i>
|
| 106 |
<span data-i18n="blog_music">Música</span>
|
| 107 |
</button>
|
| 108 |
-
<button data-category="etimologia" class="category-btn flex items-center gap-2
|
| 109 |
<i data-feather="type" class="w-4 h-4"></i>
|
| 110 |
<span data-i18n="blog_etymology">Etimología</span>
|
| 111 |
</button>
|
| 112 |
-
<button data-category="idiomas" class="category-btn flex items-center gap-2
|
| 113 |
<i data-feather="globe" class="w-4 h-4"></i>
|
| 114 |
<span data-i18n="blog_languages">Idiomas</span>
|
| 115 |
</button>
|
| 116 |
</div>
|
| 117 |
-
|
| 118 |
<div class="bg-white rounded-xl shadow-lg p-8 md:p-12 mb-12" data-category-content="mitologia">
|
| 119 |
<div class="grid md:grid-cols-2 gap-8 items-center">
|
| 120 |
<div>
|
|
|
|
| 92 |
El mundo que me inspira y enriquece mi trabajo como traductora
|
| 93 |
</p>
|
| 94 |
<div class="max-w-6xl mx-auto">
|
| 95 |
+
<div class="flex flex-wrap justify-center gap-3 mb-8">
|
| 96 |
+
<button data-category="mitologia" class="category-btn active-category flex items-center gap-2 bg-amber-700 text-white font-medium">
|
| 97 |
<i data-feather="award" class="w-4 h-4"></i>
|
| 98 |
<span>Mitología</span>
|
| 99 |
</button>
|
| 100 |
+
<button data-category="lectura" class="category-btn flex items-center gap-2 bg-white text-gray-700 font-medium">
|
| 101 |
<i data-feather="book-open" class="w-4 h-4"></i>
|
| 102 |
+
<span data-i18n="blog_reading">Lectura</span>
|
| 103 |
</button>
|
| 104 |
+
<button data-category="musica" class="category-btn flex items-center gap-2 bg-white text-gray-700 font-medium">
|
| 105 |
<i data-feather="music" class="w-4 h-4"></i>
|
| 106 |
<span data-i18n="blog_music">Música</span>
|
| 107 |
</button>
|
| 108 |
+
<button data-category="etimologia" class="category-btn flex items-center gap-2 bg-white text-gray-700 font-medium">
|
| 109 |
<i data-feather="type" class="w-4 h-4"></i>
|
| 110 |
<span data-i18n="blog_etymology">Etimología</span>
|
| 111 |
</button>
|
| 112 |
+
<button data-category="idiomas" class="category-btn flex items-center gap-2 bg-white text-gray-700 font-medium">
|
| 113 |
<i data-feather="globe" class="w-4 h-4"></i>
|
| 114 |
<span data-i18n="blog_languages">Idiomas</span>
|
| 115 |
</button>
|
| 116 |
</div>
|
| 117 |
+
<!-- Mythology Content -->
|
| 118 |
<div class="bg-white rounded-xl shadow-lg p-8 md:p-12 mb-12" data-category-content="mitologia">
|
| 119 |
<div class="grid md:grid-cols-2 gap-8 items-center">
|
| 120 |
<div>
|
|
@@ -16,18 +16,16 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 16 |
if (e.target.closest('[data-category]')) {
|
| 17 |
const button = e.target.closest('[data-category]');
|
| 18 |
const category = button.getAttribute('data-category');
|
| 19 |
-
|
| 20 |
// Update all buttons in the document
|
| 21 |
document.querySelectorAll('[data-category]').forEach(btn => {
|
| 22 |
-
btn.classList.remove('
|
| 23 |
btn.classList.add('bg-white', 'text-gray-700');
|
| 24 |
});
|
| 25 |
|
| 26 |
// Update clicked button
|
| 27 |
button.classList.remove('bg-white', 'text-gray-700');
|
| 28 |
-
button.classList.add('
|
| 29 |
-
|
| 30 |
-
// Update category contents
|
| 31 |
document.querySelectorAll('[data-category-content]').forEach(content => {
|
| 32 |
content.classList.add('hidden');
|
| 33 |
if (content.getAttribute('data-category-content') === category) {
|
|
|
|
| 16 |
if (e.target.closest('[data-category]')) {
|
| 17 |
const button = e.target.closest('[data-category]');
|
| 18 |
const category = button.getAttribute('data-category');
|
|
|
|
| 19 |
// Update all buttons in the document
|
| 20 |
document.querySelectorAll('[data-category]').forEach(btn => {
|
| 21 |
+
btn.classList.remove('active-category');
|
| 22 |
btn.classList.add('bg-white', 'text-gray-700');
|
| 23 |
});
|
| 24 |
|
| 25 |
// Update clicked button
|
| 26 |
button.classList.remove('bg-white', 'text-gray-700');
|
| 27 |
+
button.classList.add('active-category');
|
| 28 |
+
// Update category contents
|
|
|
|
| 29 |
document.querySelectorAll('[data-category-content]').forEach(content => {
|
| 30 |
content.classList.add('hidden');
|
| 31 |
if (content.getAttribute('data-category-content') === category) {
|
|
@@ -113,23 +113,53 @@ body {
|
|
| 113 |
/* Category Buttons */
|
| 114 |
[data-category] {
|
| 115 |
transition: all 0.3s ease;
|
| 116 |
-
box-shadow: 0 2px 4px rgba(0,0,0,0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
}
|
| 118 |
|
| 119 |
-
[data-category]:hover:not(.
|
| 120 |
background-color: #f3f4f6 !important;
|
| 121 |
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
}
|
| 123 |
/* Category Content */
|
| 124 |
[data-category-content] {
|
| 125 |
display: none;
|
| 126 |
animation: fadeIn 0.5s ease-out;
|
|
|
|
|
|
|
|
|
|
| 127 |
}
|
| 128 |
|
| 129 |
[data-category-content="mitologia"] {
|
| 130 |
display: block;
|
| 131 |
}
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
@keyframes fadeIn {
|
| 134 |
from { opacity: 0; transform: translateY(10px); }
|
| 135 |
to { opacity: 1; transform: translateY(0); }
|
|
|
|
| 113 |
/* Category Buttons */
|
| 114 |
[data-category] {
|
| 115 |
transition: all 0.3s ease;
|
| 116 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
| 117 |
+
border-radius: 9999px;
|
| 118 |
+
padding: 0.7rem 1.25rem;
|
| 119 |
+
display: inline-flex;
|
| 120 |
+
align-items: center;
|
| 121 |
+
gap: 0.5rem;
|
| 122 |
+
font-weight: 500;
|
| 123 |
+
border: 1px solid transparent;
|
| 124 |
}
|
| 125 |
|
| 126 |
+
[data-category]:hover:not(.active-category) {
|
| 127 |
background-color: #f3f4f6 !important;
|
| 128 |
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
| 129 |
+
border-color: rgba(180, 83, 9, 0.1);
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
.active-category {
|
| 133 |
+
background-color: #b45309 !important;
|
| 134 |
+
color: white !important;
|
| 135 |
+
box-shadow: 0 4px 6px rgba(180, 83, 9, 0.2);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
[data-category] i {
|
| 139 |
+
width: 16px;
|
| 140 |
+
height: 16px;
|
| 141 |
+
stroke-width: 2.5px;
|
| 142 |
}
|
| 143 |
/* Category Content */
|
| 144 |
[data-category-content] {
|
| 145 |
display: none;
|
| 146 |
animation: fadeIn 0.5s ease-out;
|
| 147 |
+
border-radius: 1rem;
|
| 148 |
+
background: white;
|
| 149 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
| 150 |
}
|
| 151 |
|
| 152 |
[data-category-content="mitologia"] {
|
| 153 |
display: block;
|
| 154 |
}
|
| 155 |
|
| 156 |
+
/* Category buttons container */
|
| 157 |
+
#blog .max-w-6xl .flex {
|
| 158 |
+
gap: 0.75rem;
|
| 159 |
+
flex-wrap: wrap;
|
| 160 |
+
justify-content: center;
|
| 161 |
+
margin-bottom: 2.5rem;
|
| 162 |
+
}
|
| 163 |
@keyframes fadeIn {
|
| 164 |
from { opacity: 0; transform: translateY(10px); }
|
| 165 |
to { opacity: 1; transform: translateY(0); }
|