Skip to content

Commit

Permalink
feat(frontend): display both place types
Browse files Browse the repository at this point in the history
  • Loading branch information
jmiguelv committed Jul 22, 2024
1 parent 839b732 commit 1c460c5
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions frontend/src/lib/components/InscriptionPlace.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
<script>
export let inscription;
const mainPlace = inscription.places[0];
const otherPlace = inscription.places[1];
</script>

<div class="inscription-place">
{#if inscription.place.offset}<em>{inscription.place.offset}</em>{/if}
{#if inscription.place.ref}
<a href={inscription.place.ref}>{inscription.place._}</a>
{:else}
{inscription.place._}
{/if}
{#each [mainPlace, otherPlace] as place}
{#if place}
<span
>{#if place.offset}<em>{place.offset}</em>{/if}
{#if place.ref}
<a href={place.ref}>{place._}</a>
{:else}
{place._}
{/if}
({place.type})</span
>
{/if}
{/each}
</div>

<style>
span + span::before {
content: ', ';
}
</style>

0 comments on commit 1c460c5

Please sign in to comment.