Skip to content

Commit

Permalink
wip(front): float CV collection aside
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrebb committed Jan 28, 2024
1 parent 0c96949 commit 63bee2a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,57 +1,64 @@
<script>
import Aside from '@components/general/Aside/Aside.svelte';
import AsideGroup from '@components/general/Aside/AsideGroup.svelte';
import SkillBreakdown from './SkillBreakdown/SkillBreakdown.svelte';
import '@styles/pages/experience.css';
import SkillBreakdown from '@components/cv/SkillBreakdown/SkillBreakdown.svelte';
import './experience.css';
let collection = 'experience';
export let content;
let {
name,
title,
body,
// skills: { data: skills },
skills: { data: skills },
highlightedSkills,
projects: { data: projects },
organizations: { data: orgs },
} = content.experience;
</script>

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

{#if highlightedSkills.length}
<SkillBreakdown skills={highlightedSkills} />
<!-- <div class="skill-graph">
{#each highlightedSkills as skill}
<p>{skill.name} - {skill.percentage}</p>
{/each}
</div> -->
{/if}
</header>

<Aside>
{#if orgs?.length}
<AsideGroup
collection="experience"
{collection}
title={`Organization${orgs.length > 1 ? 's' : ''}`}
items={orgs}
singleton="organization"
/>
{/if}
{#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>

{#if body}
{@html body}
{/if}

<!-- {#each skills as { attributes: { name, slug: skillSlug } }}
<h2><a href="/cv/skill/{skillSlug}">{name}</a></h2>
{/each} -->

{#each projects as { attributes: { name, slug: projectSlug } }}
<h2><a href="/cv/project/{projectSlug}">{name}</a></h2>
{/each}
<section class="experience__body">
{#if body}
{@html body}
{/if}
</section>
</article>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

.experience {
&__header {
margin-bottom: 3rem;
text-align: center;
& h1,
h2 {
Expand Down
7 changes: 7 additions & 0 deletions front/src/lib/components/general/Aside/Aside.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,10 @@
</ul>
{/if} -->
</aside>

<style lang="postcss">
.collection__aside {
float: right;
padding-left: 2rem;
}
</style>
2 changes: 1 addition & 1 deletion front/src/lib/components/general/PageNav/PageNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { categoryClick, relatedClick } from '@utils/uiHelpers.js';
import { focusTrap } from '@utils/actions.js';
import ListIcon from '~icons/gg/list';
import '@styles/components/page-nav.css';
import './page-nav.css';
export let toc = false;
export let categories = false;
Expand Down
2 changes: 1 addition & 1 deletion front/src/routes/cv/[collection]/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import Classification from '@components/cv/Classification.svelte';
import Industry from '@components/cv/Industry.svelte';
import Organization from '@components/cv/Organization.svelte';
import Experience from '@components/cv/Experience.svelte';
import Experience from '@components/cv/Experience/Experience.svelte';
import Project from '@components/cv/Project.svelte';
import Skill from '@components/cv/Skill.svelte';
import '@styles/pages/cv.css';
Expand Down

0 comments on commit 63bee2a

Please sign in to comment.