Skip to content

Commit

Permalink
feat(front): adds svg implementation to skills pages (#991)
Browse files Browse the repository at this point in the history
Closes: #991
  • Loading branch information
dgrebb committed Nov 15, 2023
1 parent ea34ce6 commit f821c68
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 12 deletions.
4 changes: 2 additions & 2 deletions front/src/lib/_utils/shape-shifters/shapeSkillData.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ export async function shapeSkillData(data) {
let skill,
hero,
slug,
svg,
summary,
proficiency,
icon,
classifications,
projects,
positions,
Expand All @@ -14,9 +14,9 @@ export async function shapeSkillData(data) {
skill = {
hero,
slug,
svg,
summary,
proficiency,
icon,
classifications,
projects,
positions,
Expand Down
7 changes: 5 additions & 2 deletions front/src/lib/components/cv/Skill.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
skill,
hero,
slug: skillSlug,
svg,
summary,
proficiency,
icon,
classifications: { data: classifications },
certifications: { data: certifications },
projects: { data: projects },
Expand All @@ -17,7 +17,10 @@
} = content.skill;
</script>

<h1 class="collection-title">{skill}</h1>
<h1 class="collection-title">
{#if svg}<span class="skill-icon">{@html svg}</span>{/if}
{skill}
</h1>
{#if summary}
<p>{summary}</p>
{/if}
Expand Down
16 changes: 14 additions & 2 deletions front/src/lib/styles/pages/cv.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@
}
}

.main h1.collection-title {
font-size: 12rem;
.main .meat h1.collection-title {
position: relative;
height: auto;
font-size: 9rem;
line-height: 1;
.skill-icon {
display: inline-block;
padding-right: 1rem;
width: 3rem;
height: 3rem;
svg {
height: 100%;
}
}
}
19 changes: 13 additions & 6 deletions front/src/routes/cv/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@
{#if hero}
<img src={hero.url} alt={hero.alternativeText} />
{/if}
<div class="summary">
{intro}
</div>
{#if intro}
<div class="summary">
{intro}
</div>
{/if}
{#each positions as { title, slug, startDate, endDate, summary, awards, industries, organizations, projects, skills }, i}
<div class="position-timeline-item">
<h1><a href="/cv/position/{slug}">{title}</a></h1>
<date class="position-timeline-date"
>{#if endDate}{startDate}{:else}Current{/if}</date
>
<p>{summary}</p>
{#if summary}
<p>{summary}</p>
{/if}
{#each awards as { attributes: { award, slug: awardSlug, URL }, i }}
<a href="/cv/award/{awardSlug}">
<h3>{award}</h3>
Expand All @@ -42,9 +46,12 @@
<a href="/cv/project/{projectSlug}"> <h3>{name}</h3></a>
<a href={URL}>Check it out</a>
{/each}
{#each skills as { attributes: { skill, slug: skillSlug, proficiency, summary }, i }}
{#each skills as { attributes: { skill, slug: skillSlug, svg, proficiency, summary }, i }}
<a href="/cv/skill/{skillSlug}">
<h3>{skill} ➔ {proficiency}</h3>
<h3>
{#if svg}<span class="skill-icon">{@html svg}</span>{/if}{skill} ➔
{proficiency}
</h3>
</a>
{/each}
{#each industries as { attributes: { industry, slug: industrySlug }, i }}
Expand Down

0 comments on commit f821c68

Please sign in to comment.