Skip to content

Commit

Permalink
feat: CV using content collections
Browse files Browse the repository at this point in the history
  • Loading branch information
luigieai committed Feb 15, 2023
1 parent a85b86d commit f0906c0
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 75 deletions.
24 changes: 22 additions & 2 deletions src/components/cv/TimeLine.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
---
const { title, subtitle, desc } = Astro.props;
const { title, timeStart, timeEnd, company, desc } = Astro.props;
function formatTime(timeStart, timeEnd) {
let formatOptions : Intl.DateTimeFormatOptions = {
month: 'short',
year: 'numeric'
}
let formattedStart = new Date(timeStart).toLocaleDateString('en-US', formatOptions);
if(!timeEnd) {
return formattedStart + " - Present";
}
let formattedEnd = new Date(timeEnd).toLocaleDateString('en-US', formatOptions);
return formattedStart + " - " + formattedEnd;
}
const time = formatTime(timeStart, timeEnd);
---

<div class="flex">
Expand All @@ -9,7 +27,9 @@ const { title, subtitle, desc } = Astro.props;
</div>
<div class="experience__data bd-grid px-5">
<h3 class="font-semibold mb-1">{title}</h3>
<span class="font-light text-sm">{subtitle}</span>
<span class="font-semibold text-sm">{time}</span>
<br/>
<span class="font-semibold text-sm">{company}</span>
<p class="my-2 text-justify">
{desc}
</p>
Expand Down
17 changes: 9 additions & 8 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ const blogSchema = z.object({
updatedDate : z.string().optional(),
heroImage: z.string().optional(),
});
const testSchema = z.object({
nome: z.string(),
lista: z.array(z.string()),
data: z.string().transform(str => new Date(str)),
});

export type SchemaTest = z.infer<typeof testSchema>;
const experienceSchema = z.object({
title: z.string(),
company: z.string(),
timeStart: z.coerce.date(),
timeEnd : z.coerce.date().optional(),
});
export type BlogSchema = z.infer<typeof blogSchema>;
export type ExperienceSchema = z.infer<typeof experienceSchema>;

const testCollection = defineCollection( { schema : testSchema } ) ;
const blogCollection = defineCollection( { schema : blogSchema } ) ;
const experienceCollection = defineCollection( { schema : experienceSchema } ) ;

export const collections = {
'blog' : blogCollection,
'test' : testCollection,
'experience' : experienceCollection,
}
8 changes: 8 additions & 0 deletions src/content/experience/company1.uidesigner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "UI Designer and Developer"
company: "Integral Access Control System (Thesis)"
timeStart: "Sep 2015"
timeEnd: "Jan 2016"
---

2System multiplatform that includes the steps of a company's personnel, the structure and composition thereof, as well as a powerful designer of credentials and module of control of access. Outspread at the MINFAR and another entities of the country. Technologies: C++, Qt Framework, Subversión, Visual Paradigm, PostgreSQL, Jmeter
7 changes: 7 additions & 0 deletions src/content/experience/company2.fullstack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Full Stack Dev, Software Architect and Project Leader"
company: "Integral Oil Drilling System 2.0"
timeStart: "Jul 2016"
---

3System of steps of process of perforation of oil wells. Outspread in the direction of Intervención of Wells and various wells of drilling of the Occident of the country. Generate reports and graphs of process of perforation making use of data mining. Technologies: Php,Symfony 2.8 , Gitlab, PostgreSQL, HigthChart, Boostrap 2, JQuery, HTML,CSS, JavaScript
8 changes: 8 additions & 0 deletions src/content/experience/company2.webdev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Web Developer"
company: "Integral Oil Drilling System 2.0"
timeStart: "Jan 2016"
timeEnd: "Dec 2016"
---

1System of steps of process of perforation of oil wells. Outspread in the direction of Intervención of Wells and various wells of drilling of the Occident of the country. Generate reports and graphs of process of perforation making use of data mining. Technologies: Php,Symfony 2.7 , Subversión, PostgreSQL, HigthChart, Ireport, Boostrap 2, JQuery, HTML,CSS, JavaScript
2 changes: 1 addition & 1 deletion src/pages/blog/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const { page } = Astro.props;
title={post.data.title}
img={post.data.heroImage}
desc={post.data.description}
url={"/blog/post/" + post.slug}
url={"/blog/posts/" + post.slug}
target="_self"
/>
<div class="divider my-0"></div>
Expand Down
File renamed without changes.
60 changes: 26 additions & 34 deletions src/pages/cv.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
import BaseLayout from "../layouts/BaseLayout.astro";
import TimeLineElement from "../components/cv/TimeLine.astro";
import { getCollection } from "astro:content";
const experienceEntries = await getCollection('experience');
const experienceSorted = experienceEntries.sort( (a, b) => b.data.timeStart.valueOf() - a.data.timeStart.valueOf());
---

<BaseLayout title = "Resume">
Expand All @@ -20,26 +24,15 @@ import TimeLineElement from "../components/cv/TimeLine.astro";
</div>

