Skip to content

Commit

Permalink
fix: adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
jthvai committed Jul 9, 2024
1 parent c98689b commit f4e2e9f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ let App = () => {
const [isPrintView, setIsPrintView] = useState(false)
const [printViewCaptureFirstSection, setPrintViewCaptureFirstSection] = useState(true)

useEffect(() => {
document.body.className = isPrintView ? 'print-view' : ''
}, [isPrintView])
// useEffect(() => {
// document.body.className = isPrintView ? 'print-view' : ''
// }, [isPrintView])

// const state = {
// timeZone, year, session, sessions, timetableData, modules, selectedModules, weekStart, darkMode,
Expand Down
2 changes: 1 addition & 1 deletion src/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default function Calendar({ timetableData, selectedModules, session, year
bootstrapFontAwesome={false}
// expandRows={true}
// can't apply in print context because FC events need JS to resize (CSS inset prop)
viewClassNames={isPrintView ? 'print-view' : ''}
// viewClassNames={isPrintView ? 'print-view' : ''}
height='100%'
expandRows={true}

Expand Down
23 changes: 13 additions & 10 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -308,23 +308,26 @@ body[data-theme="dark"] {
}

// print formatting - designed for calendar.current
/* .print-view { */
// .print-view {
@page {
size: landscape;
margin: none;
transform: scale(0.7);
transform-origin: 0 0;
}
@media print {
@page {
size: landscape;
}

body {
-webkit-print-color-adjust: exact;
}

// A4 Sheet
.fc-view-harness {
flex-grow: 0 !important; // override FullCalendar css
height: 21cm;
width: 29.7cm;
font-size: 12pt;
}
// .fc-view-harness {
// flex-grow: 0 !important; // override FullCalendar css
// height: 21cm;
// width: 29.7cm;
// font-size: 12pt;
// }

button {
visibility: hidden;
Expand Down

0 comments on commit f4e2e9f

Please sign in to comment.