2020-07-29 20:09:05 +00:00
|
|
|
<div class="layers">
|
|
|
|
{#each armour as layer (layer)}
|
|
|
|
<div class="layer">
|
2022-03-01 17:42:33 +00:00
|
|
|
{#each _.range(layer.rating) as i (i)}
|
|
|
|
<div class="cell" />
|
2020-07-29 20:09:05 +00:00
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
2022-03-01 17:42:33 +00:00
|
|
|
import _ from "lodash";
|
2020-07-29 20:09:05 +00:00
|
|
|
|
|
|
|
export let armour = [];
|
|
|
|
|
|
|
|
$: console.log(armour);
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2022-03-01 17:42:33 +00:00
|
|
|
.cell {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 0.5em;
|
|
|
|
width: 1em;
|
|
|
|
height: 1em;
|
|
|
|
border: 1px solid black;
|
|
|
|
border-radius: 0.5em;
|
|
|
|
}
|
2020-07-29 20:09:05 +00:00
|
|
|
.layers {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column-reverse;
|
|
|
|
}
|
|
|
|
</style>
|