26 lines
1.0 KiB
Vue
26 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
defineProps<{
|
|
/** The relation colour of the marker. */
|
|
colour: string
|
|
/** A barbarian village's dot instead of a player's flag. */
|
|
dot?: boolean
|
|
/** A crown fort: the gold crown. */
|
|
crown?: boolean
|
|
}>()
|
|
</script>
|
|
|
|
<!-- A village's marker on the map in small: the flag (or a barbarian's dot) in the relation colour, the crown of a crown fort. -->
|
|
<template>
|
|
<svg viewBox="0 0 20 20" class="size-4 shrink-0" aria-hidden="true">
|
|
<g v-if="crown">
|
|
<polygon points="2,16 2,6 6.5,10.5 10,3 13.5,10.5 18,6 18,16" fill="#d9b44a" stroke="#6b4f16" stroke-width="1.2" stroke-linejoin="round" />
|
|
<rect x="2" y="13" width="16" height="3" fill="#a8842e" />
|
|
</g>
|
|
<circle v-else-if="dot" cx="10" cy="10" r="6" :fill="colour" stroke="#2b2118" stroke-width="1.6" />
|
|
<g v-else>
|
|
<rect x="3" y="2" width="2.2" height="17" fill="#2b2118" />
|
|
<polygon points="5.2,2.5 18,7.5 5.2,12.5" :fill="colour" stroke="#2b2118" stroke-width="1.4" stroke-linejoin="round" />
|
|
</g>
|
|
</svg>
|
|
</template>
|