Layout / Timetable

Layout

Timetable

A week as a fixed time gutter plus one absolutely-positioned column per day.

import { EcoTimetable } from "vue-ecosphere"

A week, with today, the now-line, a free slot and two clashes

Colour is the subject, not the state. A clash is a glyph in the corner — warning for a soft clash, danger for one that cannot ship.

14Mon
15Tue
16Wed
17Thu
18Fri
19Sat
P1 · 8:00
P2 · 8:50
P3 · 9:40
10:30
P4 · 10:50
P5 · 11:40
P6 · 12:30
P7 · 13:20
9:52
Break
Break
Break
Break
Break
Break
Mathematics
Physics
English
Biology
Social science
Chemistry

Double periods and mid-period starts

An event spans as many rows as its times cover, and one that starts mid-period lands where it actually starts.

14Mon
15Tue
P1 · 8:00
P2 · 8:50
P3 · 9:40

API

NameTypeDefaultDescription
days{ label, date?, today? }[]—Day columns; today takes the tinted column and accent header.
rows{ label?, start, end, break? }[]—Periods top to bottom, one 56px row each (times as H:MM). A break row draws a ttbreak band across every day.
eventsTimetableEvent[][]{ day, start, end, title, hint?, subject? 1–6, warn?, crit?, now? }. Placed by time, so a double period is one element.
slots{ day, start, end, label? }[][]Empty periods as dashed targets ("+ Free").
now{ day, time } | nullnullThe now-line: a 1px danger rule with a dot and the time, which never eats a click.
subjectsstring[][]Legend under the grid, in subj1…subj6 order.
cardbooleanfalseWrap the grid in the flush card (card › card__body, no padding) with the legend under the card, as the artifact lays it out.
@select / @slotevent—An event or an empty slot was clicked.