Skip to content

Commit

Permalink
feat: adding in the mob data route
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinHerber committed Nov 24, 2024
1 parent 5113387 commit 664d19c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/components/FeatureCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
import { Card, Button } from 'flowbite-svelte';
import { ArrowRightOutline } from 'flowbite-svelte-icons';
export let title: string = "title";
export let target: string = "_blank";
export let description: string = "description";
export let link: string = "#";
export let linkText: string = "Read more";
</script>

<Card>
Expand All @@ -14,9 +16,9 @@
{description}
</p>
{#if link}
<a href={link} target="_blank">
<a href={link} target={target}>
<Button class="w-fit">
Read more <ArrowRightOutline class="w-6 h-6 ms-2 text-white" />
{linkText} <ArrowRightOutline class="w-6 h-6 ms-2 text-white" />
</Button>
</a>
{/if}
Expand Down
4 changes: 4 additions & 0 deletions src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import {UserService} from "$lib/services/user-service";
import SettingsModal from "$lib/components/SettingsModal.svelte";
let userService = new UserService();
const isDebug = import.meta.env.VITE_DEBUG === 'true';
let currentUser: IUser;
let settingsOpen = false;
Expand Down Expand Up @@ -47,6 +48,9 @@
<NavLi href="/">Home</NavLi>
<NavLi href="/leaderboards">Leaderboards</NavLi>
<NavLi href="https://wiki.pathofterraria.com" target="_blank">Wiki</NavLi>
{#if isDebug}
<NavLi href="/mod-data">Mod Data</NavLi>
{/if}
</NavUl>

<div class="flex items-center md:order-2">
Expand Down
22 changes: 22 additions & 0 deletions src/routes/mod-data/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
import FeatureCard from "$lib/components/FeatureCard.svelte";
</script>

<div class="container mx-auto p-4">
<h1 class="text-2xl font-bold mb-4">Mod Data</h1>

<div class="container mx-auto mt-12">
<div class="grid grid-cols-2 gap-4">
<div class="mx-auto" >
<FeatureCard
title="Edit Mob Data"
description="View and edit the mob data for the site"
link="/mod-data/mobs"
target=""
linkText="See Data"
></FeatureCard>
</div>
</div>
</div>
</div>

0 comments on commit 664d19c

Please sign in to comment.