Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tag former team members as such in blog #298

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
isActive={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
isActive={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 isActive: boolean = true;
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}
{!isActive ? `${t('team.former')} ` : ''}{position}
</p>
{/if}
</div>
Expand Down