Skip to content

Commit 6999677

Browse files
committed
🎨 Align progress bars (#1901)
1 parent d06613a commit 6999677

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

src/lib/components/SubmissionStatus/AcceptedCounter.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
});
2222
</script>
2323

24-
<!-- FIXME: 横幅を微調整する -->
2524
<!-- See: -->
2625
<!-- https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed -->
27-
<div class="text-xs xs:text-sm w-max-[72px] w-max-[96px] text-center">
26+
<div class="text-xs md:text-sm w-min-[72px] w-max-[96px] text-center">
2827
<div>
2928
{acceptedCount} / {allTaskCount}
3029
</div>

src/lib/components/TaskList.svelte

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
3434
let { grade, taskResults, isAdmin, isLoggedIn }: Props = $props();
3535
36-
// TODO: 他のコンポーネントでも利用できるようにする。
3736
let updatingModal: UpdatingModal | null = null;
3837
3938
function openModal(taskResult: TaskResult): void {
@@ -48,17 +47,24 @@
4847
<Accordion flush>
4948
<AccordionItem>
5049
{#snippet header()}
51-
<span class="flex justify-around w-full place-items-center">
52-
<GradeLabel
53-
taskGrade={grade}
54-
defaultPadding={0.25}
55-
defaultWidth={12}
56-
reducedWidth={9}
57-
defaultTextSize="xl"
58-
/>
50+
<span class="grid grid-cols-[1fr_6fr_0fr] sm:grid-cols-[1fr_6fr_1fr] w-full items-center">
51+
<div class="flex justify-center">
52+
<GradeLabel
53+
taskGrade={grade}
54+
defaultPadding={0.25}
55+
defaultWidth={12}
56+
reducedWidth={9}
57+
defaultTextSize="xl"
58+
/>
59+
</div>
5960

60-
<ThermometerProgressBar {taskResults} />
61-
<AcceptedCounter {taskResults} />
61+
<div class="flex justify-center">
62+
<ThermometerProgressBar {taskResults} width="w-5/6 md:w-11/12 lg:w-full" />
63+
</div>
64+
65+
<div class="hidden sm:flex justify-center">
66+
<AcceptedCounter {taskResults} />
67+
</div>
6268
</span>
6369
{/snippet}
6470

0 commit comments

Comments
 (0)