<div class="time-line-container mb-10">
<TimeLineElement
title="UI Designer and Developer at Integral Access Control System (Thesis)"
subtitle="From 2015 at XETID, Habana, Cuba"
desc="System multiplatform that includes the steps of a company's personnel, the structure and composition thereof, as well as a powerful designer of credentials and module of control of access. Outspread at the MINFAR and another entities of the country. Technologies: C++, Qt Framework, Subversión, Visual Paradigm, PostgreSQL, Jmeter"
/>
<TimeLineElement
title="Web Developer at Integral Oil Drilling System 2.0"
subtitle="From 2015 to 2016 at CEDIN, UCI, Habana, Cuba"
desc="System of steps of process of perforation of oil wells. Outspread in the direction of Intervención of Wells and various wells of drilling of the Occident of the country. Generate reports and graphs of process of perforation making use of data mining. Technologies: Php,Symfony 2.7 , Subversión, PostgreSQL, HigthChart, Ireport, Boostrap 2, JQuery, HTML,CSS, JavaScript"
/>
<TimeLineElement
title="Full Stack Dev, Software Architect and Project Leader at Integral Oil Drilling System 3.0"
subtitle="From 2016 to 2017 at CEDIN, UCI, Habana, Cuba"
desc="System of steps of process of perforation of oil wells. Outspread in the direction of Intervención of Wells and various wells of drilling of the Occident of the country. Generate reports and graphs of process of perforation making use of data mining. Technologies: Php,Symfony 2.8 , Gitlab, PostgreSQL, HigthChart, Boostrap 2, JQuery, HTML,CSS, JavaScript"
/>
<TimeLineElement
title="Full Stack Dev, UI/UX Designer and Software Architect at Primary Information System"
subtitle="From 2017 to 2018 at CEDIN, UCI, Habana, Cuba"
desc="System of steps of primary information at a company. personnel's steps, control of access, impression of credentials, steps of locales, structure and composition. Technologies: Php,Symfony 3.3 , Gitlab, PostgreSQL, , Boostrap 3, JQuery, HTML,CSS, JavaScript"
{experienceSorted.map(experienceEntry => (
<TimeLineElement
title={experienceEntry.data.title}
timeStart={experienceEntry.data.timeStart}
timeEnd={experienceEntry.data.timeEnd}
company={experienceEntry.data.company}
desc={experienceEntry.body}
/>
))}
</div>

<div class="mb-5">
Expand All @@ -58,21 +51,6 @@ import TimeLineElement from "../components/cv/TimeLine.astro";
<div class="mb-5">
<div class="text-3xl w-full font-bold">Skills</div>
</div>

<div class="mb-5">
<div class="text-3xl w-full font-bold">Education</div>
</div>

<div class="time-line-container grid gap-4 mb-10">
<TimeLineElement
title="Technician Information-Technology"
subtitle="2006 to 2009 at Osvaldo Herrera Polytechnic institute, Habana, Cuba"
/>
<TimeLineElement
title="Informatics Science Engineer"
subtitle="2010 to 2015 at University of Informatics Science (UCI), Habana, Cuba"
/>
</div>
<ul class="list-disc md:columns-5 columns-2 mx-6">
<li>Spanish (Native)</li>
<li>English (C2)</li>
Expand Down Expand Up @@ -111,4 +89,18 @@ import TimeLineElement from "../components/cv/TimeLine.astro";
<li>Adobe Photoshop</li>
<li>KdenLive</li>
</ul>
<div class="mb-5">
<div class="text-3xl w-full font-bold">Education</div>
</div>

<div class="time-line-container grid gap-4 mb-10">
<TimeLineElement
title="Technician Information-Technology"
subtitle="2006 to 2009 at Osvaldo Herrera Polytechnic institute, Habana, Cuba"
/>
<TimeLineElement
title="Informatics Science Engineer"
subtitle="2010 to 2015 at University of Informatics Science (UCI), Habana, Cuba"
/>
</div>
</BaseLayout>
10 changes: 5 additions & 5 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ const last_posts = posts.slice(0, 3);
<div class="text-3xl py-3 font-bold">Platform Engineer | Devops | Infrastructure</div>
<div class="py-2">
<text class="text-lg">
Welcome to my personal space, currently living in São Paulo, Brazil. Working as System Engineer in a platform team. <br/>
Interested about Linux; Cloud platforms; Infrastructure as code; Automation; Self hosting; Programming and a lot more. <br/>
I do enjoy drinking some beer! Play competitive videogames. Spend time with family and friends. And living life in general! <br/>
You can get to know more about me <a class="font-bold" href="/aboutme">here</a>. Want to get in contact with me? Feel free to reach me out:
Welcome to my corner of the internet! I am a System Engineer based in São Paulo, Brazil, passionate about technology and all things digital.
I like Linux, cloud platforms, infrastructure as code, automation, self-hosting, programming, and much more.
When I'm not in front of computer, I like to unwind with a cold beer, engage in competitive video gaming, spend quality time with family and friends, and simply enjoy life.
If you'd like to get in touch, please don't hesitate to reach out. If you want to know more about me, <a class="font-bold" href="/aboutme">click here</a>!"
</text>
</div>
<div class="mb-3">
Expand All @@ -39,7 +39,7 @@ const last_posts = posts.slice(0, 3);
title={post.data.title}
img={post.data.heroImage}
desc={post.data.description}
url={"/blog/post/" + post.slug}
url={"/blog/posts/" + post.slug}
target="_self"
/>
<div class="divider my-0"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/rss.xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const get = () =>
title: SITE_TITLE,
description: SITE_DESCRIPTION,
site: import.meta.env.SITE,
items: import.meta.glob('./blog/**/*.md'),
items: import.meta.glob('./blog/posts/**/*.md'),
});
18 changes: 0 additions & 18 deletions src/pages/test/[slug].astro

This file was deleted.

6 changes: 0 additions & 6 deletions src/pages/test/index.astro

This file was deleted.

0 comments on commit f0906c0

Please sign in to comment.