Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions apps/web/src/routes/timetable/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ function getPeriodLabel(period: number): string {

// Padding lives on the inner box, not the cell, so the editing button can fill
// the cell and still measure the same as the static view. The substituted wash
// lives there too, compositing onto --card instead of the gap's --border fill.
// lives on the cell itself — the inner box only sizes to its content, so a
// dash next to a two-line subject would otherwise leave a --card gap at the
// bottom of the row.
const CELL_PAD = 'py-3 sm:py-6 px-1';
const REPLACED_BG = 'bg-amber-100/70 dark:bg-amber-900/20';

Expand Down Expand Up @@ -321,7 +323,7 @@ async function writeSlot(subject: string, teacher: string) {
<div
role="cell"
data-replaced={slot?.replaced ? '' : undefined}
class="p-0 text-center bg-card"
class="p-0 text-center flex flex-col {slot?.replaced ? REPLACED_BG : 'bg-card'}"
>
<!-- The whole cell is the hit area while editing, so what
is pressed is exactly what opens. -->
Expand All @@ -330,10 +332,10 @@ async function writeSlot(subject: string, teacher: string) {
type="button"
onclick={() => openSlotEditor(d, i + 1)}
aria-label="{dayName}요일 {i + 1}교시 수정"
class="block w-full {CELL_PAD} cursor-pointer transition-colors duration-150 pointer:hover:bg-muted {slot?.replaced ? REPLACED_BG : ''}"
class="block w-full flex-1 {CELL_PAD} cursor-pointer transition-colors duration-150 pointer:hover:bg-muted"
>{@render cell(slot)}</button>
{:else}
<div class="{CELL_PAD} {slot?.replaced ? REPLACED_BG : ''}">{@render cell(slot)}</div>
<div class="flex-1 {CELL_PAD}">{@render cell(slot)}</div>
{/if}
</div>
{/each}
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/convex/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const DINNER_END_HOUR = 19;
export const HOME_EVENT_WINDOW_DAYS = 7;

// How many D-day countdowns the home hero shows before it stops being a hero.
export const HOME_DDAY_LIMIT = 3;
export const HOME_DDAY_LIMIT = 2;

// Long enough to jump a summer break, in both directions: forward to find the
// next school day, backward to find the 방학 marker that started a break
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/convex/schedule.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe("schedule D-days", () => {
today: THU,
afterRollover: false,
});
expect(ddays.map((e) => e.date)).toEqual(["20260825", "20260830", "20260901"]);
expect(ddays.map((e) => e.date)).toEqual(["20260825", "20260830"]);
});

// A sync deletes and re-inserts every school row in the range, so a flag set
Expand Down
Loading