Skip to content
Open
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
2 changes: 2 additions & 0 deletions src/lib/export_timetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ async function captureNode(node, aspect = null, options = {}) {
node.setAttribute('data-theme', currentTheme)
}
node.classList.add(EXPORTING_CLASS)
document.body.classList.add(EXPORTING_CLASS)

// Temporarily strip today/active-day classes so html-to-image never sees them
const activeHeaders = Array.from(node.querySelectorAll('.tt-day-active'))
Expand Down Expand Up @@ -166,6 +167,7 @@ async function captureNode(node, aspect = null, options = {}) {
activeHeaders.forEach((el) => el.classList.add('tt-day-active'))
activeCols.forEach((el) => el.classList.add('tt-col-active'))
node.classList.remove(EXPORTING_CLASS)
document.body.classList.remove(EXPORTING_CLASS)
node.removeAttribute('data-theme')
if (restoreGrid) restoreGrid()
}
Expand Down
7 changes: 7 additions & 0 deletions src/pages/TimetablePage.css
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,13 @@
.tt-export-target.tt-exporting [data-tip]::after { display: none !important; }
.tt-export-target.tt-exporting .tt-day-active-pill { display: none !important; }

/* Hide the fixed-position Reset/Save/Peek FAB group while capturing.
These buttons use position:fixed so they sit outside .tt-export-target
yet still appear in the rasterised snapshot on mobile. The body-level
tt-exporting class (set by export_timetable.js) lets us target them
globally without touching the component. */
body.tt-exporting .tt-save-fab-group { display: none !important; }

/* Drop any "today/active-day" highlight from the export — the header pill,
the column tint, the label colour, and the dot. The captured snapshot
should read as a neutral timetable, not as of-today.
Expand Down