Skip to content

Commit

Permalink
Make character and weapon in items page clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
MadeBaruna committed Sep 8, 2021
1 parent d362944 commit 3587634
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/routes/items.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@
</td>
<td class="border-gray-700 border-b py-2">
{#each chars as char}
<div
<a
href="/characters/{char}"
class="h-12 w-12 md:h-14 md:w-14 cursor-pointer mr-2 hover:bg-background rounded-xl
inline-flex items-center justify-center align-top"
>
Expand All @@ -223,7 +224,7 @@
alt={char}
title={characters[char].name}
/>
</div>
</a>
{/each}
</td>
</tr>
Expand Down Expand Up @@ -257,7 +258,8 @@
</td>
<td class="border-gray-700 border-b weapon-cell pt-2">
{#each weapons as weapon}
<div
<a
href="/weapons/{weapon}"
class="h-12 w-12 md:h-14 md:w-14 cursor-pointer mr-2 mb-2 hover:bg-background rounded-xl
inline-flex items-center justify-center align-top"
>
Expand All @@ -267,7 +269,7 @@
alt={weapon}
title={weaponList[weapon].name}
/>
</div>
</a>
{/each}
</td>
</tr>
Expand Down Expand Up @@ -308,7 +310,8 @@
</td>
<td class="border-gray-700 border-b align-middle pt-2 weapon-cell">
{#each Object.entries(char) as [charName, type]}
<div
<a
href="/{type}/{charName}"
class="h-12 w-12 md:h-14 md:w-14 mb-2 cursor-pointer mr-2 hover:bg-background rounded-xl
inline-flex items-center justify-center align-top"
>
Expand All @@ -318,7 +321,7 @@
alt={charName}
title={type === 'characters' ? characters[charName].name : weaponList[charName].name}
/>
</div>
</a>
{/each}
</td>
</tr>
Expand Down

0 comments on commit 3587634

Please sign in to comment.