diff --git a/src/components/ExperienceItem.svelte b/src/components/ExperienceItem.svelte index 9be9a9d..c86a398 100644 --- a/src/components/ExperienceItem.svelte +++ b/src/components/ExperienceItem.svelte @@ -5,14 +5,6 @@ } from '$lib/utils'; import List from './List'; - const PRINT_TRUNCATE_NUMBER_OF_YEARS = 4; - - function shouldHideFromPrint() { - const itemStartYear = parseInt(end.year); - const yearsAgo = new Date().getFullYear() - PRINT_TRUNCATE_NUMBER_OF_YEARS; - return itemStartYear < yearsAgo; - } - export let name; export let description = null; export let start = {}; @@ -21,6 +13,7 @@ export let role = ''; export let isContractor = false; export let technologies = []; + export let includeInPrint = true; const numberOfFullMonths = getNumberOfMonthsBetweenDates(start, end); const duration = formatMonthsToYearsAndMonths(numberOfFullMonths); @@ -29,7 +22,7 @@
diff --git a/src/components/Section.svelte b/src/components/Section.svelte index 7623d5a..3c4787b 100644 --- a/src/components/Section.svelte +++ b/src/components/Section.svelte @@ -3,6 +3,8 @@ import ExperienceItem from './ExperienceItem.svelte'; import Timeline from './Timeline.svelte'; + const NUMBER_OF_ITEMS_TO_SHOW_IN_PRINT = 6; + export let title; export let items = []; export let showTimeline = false; @@ -35,8 +37,8 @@ class="divided space-y-4 p-8 md:p-12 pt-0 md:pt-0 print:!p-0" class:!pt-8={showTimeline} > - {#each items as item} - + {#each items as item, idx} + {/each}
{/if} diff --git a/src/components/Summary.svelte b/src/components/Summary.svelte index 10696ed..7bac9f6 100644 --- a/src/components/Summary.svelte +++ b/src/components/Summary.svelte @@ -16,7 +16,7 @@

{name} @@ -97,7 +97,7 @@ {/if} {/if} -