aboutsummaryrefslogtreecommitdiff
path: root/src/view/templates/header.php
blob: 9c74f9bb20286eca56d8309d60487f72b4c55cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php declare(strict_types=1); ?>
<body>
    <div>
	   <header style="background-image: url('<?= $header_background ?? '' ?>');">
            <div id="nav_zone">
                <?= $nav ?>
            </div>
            <div class="header_additional_inputs">
                <div id="head_favicon">
                    <?= $admin_favicon ?>
                </div>
                <div id="header_background">
                    <?= $admin_background ?>
                </div>
            </div>
            <div class="header_content">
                <div class="header_left_col">
                    <div id="header_logo">
                        <a href="<?= new URL ?>"><img id="header_logo_content" src="<?= $header_logo ?? '' ?>" alt="header_logo"></a>
                        <?= $admin_header_logo ?>
                    </div>
                </div>
                <div class="nav_button">
                    <button>MENU</button>
                </div>
                <div class="header_center_col">
                    <h1 id="header_title">
                        <a id="header_title_content" href="<?= new URL ?>"><?= htmlspecialchars($title ?? '') ?></a>
                        <?= $admin_header_title ?>
                    </h1>
                    <h2 id="header_description">
                        <span id="header_description_content"><?= htmlspecialchars($description ?? '') ?></span>
                        <?= $admin_header_description ?>
                    </h2>
                </div>
                <div class="header_right_col">
                    <div id="header_social">
                        <div id="header_social_content">
                            <?= $social_networks ?>
                        </div>
                        <?= $admin_social_networks ?>
                    </div>
                    <?= $breadcrumb ?? '' ?>
                </div>
            </div>
<?php if($_SESSION['admin']){ ?>
            <script>
                let head_favicon = new InputFileFavicon('head_favicon');
                let header_background = new InputFileHeaderBackground('header_background');
                let header_logo = new InputFile('header_logo');
                let header_title = new InputText('header_title');
                let header_description = new InputText('header_description');
                let header_social = new InputToggler('header_social');
            </script>
<?php } ?>
        </header>