diff --git a/src/components/sections/keynoters/keynoter.astro b/src/components/sections/keynoters/keynoter.astro index e07a289b4..2586be20f 100644 --- a/src/components/sections/keynoters/keynoter.astro +++ b/src/components/sections/keynoters/keynoter.astro @@ -33,11 +33,7 @@ const Placeholder = ---
  • - +
    { image ? ( @@ -61,9 +57,18 @@ const Placeholder =

    More keynoters coming soon

    ) : ( <> -

    - {name} -

    + {url ? ( +

    + + {name} + +

    + ) : ( +

    {name}

    + )} {tagline && (

    {tagline}

    )} @@ -71,5 +76,5 @@ const Placeholder = ) }
    - +
  • diff --git a/src/components/sections/keynoters/keynoters.astro b/src/components/sections/keynoters/keynoters.astro index d802179e9..94f1eef78 100644 --- a/src/components/sections/keynoters/keynoters.astro +++ b/src/components/sections/keynoters/keynoters.astro @@ -19,7 +19,7 @@ const placeholders = Math.max(0, 5 - keynoters.length); .map((keynoter, _index) => ( ({ - params: { slug: entry.id }, - props: { entry }, - })); -} - -const { entry } = Astro.props; -const { - name, - tagline, - image, - mastodon_url, - bluesky_url, - twitter_url, - linkedin_url, - github_url, - homepage, -} = entry.data; - -const { Content } = await render(entry); - -function getMastodonUsername(url: string): string | null { - const match = url.match(/https?:\/\/([^\/]+)\/@([^\/]+)(\/|\?|$)/); - return match ? `@${match[2]}@${match[1]}` : null; -} - -function getBlueskyUsername(url: string): string { - const username = url.split("/").pop()?.replace(/^@/, ""); - return username ? `@${username}` : url; -} ---- - - -
    - -
    - { - image && ( -
    - {`A -
    - ) - } -
    - - {tagline && ( -

    {tagline}

    - )} -
    -
    - - -

    - Biography -

    - - - - - - - { - (homepage || - mastodon_url || - bluesky_url || - twitter_url || - linkedin_url || - github_url) && ( -
    -

    - More about the speaker -

    -
    - {homepage && ( - <> -
    Website
    -
    - - {homepage.replace(/^https?:\/\//, "")} - -
    - - )} - {linkedin_url && ( - <> -
    LinkedIn
    -
    - - {linkedin_url} - -
    - - )} - {mastodon_url && ( - <> -
    Mastodon
    -
    - - {getMastodonUsername(mastodon_url) ?? mastodon_url} - -
    - - )} - {bluesky_url && ( - <> -
    Bluesky
    -
    - - {getBlueskyUsername(bluesky_url)} - -
    - - )} - {twitter_url && ( - <> -
    Twitter / X
    -
    - - @{twitter_url.split("/").pop()} - -
    - - )} - {github_url && ( - <> -
    GitHub
    -
    - - @{github_url.split("/").pop()} - -
    - - )} -
    -
    - ) - } -
    -
    -
    - -