|
|
@@ -0,0 +1,111 @@
|
|
|
+<script>
|
|
|
+ let { data } = $props();
|
|
|
+</script>
|
|
|
+
|
|
|
+<svelte:head>
|
|
|
+ <title>{data.name} — {data.location} — Lee Morgan</title>
|
|
|
+</svelte:head>
|
|
|
+
|
|
|
+<div class="viewer">
|
|
|
+ <a class="btn btn-ghost back" href={`/currency/${encodeURIComponent(data.location)}`}
|
|
|
+ >Back to {data.location}</a
|
|
|
+ >
|
|
|
+ <div class="content">
|
|
|
+ <div class="faces">
|
|
|
+ {#if data.frontImage}
|
|
|
+ <a href={`/currency/${encodeURIComponent(data.location)}/${data.id}/front`}>
|
|
|
+ <img src={data.frontImage} alt="Front of {data.name}" />
|
|
|
+ </a>
|
|
|
+ {/if}
|
|
|
+ {#if data.backImage}
|
|
|
+ <a href={`/currency/${encodeURIComponent(data.location)}/${data.id}/back`}>
|
|
|
+ <img src={data.backImage} alt="Back of {data.name}" />
|
|
|
+ </a>
|
|
|
+ {/if}
|
|
|
+ </div>
|
|
|
+ <h1>{data.name}{#if data.year} <span>{data.year}</span>{/if}</h1>
|
|
|
+ <p class="meta">
|
|
|
+ {#if data.currencyCode}{data.currencyCode}{/if}
|
|
|
+ {#if data.value} · {data.value}{/if}
|
|
|
+ {#if data.type} · {data.type}{/if}
|
|
|
+ </p>
|
|
|
+ {#if data.comment}
|
|
|
+ <p class="comment">{data.comment}</p>
|
|
|
+ {/if}
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<style>
|
|
|
+ .viewer {
|
|
|
+ position: fixed;
|
|
|
+ inset: 0;
|
|
|
+ z-index: 30;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 4.5rem 1.5rem 1.5rem;
|
|
|
+ background: var(--bg);
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .back {
|
|
|
+ position: absolute;
|
|
|
+ top: 1.25rem;
|
|
|
+ left: 1.25rem;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ width: min(72rem, 100%);
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .faces {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: 1fr;
|
|
|
+ gap: 0.85rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ .faces a {
|
|
|
+ display: block;
|
|
|
+ color: inherit;
|
|
|
+ }
|
|
|
+
|
|
|
+ .faces img {
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ max-height: 70svh;
|
|
|
+ object-fit: contain;
|
|
|
+ background: var(--surface);
|
|
|
+ border: 1px solid var(--border);
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ h1 {
|
|
|
+ margin-top: 1.25rem;
|
|
|
+ font-size: 1.25rem;
|
|
|
+ font-weight: 600;
|
|
|
+ letter-spacing: 0.02em;
|
|
|
+ }
|
|
|
+
|
|
|
+ h1 span {
|
|
|
+ font-weight: 500;
|
|
|
+ color: var(--muted);
|
|
|
+ }
|
|
|
+
|
|
|
+ .meta {
|
|
|
+ margin-top: 0.35rem;
|
|
|
+ color: var(--muted);
|
|
|
+ }
|
|
|
+
|
|
|
+ .comment {
|
|
|
+ margin-top: 0.75rem;
|
|
|
+ max-width: 40rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ @media (min-width: 800px) {
|
|
|
+ .faces {
|
|
|
+ grid-template-columns: 1fr 1fr;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|