Skip to content

Commit

Permalink
wip(front): style and component structure for Skill Breakdown
Browse files Browse the repository at this point in the history
## Describe your changes

Skill Breakdown graph component, styles, animations, and layout.

## Issue ticket number and link

- closes #1191
- addresses https://github.com/dgrebb/dgrebb.com/security/dependabot/50

## Checklist before requesting a review

- [x] Code linting succeeds
- [x] Visual Regression is Passing
- [x] I have performed a self-review of my code
- [x] Do we need to implement analytics?
- [x] Have you tested with JavaScript off?
  • Loading branch information
dgrebb authored Jan 28, 2024
1 parent 2b4937d commit c4078d0
Show file tree
Hide file tree
Showing 32 changed files with 565 additions and 364 deletions.
1 change: 1 addition & 0 deletions _ci/spell/dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ rdquo
regexall
replacestate
reportsdomain
Résumé
runneth
shineth
softlight
Expand Down
8 changes: 8 additions & 0 deletions back/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,13 @@
"strapi": {},
"devDependencies": {
"prop-types": "^15.8.1"
},
"overrides": {
"vite": "^4.5.2"
},
"pnpm": {
"overrides": {
"vite@<5.0.12": ">=5.0.12"
}
}
}
21 changes: 12 additions & 9 deletions back/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 18 additions & 14 deletions front/src/lib/components/cv/Award.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,25 @@
} = content.award;
</script>

<h1 class="collection-title">Awards</h1>
<article>
<header class="experience__header">
<p class="collection__title">Awards</p>
<h1>{name}</h1>
</header>

<h1>{name}</h1>
{#each experiences as { attributes: { name, slug: experienceSlug } }}
<h2><a href="/cv/experience/{experienceSlug}">{name}</a></h2>
{/each}
{#each experiences as { attributes: { name, slug: experienceSlug } }}
<h2><a href="/cv/experience/{experienceSlug}">{name}</a></h2>
{/each}

{#if body}
{body}
{/if}
{#if body}
{body}
{/if}

{#each projects as { attributes: { name, slug: projectSlug } }}
<h2><a href="/cv/project/{projectSlug}">{name}</a></h2>
{/each}
{#each projects as { attributes: { name, slug: projectSlug } }}
<h2><a href="/cv/project/{projectSlug}">{name}</a></h2>
{/each}

{#each experiences as { attributes: { name, slug: experienceSlug } }}
<h2><a href="/cv/experience/{experienceSlug}">{name}</a></h2>
{/each}
{#each experiences as { attributes: { name, slug: experienceSlug } }}
<h2><a href="/cv/experience/{experienceSlug}">{name}</a></h2>
{/each}
</article>
21 changes: 12 additions & 9 deletions front/src/lib/components/cv/Certification.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
} = content.certification;
</script>

<h1 class="collection-title">Certifications</h1>
<article>
<header class="experience__header">
<p class="collection__title">Certifications</p>

<h1>{name}</h1>

{#if body}
{body}
{/if}
{#each skills as { attributes: { name, slug: skillSlug } }}
<h2><a href="/cv/skill/{skillSlug}">{name}</a></h2>
{/each}
<h1>{name}</h1>
</header>
{#if body}
{body}
{/if}
{#each skills as { attributes: { name, slug: skillSlug } }}
<h2><a href="/cv/skill/{skillSlug}">{name}</a></h2>
{/each}
</article>
42 changes: 23 additions & 19 deletions front/src/lib/components/cv/Classification.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@
} = content.classification;
</script>

<h1 class="collection-title">Trades</h1>
<article>
<header class="experience__header">
<p class="collection__title">Trades</p>

<h1>{name}</h1>
{#if summary}
<p>{summary}</p>
{/if}
<h1>{name}</h1>
{#if summary}
<p>{summary}</p>
{/if}
</header>

{#if body}
{body}
{/if}
{#if body}
{body}
{/if}

<!-- TODO: each of these should be placed in a single component and passed the data, or just the collection name -->
{#if skills.length}
<h2>skills</h2>
<ul class="collection-attributes">
{#each skills as { attributes: { name, slug: skillSlug } }}
<li class="attribute">
<a href="/cv/skill/{skillSlug}">{name}</a>
</li>
{/each}
</ul>
{/if}
<!-- TODO: each of these should be placed in a single component and passed the data, or just the collection name -->
{#if skills.length}
<h2>skills</h2>
<ul class="collection-attributes">
{#each skills as { attributes: { name, slug: skillSlug } }}
<li class="attribute">
<a href="/cv/skill/{skillSlug}">{name}</a>
</li>
{/each}
</ul>
{/if}
</article>
40 changes: 0 additions & 40 deletions front/src/lib/components/cv/Experience.svelte

This file was deleted.

69 changes: 69 additions & 0 deletions front/src/lib/components/cv/Experience/Experience.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<script>
import Aside from '@components/general/Aside/Aside.svelte';
import AsideGroup from '@components/general/Aside/AsideGroup.svelte';
import SkillBreakdown from '@components/cv/SkillBreakdown/SkillBreakdown.svelte';
import './experience.css';
let collection = 'experience';
export let content;
let {
name,
title,
body,
skills: { data: skills },
highlightedSkills,
projects: { data: projects },
organizations: { data: orgs },
} = content.experience;
</script>

<article class="experience__article">
<header class="experience__header">
<p class="collection__title">Experience</p>
<h1 class="experience__title">
{name}
</h1>

{#if highlightedSkills.length}
<SkillBreakdown skills={highlightedSkills} />
{/if}
</header>

<Aside>
{#if orgs?.length}
<h2>Organizations</h2>
<p>
{#each orgs as { attributes: { name, slug } }, key}
<a href="/cv/organization/{slug}"
>{name}{key === orgs.length ? ',' : ''}</a
>
{/each}
</p>
{/if}
<h2>Title</h2>
<p>{title}</p>
{#if projects?.length}
<AsideGroup
{collection}
title={`Project${projects.length > 1 ? 's' : ''}`}
items={projects}
singleton="project"
/>
{/if}
{#if skills?.length}
<AsideGroup
{collection}
title={`Skill${skills.length > 1 ? 's' : ''}`}
items={skills}
singleton="skill"
/>
{/if}
</Aside>

<section class="experience__body">
{#if body}
{@html body}
{/if}
</section>
</article>
35 changes: 35 additions & 0 deletions front/src/lib/components/cv/Experience/experience.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.cv.experience {
position: relative;
}

.experience {
&__header {
margin-bottom: 3rem;
text-align: center;
& h1,
h2 {
filter: brightness(1);
transition-duration: var(--transition-duration);
transition-property: filter, opacity;
transition-timing-function: var(--transition-timing-function);
}
@media screen and (min-width: 640px) {
&:has(
.skill-graph:hover,
.skill-graph:active,
.skill-graph:focus-visible,
.skill-graph:focus
) {
& h1,
h2 {
opacity: 0.3;
filter: brightness(0.2) blur(0.5rem);
transition-duration: var(--transition-duration-fast);
}
}
}
}
&__title {
padding: 0.25rem 0 2rem 0;
}
}
Loading

0 comments on commit c4078d0

Please sign in to comment.