Skip to content

Commit 359ff99

Browse files
committed
refactor: optimize LiveSimPage for mobile
1 parent 0b238dd commit 359ff99

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

TheGreenEpochWeb/src/components/StatsPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface Props {
1414

1515
export function StatsPanel(props: Props) {
1616
return (
17-
<div class={`grid grid-cols-2 gap-2.5 ${props.class || ""}`}>
17+
<div class={`grid grid-cols-1 sm:grid-cols-2 gap-2.5 ${props.class || ""}`}>
1818
<For each={props.rows}>
1919
{(row) => (
2020
<div

TheGreenEpochWeb/src/pages/LiveSimPage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ export function LiveSimPage() {
175175
};
176176

177177
return (
178-
<div>
179-
<div class="flex items-start justify-between gap-4 mb-6">
180-
<div>
181-
<h1 class="text-xl font-semibold tracking-tight text-fg-primary">{sc.description}</h1>
182-
<p class="text-sm text-fg-muted mt-0.5">
178+
<div class="overflow-x-hidden">
179+
<div class="flex flex-col sm:flex-row items-start justify-between gap-3 mb-4">
180+
<div class="min-w-0">
181+
<h1 class="text-lg sm:text-xl font-semibold tracking-tight text-fg-primary">{sc.description}</h1>
182+
<p class="text-sm text-fg-muted mt-0.5 break-words">
183183
{sc.region} &middot; &#952;pause={threshold} &middot; &#952;resume={hysteresis} &middot; start {sc.startTimes[startIdx()]}
184184
</p>
185185
</div>
186-
<div class="flex items-center gap-2.5 shrink-0">
186+
<div class="flex items-center gap-2 shrink-0 flex-wrap">
187187
<select
188188
value={speed()}
189189
onChange={(e) => setSpeed(Number(e.currentTarget.value))}

0 commit comments

Comments
 (0)