29 lines
1.1 KiB
Vue
29 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import type { BuildingType } from '~/types/game'
|
|
|
|
defineProps<{
|
|
/** The building the screen belongs to, drawn as it stands; null when it doesn't stand yet. */
|
|
type: BuildingType
|
|
level: number | null
|
|
title: string
|
|
description: string
|
|
}>()
|
|
</script>
|
|
|
|
<!-- The top of a building screen, like Die Stämme's: the building's picture, its name and level, and what it does. -->
|
|
<template>
|
|
<header class="flex items-center gap-4">
|
|
<VillagePortraitTile :type="type" :level="level ?? 1" class="size-20 rounded-md p-1 shadow-hard sm:size-24" />
|
|
<div class="min-w-0">
|
|
<h1 class="font-display text-2xl leading-tight font-semibold text-wood-900" style="font-variant: small-caps">
|
|
{{ title }}
|
|
<span v-if="level !== null" class="ml-1 align-middle font-sans text-sm font-semibold text-ink-500" style="font-variant: normal">
|
|
{{ $t('village.buildings.level_n', { level }) }}
|
|
</span>
|
|
</h1>
|
|
<p class="mt-1 max-w-prose text-sm text-ink-700">{{ description }}</p>
|
|
<slot />
|
|
</div>
|
|
</header>
|
|
</template>
|