Commits (1)
const RevealPrintButton = {
init: () => {
let print_button = document.createElement("a");
print_button.classList.add("printable-version");
print_button.href = "?print-pdf";
print_button.title = "Printable version";
document.querySelector(".slides :first-child").appendChild(print_button);
}
};
Reveal.registerPlugin( 'print-button', RevealPrintButton );
\ No newline at end of file
.printable-version {
position: absolute !important;
bottom: 50px;
left: 10px;
height: 30px;
width: 30px;
display: block;
z-index: 100;
opacity: 0.1;
transition: opacity 0.3s !important;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23A2A2A2'%3E%3Cpath d='M11.96 50h28.09V32H11.96v18zm6.854-13.003h14.189v2H18.814v-2zm0 6h14.189v2H18.814v-2zM16 20h20v-.003h1.003v-2H36V2H16v15.997h-.997v2H16z'/%3E%3Cpath d='M43.03 10H38v5.997h1.003v6H38V22H14v-.003h-.997v-6H14V10H8.97C5.13 10 2 13.12 2 16.97V40h7.96V30h32.09v10H50V16.97A6.97 6.97 0 0043.03 10z'/%3E%3C/g%3E%3C/svg%3E");
}
.printable-version:hover {
opacity: 1;
}