LiaTemplates / Fullscreen

This plugin removes the LiaScript nav-bar in fullscreen-mode, which can be used in presentations.

Home Page:https://liascript.github.io/course/?https://raw.githubusercontent.com/LiaTemplates/Fullscreen/main/README.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fullscreen - Template

By importing this README via:

import: https://raw.githubusercontent.com/LiaTemplates/Fullscreen/0.0.1/README.md

into your document header, as it is shown below, an event listener will be added automatically to your course, which will hide the main nav bar of your course when you get into fullscreen mode by hitting F11.

<!--
author:   ...

import: https://raw.githubusercontent.com/LiaTemplates/Fullscreen/0.0.1/README.md
-->

# Main Title

Implementation

@onload

window.onresize = function (event) {
    var maxHeight = window.screen.height,
        maxWidth = window.screen.width,
        curHeight = window.innerHeight,
        curWidth = window.innerWidth;

    if (maxWidth == curWidth && maxHeight == curHeight) {
        const head = document.getElementById("lia-toolbar-nav")
        
        head.style.display="none"
        head.nextSibling.style["margin-top"] = "0px"

        window.fullscreenMode = true
    } else if (window.fullscreenMode){
        const head = document.getElementById("lia-toolbar-nav")
        
        head.style.display=""
        head.nextSibling.style["margin-top"] = ""

        window.fullscreenMode = false
    }
}

@end

About

This plugin removes the LiaScript nav-bar in fullscreen-mode, which can be used in presentations.

https://liascript.github.io/course/?https://raw.githubusercontent.com/LiaTemplates/Fullscreen/main/README.md

License:Creative Commons Zero v1.0 Universal