feat: embed canonical presentation on homepage
Build and publish Eldorado documentation / build (pull_request) Successful in 42s
Build and publish Eldorado documentation / build (pull_request) Successful in 42s
This commit is contained in:
1 parent
432370473d
commit
8a9363ccb2
10 files changed
+171
-10
No files matched your search
@@ -2,6 +2,13 @@
|
||||
const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
|
||||
const portrait = window.matchMedia('(max-width: 700px) and (orientation: portrait)');
|
||||
const printing = new URLSearchParams(location.search).has('print-pdf');
|
||||
const embedded = new URLSearchParams(location.search).has('embed') && !printing;
|
||||
document.documentElement.classList.toggle('embedded', embedded);
|
||||
if (embedded) {
|
||||
document.querySelector('.toolbar').hidden = true;
|
||||
// Never load the portal inside the stage when following the reference appendix.
|
||||
document.querySelectorAll('.slides a').forEach(link => { link.target = '_top'; });
|
||||
}
|
||||
function layoutSize(){
|
||||
const narrow=portrait.matches&&!printing;
|
||||
document.documentElement.classList.toggle('portrait',narrow);
|
||||
@@ -9,10 +16,13 @@ function layoutSize(){
|
||||
}
|
||||
Reveal.initialize({
|
||||
...layoutSize(), margin:0.04, minScale:0.1, maxScale:2,
|
||||
hash:true, hashOneBasedIndex:false, controls:true, progress:true,
|
||||
hash:!embedded, embedded, keyboardCondition:embedded ? () => document.hasFocus() : null,
|
||||
hashOneBasedIndex:false, controls:true, progress:true,
|
||||
slideNumber:'c/t', showSlideNumber:'all', center:false,
|
||||
transition:reducedMotion.matches?'none':'fade', transitionSpeed:'fast',
|
||||
backgroundTransition:'none', autoSlide:0, touch:true, keyboard:true,
|
||||
backgroundTransition:'none', autoSlide:0, touch:true,
|
||||
// The host owns fullscreen; speaker tools remain available in the standalone deck.
|
||||
keyboard:embedded ? {70:null,83:null} : true,
|
||||
// Keep deliberate slides on phones rather than Reveal's automatic scroll view.
|
||||
scrollActivationWidth:null, pdfMaxPagesPerSlide:1, pdfSeparateFragments:false,
|
||||
plugins:[RevealNotes]
|
||||
|
||||
Reference in new issue
Block a user