Skip to content

Commit

Permalink
feat: add very basic card system
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinHerber committed Jul 10, 2024
1 parent 93023fa commit 1da0e0b
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"autoprefixer": "^10.4.19",
"flowbite": "^2.4.1",
"flowbite-svelte": "^0.46.14",
"flowbite-svelte-icons": "^1.6.1",
"openapi-typescript": "^7.0.2",
"postcss": "^8.4.39",
"svelte": "5.0.0-next.180",
Expand Down
16 changes: 16 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions src/lib/components/FeatureCard.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script lang="ts">
import { Card, Button } from 'flowbite-svelte';
import { ArrowRightOutline } from 'flowbite-svelte-icons';
export let title: string = "title";
export let description: string = "description";
export let link: string = "#";
</script>

<Card>
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
{title}
</h5>
<p class="mb-3 font-normal text-gray-700 dark:text-gray-400 leading-tight">
{description}
</p>
{#if link}
<a href={link} target="_blank">
<Button class="w-fit">
Read more <ArrowRightOutline class="w-6 h-6 ms-2 text-white" />
</Button>
</a>
{/if}
</Card>
4 changes: 2 additions & 2 deletions src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<img class="me-3 h-6 sm:h-9" src={logo} alt="Logo"/>
</picture>

<span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white">
<h1 class="self-center whitespace-nowrap text-xl font-semibold dark:text-white">
Path of Terraria
</span>
</h1>
</NavBrand>
<NavUl>
<NavLi href="/">Home</NavLi>
Expand Down
36 changes: 33 additions & 3 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
<script>
import FeatureCard from "$lib/components/FeatureCard.svelte";
import {Heading} from "flowbite-svelte";
</script>

<svelte:head>
<title>Home</title>
<meta name="description" content="Svelte demo app" />
</svelte:head>
<title>Path of Terraria</title>
<meta name="description" content="Path of Terraria is a game changing mod bringing the ARPG experience into Terraria" />
</svelte:head>
<div class="header">
<div class="container mx-auto mt-8">
<Heading tag="h1" class="mb-4" customSize="text-1xl font-extrabold md:text-3xl lg:text-4xl">
Introducing the ARPG mod for Terraria
</Heading>
</div>
</div>
<div class="container mx-auto mt-12">
<div class="grid grid-cols-2 gap-4">
<div class="mx-auto" >
<FeatureCard
title="Redesigned Item System"
description="Items drops with affix. Prefixes and suffixes can be combined to create powerful items."
link="https://wiki.pathofterraria.com/Gear"
></FeatureCard>
</div>
<div class="mx-auto" >
<FeatureCard
title="Questing System"
description="Complete quests for NPCs and get rewards."
link="https://wiki.pathofterraria.com/Towns"
></FeatureCard>
</div>
</div>
</div>

0 comments on commit 1da0e0b

Please sign in to comment.