Exposed main keyboard shortcuts as links for improved accessibility.

This commit is contained in:
David Russell 2017-05-01 18:32:22 +07:00
parent 38ac5a14f4
commit 005153e9cb
3 changed files with 44 additions and 0 deletions

View File

@ -72,6 +72,13 @@
@LandingSocialFeatures(rndr)
}
<div style="position: fixed; bottom: 52px; left: 20px; z-index: 999">
<span class="shortcut" style="font-size:0.8em"><a href="#" onclick="enterFullscreen()">Fullscreen</a></span>
<span style="color:black; font-size:0.8em"> - </span>
<span class="shortcut" style="font-size:0.8em"><a href="#" onclick="enterOverview()">Overview</a></span>
<span style="color:black; font-size:0.8em"> - </span>
<span class="shortcut" style="font-size:0.8em"><a href="#" onclick="enterBlackout()">Blackout</a></span>
</div>
<div style="position: fixed; bottom: 52px; right: 20px; z-index: 999">
<span class="octicon octicon-info" style="font-size:0.8em; color: black"></span>
<span style="color:black; font-size:0.8em">Press ? for Help</span>
@ -97,6 +104,27 @@
}
};
window.setInterval(focusOnSlides, 250);
function enterFullscreen() {
var iframes = $("#slideshow");
if(iframes.length > 0) {
iframes[0].contentWindow.enterFullscreen();
}
};
function enterOverview() {
var iframes = $("#slideshow");
if(iframes.length > 0) {
iframes[0].contentWindow.enterOverview();
}
};
function enterBlackout() {
var iframes = $("#slideshow");
if(iframes.length > 0) {
iframes[0].contentWindow.enterBlackout();
}
};
</script>
</body>
</html>

View File

@ -16,6 +16,10 @@
.themes > a {
color: #e49436;
}
.shortcut > a{
color: #e49436;
font-weight: bold;
}
#slideshow {
background-image: url('@deps.gitpitchimg(offline)/preloader-75.gif');
background-repeat: no-repeat;

View File

@ -62,4 +62,16 @@
}
});
function enterFullscreen() {
Reveal.triggerKey(70);
};
function enterOverview() {
Reveal.toggleOverview();
};
function enterBlackout() {
Reveal.togglePause();
};
</script>