-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make /Items display craftable items only
/Items/All now displays all items.
- Loading branch information
1 parent
71a12ec
commit 0eb62a4
Showing
8 changed files
with
85 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {getData} from '$lib/data'; | ||
|
||
export const load = async () => { | ||
const data = await getData(); | ||
|
||
return { | ||
items: Object.entries(data.items) | ||
.sort(([, a], [, b]) => { | ||
return a.displayName.localeCompare(b.displayName); | ||
}), | ||
title: 'Items', | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script lang="ts"> | ||
import GameIcon from '$lib/GameIcon.svelte' | ||
export let data; | ||
</script> | ||
|
||
<h1>All Icarus Items</h1> | ||
<p> | ||
This includes items that are experimental and not craftable. For a list of craftable items, go | ||
<a href="/Items" class="link">here</a>. | ||
</p> | ||
|
||
<div class="items"> | ||
{#each data.items as [name, item]} | ||
<a href="/Items/Item/{name}"> | ||
<GameIcon | ||
icon={item.icon} | ||
alt="{item.displayName}" | ||
size="64" | ||
showCaption={false}></GameIcon> | ||
<h2>{item.displayName}</h2> | ||
</a> | ||
{/each} | ||
</div> | ||
|
||
<style> | ||
h2 { | ||
font-size: 1.3em; | ||
} | ||
.items { | ||
display: grid; | ||
gap: 2em; | ||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | ||
--game-icon-width: 64px; | ||
} | ||
.items a { | ||
display: flex; | ||
align-items: center; | ||
color: white; | ||
gap: 4px; | ||
text-decoration: none; | ||
} | ||
</style> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,7 @@ h2 { | |
h3 { | ||
font-size: 1.3em; | ||
} | ||
|
||
a.link { | ||
text-decoration: underline; | ||
} |