-
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.
- Loading branch information
1 parent
c902808
commit 3ba909a
Showing
17 changed files
with
130 additions
and
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"useTabs": true, | ||
"tabWidth": 4, | ||
"singleQuote": false, | ||
"semi": false, | ||
"printWidth": 100, | ||
"trailingComma": "none", | ||
|
||
"svelteStrictMode": true, | ||
|
||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<script> | ||
import "$src/app.css" | ||
import "$src/app.css" | ||
const { children } = $props() | ||
const { children } = $props() | ||
</script> | ||
|
||
{@render children()} | ||
{@render children()} |
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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
<script> | ||
import { base } from "$app/paths" | ||
import { base } from "$app/paths" | ||
const { children, data } = $props() | ||
const { children, data } = $props() | ||
</script> | ||
|
||
{#snippet link(text, destination)} | ||
<a | ||
href="{base}/{data.region}/{destination}" | ||
class="grow h-full center-children odd:bg-slate-600 hover:bg-slate-800" | ||
> | ||
<p>{text}</p> | ||
</a> | ||
<a | ||
href="{base}/{data.region}/{destination}" | ||
class="center-children h-full grow odd:bg-slate-600 hover:bg-slate-800" | ||
> | ||
<p>{text}</p> | ||
</a> | ||
{/snippet} | ||
|
||
<div class="h-10 bg-slate-700 text-gray-200 w-full fixed z-10"> | ||
<div class="w-full md:w-[50%] xl:w-[30%] h-full center-children m-auto"> | ||
{@render link(data.strings.depot, "depot")} | ||
{@render link(data.strings.enemies, "enemies")} | ||
{@render link(data.strings.operators, "operators")} | ||
{@render link(data.strings.glossary, "glossary")} | ||
</div> | ||
<div class="fixed z-10 h-10 w-full bg-slate-700 text-gray-200"> | ||
<div class="center-children m-auto h-full w-full md:w-[50%] xl:w-[30%]"> | ||
{@render link(data.strings.depot, "depot")} | ||
{@render link(data.strings.enemies, "enemies")} | ||
{@render link(data.strings.operators, "operators")} | ||
{@render link(data.strings.glossary, "glossary")} | ||
</div> | ||
</div> | ||
|
||
<div class="min-w-dvw min-h-dvh bg-gray-800 text-gray-200 pt-10"> | ||
{@render children()} | ||
<div class="min-w-dvw min-h-dvh bg-gray-800 pt-10 text-gray-200"> | ||
{@render children()} | ||
</div> |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="w-full h-full center-children"> | ||
<p class="text-3xl font-bold"> | ||
Build time: {new Date().toUTCString()} | ||
</p> | ||
<div class="center-children h-full w-full"> | ||
<p class="text-3xl font-bold"> | ||
Build time: {new Date().toUTCString()} | ||
</p> | ||
</div> |
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 |
---|---|---|
@@ -1,39 +1,35 @@ | ||
<script> | ||
import { base } from "$app/paths" | ||
import { IMAGE_CDN, ASSETS_BASE } from "$lib/constants" | ||
import { base } from "$app/paths" | ||
import { IMAGE_CDN, ASSETS_BASE } from "$lib/constants" | ||
const { data } = $props() | ||
const { data } = $props() | ||
const displayedEnemies = Object.values(data.enemiesTable).toSorted( | ||
(a, b) => a.sortId - b.sortId, | ||
) | ||
const displayedEnemies = Object.values(data.enemiesTable).toSorted( | ||
(a, b) => a.sortId - b.sortId | ||
) | ||
</script> | ||
|
||
<svelte:head> | ||
<title>{data.strings.enemies}</title> | ||
<title>{data.strings.enemies}</title> | ||
</svelte:head> | ||
|
||
<main | ||
class="max-w-3xl m-auto p-2 grid grid-cols-4 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7" | ||
> | ||
{#each displayedEnemies as enemy (enemy.enemyId)} | ||
{@const iconPath = data.iconPaths[enemy.enemyId]} | ||
{@const url = iconPath | ||
? `${IMAGE_CDN}${ASSETS_BASE}/${iconPath}` | ||
: "/missing.png"} | ||
<main class="m-auto grid max-w-3xl grid-cols-4 p-2 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7"> | ||
{#each displayedEnemies as enemy (enemy.enemyId)} | ||
{@const iconPath = data.iconPaths[enemy.enemyId]} | ||
{@const url = iconPath ? `${IMAGE_CDN}${ASSETS_BASE}/${iconPath}` : "/missing.png"} | ||
|
||
<a | ||
href="{base}/{data.region}/enemies/{enemy.enemyId}" | ||
class="relative hover:scale-110" | ||
title={enemy.name} | ||
> | ||
<div class="min-w-[30%] text-center absolute right-0 bg-black p-1"> | ||
<p>{enemy.code}</p> | ||
</div> | ||
<a | ||
href="{base}/{data.region}/enemies/{enemy.enemyId}" | ||
class="relative hover:scale-110" | ||
title={enemy.name} | ||
> | ||
<div class="absolute right-0 min-w-[30%] bg-black p-1 text-center"> | ||
<p>{enemy.code}</p> | ||
</div> | ||
|
||
<div class="aspect-square"> | ||
<img src={url} alt="Icon of {enemy.name}" /> | ||
</div> | ||
</a> | ||
{/each} | ||
<div class="aspect-square"> | ||
<img src={url} alt="Icon of {enemy.name}" /> | ||
</div> | ||
</a> | ||
{/each} | ||
</main> |
Oops, something went wrong.