Skip to content

Commit bef7c84

Browse files
committed
feat: Reduce paddings
1 parent 9fd1da7 commit bef7c84

File tree

1 file changed

+77
-74
lines changed

1 file changed

+77
-74
lines changed

src/routes/+page.svelte

Lines changed: 77 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
/>
343343

344344
<h3>Participants</h3>
345-
<ul class="section-inner">
345+
<ul>
346346
{#each newSession.participants as participant}
347347
<li class="section section-inner participant">
348348
<input
@@ -410,79 +410,82 @@
410410
{currentSession.confirmed ? 'Ended' : 'Ongoing'}
411411
</p>
412412
<h3>Participants ({currentSession.participants.length})</h3>
413-
{#each currentSession.participants as participant}
414-
<div class="section section-inner">
415-
<h4>{participant.name}</h4>
416-
417-
{#if participant.description}
418-
<p class="description">
419-
{participant.description}
420-
</p>
421-
{/if}
422-
423-
{#if adminToken || participant.reasons}
424-
<p><strong>Share:</strong> {participant.share || 0}</p>
425-
{#if participant.reasons.length > 0}
426-
<strong>Reasons:</strong>
427-
<ul>
428-
{#each participant.reasons as reason}
429-
<li>{reason}</li>
430-
{/each}
431-
</ul>
413+
<ul>
414+
{#each currentSession.participants as participant}
415+
<li class="section section-inner">
416+
<h4>{participant.name}</h4>
417+
418+
{#if participant.description}
419+
<p class="description">
420+
{participant.description}
421+
</p>
432422
{/if}
433-
{:else if allDescriptionsSubmitted && currentParticipant}
434-
<div id="share-inputs">
435-
<input
436-
bind:value={participant.share}
437-
on:input={() => {
438-
participant.percentage =
439-
((participant.share || 0) / currentSession.stake) * 100;
440-
}}
441-
type="number"
442-
step="0.01"
443-
min="0"
444-
placeholder="Share"
445-
class="share-input"
446-
/>
447-
448-
<input
449-
bind:value={participant.percentage}
450-
on:input={(e) => {
451-
const raw = parseFloat(
452-
(e.target as HTMLInputElement).value
453-
);
454-
const percentage = isNaN(raw) ? 0 : raw;
455-
participant.share =
456-
(currentSession.stake * percentage) / 100;
457-
}}
458-
type="number"
459-
step="0.01"
460-
min="0"
461-
placeholder="Percentage"
462-
class="share-input"
463-
/>
464-
</div>
465-
<textarea bind:value={participant.reason} placeholder="Reason"
466-
></textarea>
467-
{:else if participant.voted}
468-
<p><strong>Voted:</strong> Yes</p>
469-
{/if}
470-
{#if !currentSession.confirmed && !currentParticipant && (adminToken || !participant.description || !participant.voted)}
471-
<button on:click={() => selectParticipant(participant)}>
472-
This is me
473-
</button>
474-
{/if}
475-
{#if currentParticipant && currentParticipant.id == participant.id && (adminToken || !participant.description)}
476-
<textarea
477-
bind:value={currentParticipant.description}
478-
placeholder="Description"
479-
class="input"
480-
></textarea>
481-
<button on:click={() => updateCurrentParticipant()}>Submit</button
482-
>
483-
{/if}
484-
</div>
485-
{/each}
423+
424+
{#if adminToken || participant.reasons}
425+
<p><strong>Share:</strong> {participant.share || 0}</p>
426+
{#if participant.reasons.length > 0}
427+
<strong>Reasons:</strong>
428+
<ul>
429+
{#each participant.reasons as reason}
430+
<li>{reason}</li>
431+
{/each}
432+
</ul>
433+
{/if}
434+
{:else if allDescriptionsSubmitted && currentParticipant}
435+
<div id="share-inputs">
436+
<input
437+
bind:value={participant.share}
438+
on:input={() => {
439+
participant.percentage =
440+
((participant.share || 0) / currentSession.stake) * 100;
441+
}}
442+
type="number"
443+
step="0.01"
444+
min="0"
445+
placeholder="Share"
446+
class="share-input"
447+
/>
448+
449+
<input
450+
bind:value={participant.percentage}
451+
on:input={(e) => {
452+
const raw = parseFloat(
453+
(e.target as HTMLInputElement).value
454+
);
455+
const percentage = isNaN(raw) ? 0 : raw;
456+
participant.share =
457+
(currentSession.stake * percentage) / 100;
458+
}}
459+
type="number"
460+
step="0.01"
461+
min="0"
462+
placeholder="Percentage"
463+
class="share-input"
464+
/>
465+
</div>
466+
<textarea bind:value={participant.reason} placeholder="Reason"
467+
></textarea>
468+
{:else if participant.voted}
469+
<p><strong>Voted:</strong> Yes</p>
470+
{/if}
471+
{#if !currentSession.confirmed && !currentParticipant && (adminToken || !participant.description || !participant.voted)}
472+
<button on:click={() => selectParticipant(participant)}>
473+
This is me
474+
</button>
475+
{/if}
476+
{#if currentParticipant && currentParticipant.id == participant.id && (adminToken || !participant.description)}
477+
<textarea
478+
bind:value={currentParticipant.description}
479+
placeholder="Description"
480+
class="input"
481+
></textarea>
482+
<button on:click={() => updateCurrentParticipant()}
483+
>Submit</button
484+
>
485+
{/if}
486+
</li>
487+
{/each}
488+
</ul>
486489
{#if currentParticipant?.reasons}
487490
{#if !adminToken}
488491
<button
@@ -672,7 +675,7 @@
672675
673676
border-radius: 1rem;
674677
675-
.participant {
678+
.section-inner {
676679
padding: 0.5rem;
677680
}
678681
}

0 commit comments

Comments
 (0)