summaryrefslogtreecommitdiff
path: root/src/routes/team/PersonBio.svelte
blob: 437f57ba446e3e7377ef5b96ac55712d0aafcfad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<script>
  export let bio;
  let showMore = false;
</script>

<main>
  {#if showMore}
    <p>{bio}</p>
    <button on:click={() => showMore = false}>Show Less</button>
  {:else}
    <p>{bio.substr(0, bio.lastIndexOf(' ', 150)) + '...'}</p>
    <button on:click={() => showMore = true}>Show More</button>
  {/if}
</main>

<style>
  p {
    white-space: pre-line;
  }
</style>