mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 12:43:48 -04:00
(pl)(spis) make census more print-friendly
This commit is contained in:
parent
ea3b6a360e
commit
de13ddbf5c
@ -5,8 +5,8 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
background: none;
|
background: none !important;
|
||||||
background-color: $white;
|
color: $black !important;
|
||||||
}
|
}
|
||||||
hr {
|
hr {
|
||||||
display: block;
|
display: block;
|
||||||
@ -16,4 +16,16 @@
|
|||||||
@page {
|
@page {
|
||||||
margin: 1cm;
|
margin: 1cm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
details {
|
||||||
|
break-inside: avoid;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
p {
|
||||||
|
margin: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
color: $black !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,20 @@ onMounted(executeUnlessPrerendering(() => {
|
|||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// making census reports print-friendly
|
||||||
|
window.addEventListener("beforeprint", () => {
|
||||||
|
document.querySelectorAll("iframe[loading=lazy]").forEach(iframe => {
|
||||||
|
iframe.removeAttribute("loading");
|
||||||
|
iframe.setAttribute("src", iframe.getAttribute("src")!);
|
||||||
|
});
|
||||||
|
document.querySelectorAll("iframe.graph").forEach(iframe => {
|
||||||
|
const graph = iframe as HTMLIFrameElement;
|
||||||
|
graph.style.width = "718px"; // A4 width - 1cm margins at 96dpi
|
||||||
|
graph.style.height = "400px";
|
||||||
|
});
|
||||||
|
document.querySelectorAll("details").forEach(d => d.setAttribute("open", ""));
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const dialogue = useDialogue();
|
const dialogue = useDialogue();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user