bjverde / ludsce

LUDS ( PHP Digital Signage ), a simple Digital Signage with Player Software via browser:
GNU General Public License v3.0
21 stars 11 forks source link

Criar função info tela #4

Open bjverde opened 2 years ago

bjverde commented 2 years ago

Na tela config geral colocar um swicht para ligar o modo "info tela" que mostrar as dimensões da tela para produzir as imagens

bjverde commented 1 year ago
bjverde commented 1 year ago
<!DOCTYPE html>
<html>
<head>
    <script>
        function sizeOfThings(){
            var windowWidth = window.innerWidth;
            var windowHeight = window.innerHeight;

            var screenWidth = screen.width;
            var screenHeight = screen.height;

            document.querySelector('.window-size').innerHTML = windowWidth + 'x' + windowHeight;
            document.querySelector('.screen-size').innerHTML = screenWidth + 'x' + screenHeight;
        };
    </script>
</head>
<body onload="sizeOfThings()">
    <h3>Window size is <span class="window-size"></span></h3>
    <p>Knowing this number you can make decisions based in breakpoints of window.</p>
    <hr>
    <h3>Screen size is <span class="screen-size"></span></h3>
    <p>Here you have an idea of device screen size. </p>
</body>
</html>