Skip to content

Commit

Permalink
add image svelte container
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Jan 4, 2022
1 parent 6d1e88b commit 81b56a0
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/view/ui/Image.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script lang="ts">
import type { Monster } from "@types";
import type { ImageItem } from "src/data/constants";
export let monster: Monster;
export let item: ImageItem;
</script>

<div class="flex-container">
{#each item.properties as property}
{#if property in monster}
<div class="image">{monster[property]}</div>
{/if}
{/each}
</div>

<style>
.flex-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.heading {
font-family: "Libre Baskerville", "Lora", "Calisto MT",
"Bookman Old Style", Bookman, "Goudy Old Style", Garamond,
"Hoefler Text", "Bitstream Charter", Georgia, serif;
color: var(--statblock-primary-color);
font-weight: 700;
margin: 0px;
font-size: 23px;
letter-spacing: 1px;
font-variant: small-caps;
display: flex;
justify-content: space-between;
align-items: center;
}
</style>

0 comments on commit 81b56a0

Please sign in to comment.