game-village-politics-frontend/app/components/map/LegendSwatch.vue

21 lines
689 B
Vue

<script setup lang="ts">
defineProps<{
/** The relation colour of the plot's edge. */
colour: string
/** A crown fort: the gold crown on the plot. */
crown?: boolean
}>()
</script>
<!-- A village on the map in small: the round plot of earth, its edge in the relation colour. -->
<template>
<svg viewBox="-50 -50 100 100" class="size-4 shrink-0" aria-hidden="true">
<circle r="49" fill="#2b2118" />
<circle r="36" fill="#6c5940" :stroke="colour" stroke-width="22" />
<g v-if="crown">
<polygon points="-24,14 -24,-14 -12,0 0,-22 12,0 24,-14 24,14" fill="#d9b44a" />
<rect x="-24" y="6" width="48" height="8" fill="#a8842e" />
</g>
</svg>
</template>