Skip to content

Commit

Permalink
fix: tag former team members as such in blog
Browse files Browse the repository at this point in the history
Fixes SIGN-584

- Add (former) to person component
- Pass is_active to person as prop in blog-entry
- Pass is_active to person as prop in blog-post
  • Loading branch information
nunopolonia committed Dec 18, 2023
1 parent 55f9171 commit 86d9981
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/blog-entry.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<div class="container mx-auto flex gap-6 px-container py-8 @container">
<div class="hidden flex-1 @6xl:block">
<Person
is_active={post.content.author.content.is_active}
name={post.content.author.name}
position={post.content.author.content.position}
photo={post.content.author.content?.photo}
Expand Down
7 changes: 6 additions & 1 deletion src/components/pages/blog-post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@
{#if story.content.author?.id}
{@const author = story.content.author}
<div use:drawerLinks class="mx-auto mt-10 max-w-2xl border-b border-t py-8 md:mt-14 lg:mt-20">
<Person name={author.name} position={author.content.position} photo={author.content.photo} />
<Person
is_active={author.content.is_active}
name={author.name}
position={author.content.position}
photo={author.content.photo}
/>
<p class="mt-6 text-xl text-foreground-secondary">{author.content.bio}</p>
<Button
variant="secondary"
Expand Down
4 changes: 3 additions & 1 deletion src/components/person.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { t } from '$lib/i18n';
import { getImageAttributes } from '$lib/utils/cms';
import type { AssetStoryblok } from '$types/bloks';
import { Avatar } from '@significa/svelte-ui';
Expand All @@ -7,6 +8,7 @@
let className: string | undefined = undefined;
export { className as class };
export let is_active: boolean | undefined = undefined;
export let name: string;
export let position: string | undefined = undefined;
export let photo: AssetStoryblok | undefined = undefined;
Expand All @@ -24,7 +26,7 @@
{/if}
{#if position}
<p class="mt-1 text-base font-semibold leading-none text-foreground-secondary">
{position}
{!is_active ? `${t('team.former')} ` : ''}{position}
</p>
{/if}
</div>
Expand Down

0 comments on commit 86d9981

Please sign in to comment.