Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moviendo todos los Section al index #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/components/sections/About.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
import Section from "../Section.astro"

import { basics } from "@cv"
const { summary } = basics
---

<Section title="Sobre mí">
<p>
{summary}
</p>
</Section>
<p>
{summary}
</p>

64 changes: 30 additions & 34 deletions src/components/sections/Education.astro
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
---
import Section from "../Section.astro"

import { education } from "@cv"
---

<Section title="Educación">
<ul>
{
education.map(
({ institution, startDate, endDate, area }) => {
const startYear = new Date(startDate).getFullYear()
const endYear =
endDate != null ? new Date(endDate).getFullYear() : "Actual"
const years = `${startYear} - ${endYear}`

return (
<li>
<article>
<header>
<div>
<h3>{institution}</h3>
</div>

<time>{years}</time>
</header>

<footer>
<p>{area}</p>
</footer>
</article>
</li>
)
}
)
}
</ul>
</Section>
<ul>
{
education.map(
({ institution, startDate, endDate, area }) => {
const startYear = new Date(startDate).getFullYear()
const endYear =
endDate != null ? new Date(endDate).getFullYear() : "Actual"
const years = `${startYear} - ${endYear}`

return (
<li>
<article>
<header>
<div>
<h3>{institution}</h3>
</div>

<time>{years}</time>
</header>

<footer>
<p>{area}</p>
</footer>
</article>
</li>
)
}
)
}
</ul>

<style>
ul {
Expand Down
60 changes: 28 additions & 32 deletions src/components/sections/Experience.astro
Original file line number Diff line number Diff line change
@@ -1,42 +1,38 @@
---
import Section from "../Section.astro"

import { work } from "@cv"
---

<Section title="Experiencia laboral">
<ul>
{
work.map(
({ name, startDate, endDate, position, summary, highlights }) => {
const startYear = new Date(startDate).getFullYear()
const endYear =
endDate != null ? new Date(endDate).getFullYear() : "Actual"
const years = `${startYear} - ${endYear}`
<ul>
{
work.map(
({ name, startDate, endDate, position, summary, highlights }) => {
const startYear = new Date(startDate).getFullYear()
const endYear =
endDate != null ? new Date(endDate).getFullYear() : "Actual"
const years = `${startYear} - ${endYear}`

return (
<li>
<article>
<header>
<div>
<h3>{name}</h3>
<h4>{position}</h4>
</div>
return (
<li>
<article>
<header>
<div>
<h3>{name}</h3>
<h4>{position}</h4>
</div>

<time>{years}</time>
</header>
<time>{years}</time>
</header>

<footer>
<p>{summary}</p>
</footer>
</article>
</li>
)
}
)
}
</ul>
</Section>
<footer>
<p>{summary}</p>
</footer>
</article>
</li>
)
}
)
}
</ul>

<style>
ul {
Expand Down
105 changes: 51 additions & 54 deletions src/components/sections/Hero.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import { basics } from "@cv"
import Section from "@/components/Section.astro"
import Mail from "@/icons/Mail.astro"
import Phone from "@/icons/Phone.astro"
import X from "@/icons/X.astro"
Expand All @@ -24,66 +23,64 @@ const linkedUrl = linkedInfo?.url
const printInfo = [email, phone, linkedUrl].filter(Boolean).join(" • ")
---

<Section>
<div class="container">
<div class="info">
<h1>{name}</h1>
<h2>{label}</h2>
<span>
<WorldMap />
{city}, {region}
</span>
<footer class="print">
{printInfo}
</footer>
<footer class="no-print">
{
email && (
<a
href={`mailto:${email}`}
title={`Enviar un correo electrónico a ${name} al correo ${email}`}
target="_blank"
rel="noopener noreferrer"
>
<Mail />
</a>
)
}
{
phone && (
<div class="container">
<div class="info">
<h1>{name}</h1>
<h2>{label}</h2>
<span>
<WorldMap />
{city}, {region}
</span>
<footer class="print">
{printInfo}
</footer>
<footer class="no-print">
{
email && (
<a
href={`mailto:${email}`}
title={`Enviar un correo electrónico a ${name} al correo ${email}`}
target="_blank"
rel="noopener noreferrer"
>
<Mail />
</a>
)
}
{
phone && (
<a
href={`tel:${phone}`}
title={`Llamar por teléfono a ${name} al número ${phone}`}
target="_blank"
rel="noopener noreferrer"
>
<Phone />
</a>
)
}
{
profiles.map(({ network, url, username }) => {
const Icon = SOCIAL_ICONS[network]

return (
<a
href={`tel:${phone}`}
title={`Llamar por teléfono a ${name} al número ${phone}`}
href={url}
title={`Visitar el perfil de ${name} en ${network}`}
target="_blank"
rel="noopener noreferrer"
>
<Phone />
<Icon />
</a>
)
}
{
profiles.map(({ network, url, username }) => {
const Icon = SOCIAL_ICONS[network]

return (
<a
href={url}
title={`Visitar el perfil de ${name} en ${network}`}
target="_blank"
rel="noopener noreferrer"
>
<Icon />
</a>
)
})
}
</footer>
</div>
<figure>
<img src={image} alt={name} />
</figure>
})
}
</footer>
</div>
</Section>
<figure>
<img src={image} alt={name} />
</figure>
</div>

<style>
.container {
Expand Down
56 changes: 26 additions & 30 deletions src/components/sections/Projects.astro
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
---
import Section from "../Section.astro"

import { projects } from "@cv"
---

<Section title="Proyectos">
<ul>
{
projects.map(({ url, description, highlights, name, isActive }) => {
return (
<li>
<article>
<header>
<h3>
<a href={url} title={`Ver el proyecto ${name}`}>
{name}
</a>
{isActive && <span>•</span>}
</h3>
<p>{description}</p>
</header>
<footer>
{highlights.map((highlight) => {
return <span>{highlight}</span>
})}
</footer>
</article>
</li>
)
})
}
</ul>
</Section>
<ul>
{
projects.map(({ url, description, highlights, name, isActive }) => {
return (
<li>
<article>
<header>
<h3>
<a href={url} title={`Ver el proyecto ${name}`}>
{name}
</a>
{isActive && <span>•</span>}
</h3>
<p>{description}</p>
</header>
<footer>
{highlights.map((highlight) => {
return <span>{highlight}</span>
})}
</footer>
</article>
</li>
)
})
}
</ul>

<style>
ul {
Expand Down
22 changes: 9 additions & 13 deletions src/components/sections/Skills.astro
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
---
import Section from "../Section.astro"

import { skills } from "@cv"
---

<Section title="Habilidades">
<ul>
{
skills.map(({ name }) => (
<li>
<span>{name}</span>
</li>
))
}
</ul>
</Section>
<ul>
{
skills.map(({ name }) => (
<li>
<span>{name}</span>
</li>
))
}
</ul>

<style>
ul {
Expand Down
Loading