diff options
Diffstat (limited to 'src/view/templates/header.php')
| -rw-r--r-- | src/view/templates/header.php | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/src/view/templates/header.php b/src/view/templates/header.php index 7977ef3..ac8af7f 100644 --- a/src/view/templates/header.php +++ b/src/view/templates/header.php | |||
| @@ -5,15 +5,22 @@ | |||
| 5 | <div id="nav_zone"> | 5 | <div id="nav_zone"> |
| 6 | <?= $nav ?> | 6 | <?= $nav ?> |
| 7 | </div> | 7 | </div> |
| 8 | 8 | <div class="editing_zone"> | |
| 9 | <div class="header-content"> | 9 | <div id="head_favicon" style="margin: <?= $editing_zone_margin ?>;"> |
| 10 | <input type="file" id="head_favicon_input" class="hidden" accept="image/png, image/jpeg, image/gif, image/webp, image/tiff, image/x-icon, image/bmp"> | ||
| 11 | <?= $buttons_favicon ?> | ||
| 12 | </div> | ||
| 13 | <div id="header_background"> | ||
| 14 | <input type="file" id="header_background_input" class="hidden" accept="image/png, image/jpeg, image/gif, image/webp, image/tiff"> | ||
| 15 | <?= $buttons_background ?> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | <div class="header_content"> | ||
| 10 | <div class="header_left_col"> | 19 | <div class="header_left_col"> |
| 11 | <div id="edit_favicon_zone" class="<?= $edit_favicon_hidden ?>"> | 20 | <div id="header_logo"> |
| 12 | <?= $button_favicon ?> | 21 | <a href="<?= new URL ?>"><img id="header_logo_img" src="<?= $header_logo ?? '' ?>" alt="header_logo"></a> |
| 13 | </div> | 22 | <input type="file" id="header_logo_input" class="hidden" accept="image/png, image/jpeg, image/gif, image/webp, image/tiff"> |
| 14 | <div> | 23 | <?= $buttons_header_logo ?> |
| 15 | <a href="<?= new URL ?>"><img id="header_logo" src="<?= $header_logo ?>" alt="logo_alt"></a> | ||
| 16 | <?= $button_header_logo ?> | ||
| 17 | </div> | 24 | </div> |
| 18 | </div> | 25 | </div> |
| 19 | <div class="nav_button"> | 26 | <div class="nav_button"> |
| @@ -21,13 +28,11 @@ | |||
| 21 | </div> | 28 | </div> |
| 22 | <div class="site_title"> | 29 | <div class="site_title"> |
| 23 | <h1 id="header_title"> | 30 | <h1 id="header_title"> |
| 24 | <script>let header_title = new InputText('header_title');</script> | ||
| 25 | <a href="<?= new URL ?>"><span id="header_title_span"><?= htmlspecialchars($title ?? '') ?></span></a> | 31 | <a href="<?= new URL ?>"><span id="header_title_span"><?= htmlspecialchars($title ?? '') ?></span></a> |
| 26 | <input type="text" id="header_title_input" class="hidden" value="<?= htmlspecialchars($title ?? '') ?>" size="30"> | 32 | <input type="text" id="header_title_input" class="hidden" value="<?= htmlspecialchars($title ?? '') ?>" size="30"> |
| 27 | <?= $buttons_header_title ?> | 33 | <?= $buttons_header_title ?> |
| 28 | </h1> | 34 | </h1> |
| 29 | <h2 id="header_description"> | 35 | <h2 id="header_description"> |
| 30 | <script>let header_description = new InputText('header_description');</script> | ||
| 31 | <span id="header_description_span"><?= htmlspecialchars($description ?? '') ?></span> | 36 | <span id="header_description_span"><?= htmlspecialchars($description ?? '') ?></span> |
| 32 | <input type="text" id="header_description_input" class="hidden" value="<?= htmlspecialchars($description ?? '') ?>" size="30"> | 37 | <input type="text" id="header_description_input" class="hidden" value="<?= htmlspecialchars($description ?? '') ?>" size="30"> |
| 33 | <?= $buttons_header_description ?> | 38 | <?= $buttons_header_description ?> |
| @@ -41,4 +46,13 @@ | |||
| 41 | <?= $breadcrumb ?? '' ?> | 46 | <?= $breadcrumb ?? '' ?> |
| 42 | </div> | 47 | </div> |
| 43 | </div> | 48 | </div> |
| 49 | <?php if($_SESSION['admin']){ ?> | ||
| 50 | <script> | ||
| 51 | let head_favicon = new InputFile('head_favicon'); | ||
| 52 | let header_background = new InputFile('header_background'); | ||
| 53 | let header_logo = new InputFile('header_logo'); | ||
| 54 | let header_title = new InputText('header_title'); | ||
| 55 | let header_description = new InputText('header_description'); | ||
| 56 | </script> | ||
| 57 | <?php } ?> | ||
| 44 | </header> \ No newline at end of file | 58 | </header> \ No newline at end of file |
