Add configuration for skills section title and to exclude section (#158)

This commit is contained in:
Szymon Kin 2023-01-18 20:39:22 +01:00 committed by GitHub
parent 04dfc6e659
commit 4b96b84c31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 30 deletions

View file

@ -27,6 +27,7 @@ const skillsData: SkillsSection = {
skillSets: [
{
title: 'I already know',
pdfTitle: 'Technologies',
skills: [
react({
level: 5,
@ -62,10 +63,12 @@ const skillsData: SkillsSection = {
},
{
title: 'I want to learn',
excludeFromPdf: true,
skills: [apolloGraphql(), astro(), supabase(), cypress()],
},
{
title: 'I speak',
pdfTitle: 'Languages',
skills: [
{ icon: 'circle-flags:pl', name: 'Polish - native' },
{ icon: 'circle-flags:us', name: 'English - C1' },

View file

@ -14,9 +14,11 @@ const {
<SectionHeading>{title}</SectionHeading>
<div class="flex flex-col gap-5">
{
skillSets.map((skillSet) => (
skillSets.map(
(skillSet) =>
!skillSet.excludeFromPdf && (
<div>
<div class="text-base font-extrabold text-gray-900">{skillSet.title}</div>
<div class="text-base font-extrabold text-gray-900">{skillSet.pdfTitle || skillSet.title}</div>
<div class="mt-2 flex flex-wrap gap-3.5 text-sm text-gray-700">
{skillSet.skills.map((skill) => {
if ('level' in skill) {
@ -41,11 +43,14 @@ const {
);
}
return <div class="flex h-6 w-fit items-center rounded bg-gray-100 px-2.5 font-medium">{skill.name}</div>;
return (
<div class="flex h-6 w-fit items-center rounded bg-gray-100 px-2.5 font-medium">{skill.name}</div>
);
})}
</div>
</div>
))
)
)
}
</div>
</div>

View file

@ -7,6 +7,8 @@ export interface LevelledSkill extends Tag {
export interface SkillSet<SkillType> {
title: string;
skills: SkillType[];
pdfTitle?: string;
excludeFromPdf?: boolean;
}
export interface SkillsSection {