aboutsummaryrefslogtreecommitdiff
path: root/src/view/templates/header.php
blob: 89cdd4bfcbc3fe9e0a526650e1f15bbe1b28692e (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
57
58
59
60
<?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" style="flex-direction: <?= $header_social_flex_direction ?>;">
<?php foreach(array_keys($social) as $one_key){ ?>
                            <div id="header_<?= $one_key ?>">
                                <a href="<?= $social[$one_key] ?>" target="_blank" rel="noopener noreferrer"><img id="header_<?= $one_key ?>_content" src="assets/<?= $one_key ?>.svg" alt="<?= $one_key ?>_alt"></a>
                                <?= $admin_social_networks[$one_key] ?>
                            </div>
<?php } ?>
                        <?= $admin_social_new_network ?>
                        </div>
                    </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');
            </script>
<?php } ?>
        </header>