<html>
<head>
    <link rel="stylesheet" href="media/admin/style.css">
    <link rel="stylesheet" href="media/common.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="icon" type="image/png" sizes="48x48" href="media/conjuro-logo-icon.png">
    <title><?=$this->conf("site-title")?></title>
    <style><?=$this->meta("css")?></style>
    <script src="media/muWeb.js"></script>
    <script src="media/admin/builder.js"></script>
</head>
<body>
<div id="panel">
    <div id="panel-title"><img src="media/conjuro-logo-400.png"></div>
    <div id="panel-user"><?=$this->data('username')?> <a href="?logout=yes&page=index"><i class="fa-solid fa-right-from-bracket"></i></a></div>
    <div id="panel-content"><?php $this->showContent('panel');?></div>
</div>
<div id="workarea" class="layout vertical">
    <div id="content" class="main layout vertical">
        <div id="content-header"><?php $this->showContent('header');?></div>
        <div id="content-body" class="main layout vertical"><?php $this->showContent('body');?></div>
    </div>
    <div id="footer">Conjuro (C) XWolf 2022-2023</div>
</div>
<?php
    if ($this->conf("debug")){
?>
<script>
    function toggleDebug(){
        var dip=document.getElementById("debug-info-panel");
        if (dip.style.display)
            dip.style.display="";
        else
            dip.style.display="none";
    }
</script>
<div id="debug-info" onclick="toggleDebug()">[show page data]</div>
<div id="debug-info-panel" style="display:none" onclick="toggleDebug()">
    <div id="full-scroll">
        <div>Meta:</div>
        <pre><?php var_dump($this->getAllMeta())?></pre>
        <div>Data:</div>
        <pre><?php var_dump($this->getAllData())?></pre>
    </div>
</div>
<?php
    }
?>
</body>
</html>