feat: add evidence-led Reveal presentation and homepage invitation
This commit is contained in:
1 parent
fcaa84f3bf
commit
9a7766b323
12 files changed
+271
-3
No files matched your search
@@ -0,0 +1,27 @@
|
||||
/* Reveal 5.2.1, fully local runtime; this document is isolated from Docusaurus CSS. */
|
||||
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');
|
||||
function layoutSize(){
|
||||
const narrow=portrait.matches&&!printing;
|
||||
document.documentElement.classList.toggle('portrait',narrow);
|
||||
return narrow?{width:600,height:1000}:{width:1200,height:660};
|
||||
}
|
||||
Reveal.initialize({
|
||||
...layoutSize(), margin:0.04, minScale:0.1, maxScale:2,
|
||||
hash:true, 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,
|
||||
// Keep deliberate slides on phones rather than Reveal's automatic scroll view.
|
||||
scrollActivationWidth:null, pdfMaxPagesPerSlide:1, pdfSeparateFragments:false,
|
||||
plugins:[RevealNotes]
|
||||
});
|
||||
portrait.addEventListener('change',()=>Reveal.configure(layoutSize()));
|
||||
reducedMotion.addEventListener('change',event=>Reveal.configure({transition:event.matches?'none':'fade'}));
|
||||
document.getElementById('overview').addEventListener('click',()=>Reveal.toggleOverview());
|
||||
document.getElementById('notes').addEventListener('click',()=>Reveal.getPlugin('notes').open());
|
||||
document.getElementById('fullscreen').addEventListener('click',()=>{
|
||||
if(document.fullscreenElement) document.exitFullscreen();
|
||||
else document.documentElement.requestFullscreen?.();
|
||||
});
|
||||
Reference in new issue
Block a user