1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-19 04:52:20 +02:00

foundation for reader mode, activate via 'mode=reader/print' config param

This commit is contained in:
Hakim El Hattab
2023-09-12 17:00:56 +02:00
parent 487cc860f8
commit 6aa1eae796
5 changed files with 224 additions and 32 deletions

View File

@@ -5,7 +5,7 @@
* https://revealjs.com/pdf-export/
*/
html.print-pdf {
html.reveal-print {
* {
-webkit-print-color-adjust: exact;
}

View File

@@ -1864,6 +1864,143 @@ $notesWidthPercent: 25%;
}
/*********************************************
* READER MODE
*********************************************/
html.reveal-reader {
width: 100%;
height: 100%;
overflow: visible;
.reveal-viewport, body {
margin: 0 auto !important;
overflow: auto;
}
.reveal .controls,
.reveal .progress,
.reveal .playback {
display: none !important;
}
.reveal {
display: flex;
justify-content: center;
width: auto !important;
height: auto !important;
overflow: visible !important;
}
.reveal .slides {
position: static;
zoom: 1 !important;
pointer-events: initial;
transform-origin: 50% 0;
left: auto;
top: auto;
margin: 0 !important;
padding: 0 !important;
overflow: visible;
display: block;
perspective: none;
perspective-origin: 50% 50%;
}
.reveal .slides .reader-page {
display: grid;
place-items: center;
position: relative;
overflow: hidden;
z-index: 1;
page-break-after: always;
}
.reveal .slides .reader-page section {
visibility: visible !important;
display: block !important;
position: relative !important;
margin: 0 !important;
padding: 0 !important;
box-sizing: border-box !important;
min-height: 1px;
opacity: 1 !important;
transform-style: flat !important;
transform: none !important;
}
.reveal section.stack {
position: relative !important;
margin: 0 !important;
padding: 0 !important;
page-break-after: avoid !important;
height: auto !important;
min-height: auto !important;
}
/* Slide backgrounds are nested inside of the page in reader mode */
.reveal .backgrounds {
display: none;
}
.reveal .slide-background {
display: block !important;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: auto !important;
visibility: visible;
opacity: 1;
}
/* Display slide speaker notes when 'showNotes' is enabled */
.reveal.show-notes {
max-width: none;
max-height: none;
}
.reveal .speaker-notes-pdf {
display: block;
width: 100%;
height: auto;
max-height: none;
top: auto;
right: auto;
bottom: auto;
left: auto;
z-index: 100;
}
/* Layout option which makes notes appear on a separate page */
.reveal .speaker-notes-pdf[data-layout="separate-page"] {
position: relative;
color: inherit;
background-color: transparent;
padding: 20px;
page-break-after: always;
border: 0;
}
/* Display slide numbers when 'slideNumber' is enabled */
.reveal .slide-number-pdf {
display: block;
position: absolute;
font-size: 14px;
}
/* This accessibility tool is not useful in PDF and breaks it visually */
.aria-status {
display: none;
}
}
/*********************************************
* PRINT STYLES
*********************************************/