Refactor Section component to accept title prop and update usage in About, Experience, Projects, and Skills components for improved consistency and semantic structure

This commit is contained in:
2025-11-01 12:06:32 +00:00
parent 332ea17e6f
commit c53b645ed4
5 changed files with 13 additions and 17 deletions
+1 -4
View File
@@ -5,10 +5,7 @@ const { aboutMe } = Astro.props;
---
<Section id="about-me">
<h3 class="text-3xl font-bold text-gray-100 text-center mb-10">
Acerca de mí
</h3>
<Section id="about-me" title="Acerca de mí">
{aboutMe.split("\n").map((line: string) => (
line.trim() !== "" ? (
<p class="text-gray-300 mb-4 text-wrap">{line}</p>
+1 -4
View File
@@ -11,10 +11,7 @@ interface ExperienceProps {
}
---
<Section id="experience">
<h3 class="text-3xl font-bold text-white text-center mb-10">
Experiencia
</h3>
<Section id="experience" title="Experiencia">
<!-- Contenedor del timeline -->
<div class="relative">
<div class="absolute top-8 bottom-8 w-px">
+1 -4
View File
@@ -18,10 +18,7 @@ interface ProjectProps {
repoUrl: string;
}
---
<Section id="projects">
<h3 class="text-3xl font-bold text-white text-center mb-10">
Proyectos
</h3>
<Section id="projects" title="Proyectos">
<div class="space-y-12">
{
projects.map((project: ProjectProps) => (
+1 -4
View File
@@ -10,10 +10,7 @@ interface SkillProps {
}
---
<Section id="skills">
<h3 class="text-3xl font-bold text-white text-center mb-10">
Habilidades
</h3>
<Section id="skills" title="Habilidades">
<div class="flex flex-wrap gap-6 justify-center md:justify-start">
{skills.map((skill:SkillProps) => (
<div class="flex flex-col items-center justify-center w-24 md:w-28 p-6">
+9 -1
View File
@@ -1,3 +1,11 @@
<section class="container mx-auto md:max-w-7xl md:px-6 py-12 md:py-20" id={Astro.props.id}>
---
const { id, title } = Astro.props;
---
<section class="container mx-auto md:max-w-7xl md:px-6 py-12 md:py-20" id={id}>
{title && (
<h3 class="text-3xl font-bold text-gray-100 text-center mb-10">
{title}
</h3>
)}
<slot />
</section>