|
21 | 21 | let last = $derived(loop[0] === loop[1]) |
22 | 22 | </script> |
23 | 23 |
|
24 | | -<div class="join w-full"> |
25 | | - <div class="join-item flex flex-col"> |
26 | | - <button |
27 | | - aria-label={last ? 'Repeat' : 'Do not repeat'} |
28 | | - class="btn join-item" |
29 | | - onclick={() => (loop[1] = last ? Infinity : loop[0])} |
30 | | - > |
31 | | - <div class={['swap', last && 'swap-active']}> |
32 | | - <Loop class="swap-off" /> |
33 | | - <NoLoop class="swap-on" /> |
34 | | - </div> |
35 | | - </button> |
36 | | - </div> |
37 | | - <div class="join-item flex flex-row shadow-md"> |
38 | | - <div class="bg-base-100 ps-4 muted relative flex place-items-center">Loop</div> |
| 24 | +<div class="join grid grid-cols-[auto_1fr] md:grid-cols-[auto_auto_1fr_auto] grid-flow-col-dense"> |
| 25 | + <button |
| 26 | + aria-label={last ? 'Repeat' : 'Do not repeat'} |
| 27 | + class="btn join-item max-md:rounded-bl-none" |
| 28 | + onclick={() => (loop[1] = last ? Infinity : loop[0])} |
| 29 | + > |
| 30 | + <div class={['swap', last && 'swap-active']}> |
| 31 | + <Loop class="swap-off" /> |
| 32 | + <NoLoop class="swap-on" /> |
| 33 | + </div> |
| 34 | + </button> |
| 35 | + <div class="bg-base-100 flex flex-row shadow-md justify-center items-center max-md:rounded-tr-sm"> |
| 36 | + <div class="ps-4 muted">Loop</div> |
39 | 37 | <EditableNumber |
40 | 38 | min={1} |
41 | | - class="bg-base-100 px-3" |
| 39 | + class="px-3" |
42 | 40 | bind:value={() => loop[0], v => ((loop[0] = v), (loop[1] = Math.max(loop[0], loop[1])))} |
43 | 41 | ></EditableNumber> |
44 | | - <div class="bg-base-100 muted relative flex place-items-center">of</div> |
| 42 | + <div class="muted">of</div> |
45 | 43 | <EditableNumber |
46 | | - class="bg-base-100 ps-3 pe-4" |
| 44 | + class="ps-3 pe-4" |
47 | 45 | bind:value={() => loop[1], v => ((loop[1] = v), (loop[0] = Math.min(loop[0], loop[1])))} |
48 | 46 | ></EditableNumber> |
49 | 47 | </div> |
50 | | - <StartStop bind:time bind:loop bind:running {beeping} /> |
| 48 | + <StartStop bind:time bind:loop bind:running {beeping} class="max-md:rounded-br-sm" /> |
51 | 49 | <button |
52 | 50 | aria-label="Rewind" |
53 | | - class="btn join-item" |
| 51 | + class="btn join-item max-md:col-start-1 max-md:row-start-2 max-md:rounded-none max-md:rounded-bl-sm" |
54 | 52 | disabled={loop[0] === 1 && time[0] === 0} |
55 | 53 | onclick={() => ((loop[0] = 1), (time[0] = 0))} |
56 | 54 | > |
|
0 commit comments