|
38 | 38 | } |
39 | 39 | </script> |
40 | 40 |
|
41 | | -<div |
42 | | - class="grid place-items-center join grid-cols-[auto_1fr] grid-rows-[1fr_1fr] bg-base-100 rounded-sm w-full" |
43 | | -> |
44 | | - <button class="btn btn-md h-full join-item" onclick={() => (dir = !dir)}> |
45 | | - <label class="swap swap-rotate {dir ? 'swap-active' : ''}"> |
| 41 | +<div class="grid w-full [grid-template-areas:'dir_main''beep_main'] grid-cols-[auto_1fr]"> |
| 42 | + <button class="btn btn-md rounded-tl-md h-full [grid-area:dir]" onclick={() => (dir = !dir)}> |
| 43 | + <label class={['swap swap-rotate', { 'swap-active': dir }]}> |
46 | 44 | <Up class="swap-on" /> |
47 | 45 | <Down class="swap-off" /> |
48 | 46 | </label> |
49 | 47 | </button> |
| 48 | + <button class="btn btn-md rounded-bl-md h-full" onclick={() => (beeping = !beeping)}> |
| 49 | + <label class={['swap', { 'swap-active': beeping }]}> |
| 50 | + <Beep class="swap-on" /> |
| 51 | + <NoBeep class="swap-off" /> |
| 52 | + </label> |
| 53 | + </button> |
50 | 54 | <div |
51 | | - class="p-2 relative row-span-2 rounded-e-sm border-[#8882] border-t-1 border-r-0 w-full shadow-md" |
| 55 | + class="relative rounded-e-sm bg-base-100 border-[#8882] border-t-1 border-r-0 w-full shadow-md [grid-area:main] overflow-hidden" |
52 | 56 | > |
53 | | - <div |
54 | | - class="flex justify-evenly absolute inset-0 pointer-events-none overflow-hidden max-sm:[&>:nth-child(-n+12)]:hidden" |
55 | | - > |
| 57 | + <div class="flex justify-evenly absolute inset-0 pointer-events-none"> |
56 | 58 | {#each [...Array(24).keys()].map(() => Math.random() * 2 + 's') as delay} |
57 | | - <div class="w-[1px] bg-[#8882]"> |
| 59 | + <div class="w-[1px] bg-[#8882] max-sm:[&:nth-child(-n+10)]:hidden"> |
58 | 60 | <div |
59 | 61 | style:animation-delay={delay} |
60 | 62 | class={[ |
|
66 | 68 | </div> |
67 | 69 | {/each} |
68 | 70 | </div> |
69 | | - <div class="flex justify-evenly items-center w-full max-sm:flex-col"> |
| 71 | + <div class="p-2 flex justify-evenly items-center w-full max-sm:flex-col"> |
70 | 72 | <TimeInput label={dir ? 'Elapsed' : 'Remaining'} bind:value={getCurrent, updateCurrent} /> |
71 | 73 | <div class="divider sm:divider-horizontal text-xs m-0 muted">of</div> |
72 | 74 | <TimeInput bind:value={() => time[1], updateTotal} /> |
73 | 75 | </div> |
74 | 76 | </div> |
75 | | - <button class="btn btn-md rounded-bl-sm h-full join-item" onclick={() => (beeping = !beeping)}> |
76 | | - <label class="swap {beeping ? 'swap-active' : ''}"> |
77 | | - <Beep class="swap-on" /> |
78 | | - <NoBeep class="swap-off" /> |
79 | | - </label> |
80 | | - </button> |
81 | 77 | </div> |
0 commit comments