diff --git a/src/app.d.ts b/src/app.d.ts
index 039bbe1..44ed404 100755
--- a/src/app.d.ts
+++ b/src/app.d.ts
@@ -10,7 +10,9 @@ declare global {
session: typeof import('$lib/server/auth').auth.$Infer.Session.session | null;
}
// interface PageData {}
- // interface PageState {}
+ interface PageState {
+ animal?: import('$lib/animaldex/AnimalDetails.svelte').AnimalDetail;
+ }
// interface Platform {}
}
}
diff --git a/src/lib/animaldex/AnimalDetails.svelte b/src/lib/animaldex/AnimalDetails.svelte
new file mode 100644
index 0000000..be989ce
--- /dev/null
+++ b/src/lib/animaldex/AnimalDetails.svelte
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+ {#if activePhoto}
+

+ {:else}
+
+ {/if}
+
+ {#if allPhotos.length > 1}
+
+ {#each allPhotos as photo (photo.id)}
+ -
+
+
+ {/each}
+
+ {/if}
+
+
+
+
{title}
+
+ {animal.species}{animal.breed ? ` · ${animal.breed}` : ''}
+
+
+ {#if animal.description}
+
{animal.description}
+ {/if}
+
+
+
+
- sightings
+ - {animal.sightings.length}
+
+ {#if firstSeen}
+
+
- first seen
+ - {formatDate(firstSeen)}
+
+ {/if}
+ {#if lastSeen}
+
+
- last seen
+ - {formatDate(lastSeen)}
+
+ {/if}
+
+
+
+ i saw this animal too
+
+
+
sighting history
+
+ {#each animal.sightings as s (s.id)}
+ -
+ {#if s.photos[0]}
+
+ {:else}
+
+ {/if}
+
+ {formatDate(s.seenAt)}
+ {#if s.reporterName}by {s.reporterName}{/if}
+
+
+ {/each}
+
+
+
diff --git a/src/params/integer.ts b/src/params/integer.ts
new file mode 100644
index 0000000..7c6e0f8
--- /dev/null
+++ b/src/params/integer.ts
@@ -0,0 +1,3 @@
+import type { ParamMatcher } from '@sveltejs/kit';
+
+export const match: ParamMatcher = (param) => /^\d+$/.test(param);
diff --git a/src/routes/projects/animaldex/+page.svelte b/src/routes/projects/animaldex/+page.svelte
index 0123d38..ebadee5 100644
--- a/src/routes/projects/animaldex/+page.svelte
+++ b/src/routes/projects/animaldex/+page.svelte
@@ -1,8 +1,9 @@
+
+