Skip to content

Commit

Permalink
Make github URL in projectcredits an optional prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchthorson committed Dec 28, 2023
1 parent 5b3d917 commit 7d7c742
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/lib/ProjectCredits/ProjectCredits.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import Heading from "$lib/HeadingAlt/HeadingAlt.svelte";
import TextBlock from "$lib/TextBlock/TextBlock.svelte";
import Block from "$lib/Block/Block.svelte"
import Block from "$lib/Block/Block.svelte";
import "../style/app.css";
/**
Expand All @@ -24,10 +24,9 @@
/**
* An optional link to a Github repo to display
* @type {string}
* @type {string | null} [githubUrl=null]
*/
export let githubUrl;
export let githubUrl = null;
</script>

<Block>
Expand All @@ -37,17 +36,17 @@
<TextBlock {value} />
{/each}
<Block>
<ul>
{#each items as item}
<li>
<span class="label">{item.label}</span>
{@html item.content}
</li>
{/each}
</ul>
<ul>
{#each items as item}
<li>
<span class="label">{item.label}</span>
{@html item.content}
</li>
{/each}
</ul>
</Block>
{#if githubUrl}
<TextBlock content="View the project on <a href='{githubUrl}' target='_blank'>Github</a>."/>
<TextBlock content="View the project on <a href='{githubUrl}' target='_blank'>Github</a>." />
{/if}

<style>
Expand All @@ -71,7 +70,7 @@
color: var(--color-text-accent);
}
@media(min-width: 769px) {
@media (min-width: 769px) {
ul {
font-size: var(--font-size-xl);
}
Expand Down

0 comments on commit 7d7c742

Please sign in to comment.