bgg-ottawa-sell-club/src/routes/+page.svelte

80 lines
2.0 KiB
Svelte
Raw Normal View History

2024-01-31 18:44:13 +00:00
<article>
2024-01-31 18:22:14 +00:00
<h1>Ottawa board games for sale</h1>
<p>This is a list of games for sale or trade of people living in the Ottawa
region, taken from their profiles on
<a href="https://boardgamegeek.com">Board Game Geek</a>.
</p>
<header >
<Search {handler} />
</header>
<table>
<thead>
<tr>
<th>user</th>
<th></th>
<th>game</th>
<th></th>
<th>notes</th>
<th>price</th>
</tr>
</thead>
<tbody>
{#each $rows as row}
<tr>
2024-01-31 18:44:13 +00:00
<td><a target="_top" href={`https://boardgamegeek.com/user/${row.username}`}>{row.username}</a></td>
2024-01-31 18:22:14 +00:00
<td><a
2024-01-31 18:44:13 +00:00
target="_top"
2024-01-31 18:22:14 +00:00
href={`https://boardgamegeek.com/geekmail/compose?touser=${row.username}`}>bgg
mail</a></td>
2024-01-31 18:44:13 +00:00
<td> <a
target="_top"
href={`https://boardgamegeek.com/boardgame/${row.bgg_id}`}>
{row.name}</a>
</td>
2024-01-31 18:22:14 +00:00
<td>
2024-01-31 18:44:13 +00:00
<a
target="_top"
href={`https://boardgamegeek.com/boardgame/${row.bgg_id}`}>
<img src={row.thumbnail} height="60"/></a>
2024-01-31 18:22:14 +00:00
</td>
<td>{row.notes}</td>
<td>{row.price??''}</td>
</tr>
{/each}
</tbody>
</table>
2024-01-31 18:44:13 +00:00
</article>
2024-01-31 18:22:14 +00:00
<script>
// TODO BGG mail the user
// TODO add cart
// prettify
import { DataHandler, Search } from '@vincjo/datatables'
export let data;
const handler = new DataHandler(data.games, { rowsPerPage: 50 })
const rows = handler.getRows()
</script>
2024-01-31 18:44:13 +00:00
<style>
:global(:root) {
--font-size-10: 1rem;
--font-size-11: 1.5rem;
--font-size-12: 1.75rem;
--font-size-13: 2rem;
--font-size-14: 2.25rem;
}
p {
font-size: var(--font-size-10);
}
a {
color: var(--primary);
text-decoration: underline;
}
</style>