This commit is contained in:
Simon Cambier 2022-02-09 21:50:52 +01:00
parent eda068951f
commit ff6b3ed821
2 changed files with 35 additions and 35 deletions

View File

@ -1,6 +1,6 @@
<template>
<div
class="flex overflow-hidden justify-center font-bold uppercase rounded border transition-all">
class="flex overflow-hidden justify-center font-bold rounded border transition-all">
<span class="self-center text-center"><slot /></span>
</div>
</template>

View File

@ -10,10 +10,10 @@
</NumberBox>
<!-- Plaquettes -->
<div class="grid grid-cols-6 grid-rows-2 gap-2 mx-auto max-w-sm">
<div class="grid grid-cols-6 grid-rows-2 gap-2 mx-auto px-2 max-w-sm justify-center">
<TransitionGroup name="list">
<NumberBox
class="text-2xl "
class="text-2xl col-start-auto h-[1.8em]"
:class="{ 'text-stone-600 border-stone-600': !item.free }"
@click="selectNumber(item)"
v-for="(item, i) in plaquettes"
@ -40,19 +40,19 @@
class="mb-2 text-center"
v-for="(operation, i) in operations"
:key="i">
<div class="inline-block relative">
<div class="inline-block relative text-xl">
<!-- OPERATION -->
<div class="flex absolute top-0 right-full whitespace-nowrap">
<div class="flex">
<NumberBox class="w-[2.5em]">
{{ operation.left?.value ?? '?' }}
</NumberBox>
<NumberBox class="w-[2.5em] border-none">
{{ operation.operator ?? '' }}
</NumberBox>
<NumberBox class="w-[2.5em]">
{{ operation.right?.value ?? '?' }}
</NumberBox>
</div>
<!-- EQUALS -->
<NumberBox class="mx-4 border-none">
@ -60,8 +60,7 @@
</NumberBox>
<!-- RESULT -->
<NumberBox
class="absolute top-0 left-full whitespace-nowrap border-none">
<NumberBox class="w-[2.5em]">
<span
v-if="
operation.operator &&
@ -82,6 +81,7 @@
</div>
</div>
</div>
</div>
</template>
<style>