diff options
Diffstat (limited to 'src/view')
| -rw-r--r-- | src/view/FooterBuilder.php | 20 | ||||
| -rw-r--r-- | src/view/HeadBuilder.php | 6 | ||||
| -rw-r--r-- | src/view/HeaderBuilder.php | 53 | ||||
| -rw-r--r-- | src/view/MenuBuilder.php | 26 | ||||
| -rw-r--r-- | src/view/templates/footer.php | 20 | ||||
| -rw-r--r-- | src/view/templates/header.php | 40 |
6 files changed, 87 insertions, 78 deletions
diff --git a/src/view/FooterBuilder.php b/src/view/FooterBuilder.php index fcb78e0..277de4b 100644 --- a/src/view/FooterBuilder.php +++ b/src/view/FooterBuilder.php | |||
| @@ -30,17 +30,21 @@ class FooterBuilder extends AbstractBuilder | |||
| 30 | if($_SESSION['admin']) | 30 | if($_SESSION['admin']) |
| 31 | { | 31 | { |
| 32 | // données du footer | 32 | // données du footer |
| 33 | $buttons_footer_name = '<img id="footer_name_open" class="action_icon" src="assets/edit.svg" onclick="footer_name.open()"> | 33 | $admin_footer_name = '<input type="text" id="footer_name_input" class="hidden" value="' . htmlspecialchars($name ?? '') . '" size="30"> |
| 34 | <img id="footer_name_open" class="action_icon" src="assets/edit.svg" onclick="footer_name.open()"> | ||
| 34 | <img id="footer_name_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_name.submit()"> | 35 | <img id="footer_name_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_name.submit()"> |
| 35 | <img id="footer_name_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_name.cancel()">'; | 36 | <img id="footer_name_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_name.cancel()">'; |
| 36 | $buttons_footer_address = '<img id="footer_address_open" class="action_icon" src="assets/edit.svg" onclick="footer_address.open()"> | 37 | $admin_footer_address = '<input type="text" id="footer_address_input" class="hidden" value="' . htmlspecialchars($address ?? '') . '" size="30"> |
| 38 | <img id="footer_address_open" class="action_icon" src="assets/edit.svg" onclick="footer_address.open()"> | ||
| 37 | <img id="footer_address_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_address.submit()"> | 39 | <img id="footer_address_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_address.submit()"> |
| 38 | <img id="footer_address_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_address.cancel()">'; | 40 | <img id="footer_address_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_address.cancel()">'; |
| 39 | $buttons_footer_email = '<img id="footer_email_open" class="action_icon" src="assets/edit.svg" onclick="footer_email.open()"> | 41 | $admin_footer_email = '<input type="text" id="footer_email_input" class="hidden" value="' . htmlspecialchars($email ?? '') . '" size="30"> |
| 42 | <img id="footer_email_open" class="action_icon" src="assets/edit.svg" onclick="footer_email.open()"> | ||
| 40 | <img id="footer_email_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_email.submit()"> | 43 | <img id="footer_email_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_email.submit()"> |
| 41 | <img id="footer_email_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_email.cancel()">'; | 44 | <img id="footer_email_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_email.cancel()">'; |
| 42 | 45 | ||
| 43 | $buttons_footer_logo = '<img id="footer_logo_open" class="action_icon" src="assets/edit.svg" onclick="footer_logo.open()"> | 46 | $admin_footer_logo = '<input type="file" id="footer_logo_input" class="hidden" accept="image/png, image/jpeg, image/gif, image/webp, image/tiff"> |
| 47 | <img id="footer_logo_open" class="action_icon" src="assets/edit.svg" onclick="footer_logo.open()"> | ||
| 44 | <img id="footer_logo_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_logo.submit()"> | 48 | <img id="footer_logo_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_logo.submit()"> |
| 45 | <img id="footer_logo_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_logo.cancel()">'; | 49 | <img id="footer_logo_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_logo.cancel()">'; |
| 46 | 50 | ||
| @@ -81,10 +85,10 @@ class FooterBuilder extends AbstractBuilder | |||
| 81 | } | 85 | } |
| 82 | $zone_admin = '<button><a href="' . $url . '">Mode admin</a></button>'; | 86 | $zone_admin = '<button><a href="' . $url . '">Mode admin</a></button>'; |
| 83 | 87 | ||
| 84 | $buttons_footer_name = ''; | 88 | $admin_footer_name = ''; |
| 85 | $buttons_footer_address = ''; | 89 | $admin_footer_address = ''; |
| 86 | $buttons_footer_email = ''; | 90 | $admin_footer_email = ''; |
| 87 | $buttons_footer_logo = ''; | 91 | $admin_footer_logo = ''; |
| 88 | } | 92 | } |
| 89 | 93 | ||
| 90 | ob_start(); | 94 | ob_start(); |
diff --git a/src/view/HeadBuilder.php b/src/view/HeadBuilder.php index fd7f751..88e69fb 100644 --- a/src/view/HeadBuilder.php +++ b/src/view/HeadBuilder.php | |||
| @@ -36,8 +36,7 @@ class HeadBuilder extends AbstractBuilder | |||
| 36 | 36 | ||
| 37 | if($_SESSION['admin']){ | 37 | if($_SESSION['admin']){ |
| 38 | // édition éléments sur toutes les pages (header, footer et favicon) | 38 | // édition éléments sur toutes les pages (header, footer et favicon) |
| 39 | $js .= '<script src="' . self::versionedFileURL('js', 'InputText') . '"></script>' . "\n"; | 39 | $js .= '<script src="' . self::versionedFileURL('js', 'Input') . '"></script>' . "\n"; |
| 40 | $js .= '<script src="' . self::versionedFileURL('js', 'InputFile') . '"></script>' . "\n"; | ||
| 41 | 40 | ||
| 42 | // tinymce, nécéssite un script de copie dans composer.json | 41 | // tinymce, nécéssite un script de copie dans composer.json |
| 43 | $css .= '<link rel="stylesheet" href="' . self::versionedFileURL('css', 'tinymce') . '">' . "\n"; | 42 | $css .= '<link rel="stylesheet" href="' . self::versionedFileURL('css', 'tinymce') . '">' . "\n"; |
| @@ -50,7 +49,8 @@ class HeadBuilder extends AbstractBuilder | |||
| 50 | 49 | ||
| 51 | // favicon | 50 | // favicon |
| 52 | // ?-> est l'opérateur de navigation sécurisée => LOVE! | 51 | // ?-> est l'opérateur de navigation sécurisée => LOVE! |
| 53 | $favicon = Asset::USER_PATH . ($favicon_object = $node->getNodeData()->getAssetByRole('head_favicon'))?->getFileName() ?? ''; | 52 | $favicon_name = ($favicon_object = $node->getNodeData()->getAssetByRole('head_favicon'))?->getFileName(); |
| 53 | $favicon = $favicon_name ? Asset::USER_PATH . $favicon_name : ''; | ||
| 54 | $favicon_type = $favicon_object?->getMimeType() ?? ''; | 54 | $favicon_type = $favicon_object?->getMimeType() ?? ''; |
| 55 | 55 | ||
| 56 | ob_start(); | 56 | ob_start(); |
diff --git a/src/view/HeaderBuilder.php b/src/view/HeaderBuilder.php index 1c82368..4651418 100644 --- a/src/view/HeaderBuilder.php +++ b/src/view/HeaderBuilder.php | |||
| @@ -43,8 +43,10 @@ class HeaderBuilder extends AbstractBuilder | |||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | // réseaux sociaux + logo dans l'entête | 45 | // réseaux sociaux + logo dans l'entête |
| 46 | // ?-> est l'opérateur de chainage optionnel | ||
| 46 | $header_logo = Asset::USER_PATH . $node_data->getAssetByRole('header_logo')?->getFileName() ?? ''; | 47 | $header_logo = Asset::USER_PATH . $node_data->getAssetByRole('header_logo')?->getFileName() ?? ''; |
| 47 | $header_background = Asset::USER_PATH . $node_data->getAssetByRole('header_background')?->getFileName() ?? ''; | 48 | $header_background_name = $node_data->getAssetByRole('header_background')?->getFileName(); |
| 49 | $header_background = $header_background_name ? Asset::USER_PATH . $header_background_name : ''; | ||
| 48 | 50 | ||
| 49 | $keys = array_keys($social); | 51 | $keys = array_keys($social); |
| 50 | $social_networks = ''; | 52 | $social_networks = ''; |
| @@ -55,39 +57,54 @@ class HeaderBuilder extends AbstractBuilder | |||
| 55 | 57 | ||
| 56 | // boutons mode admin | 58 | // boutons mode admin |
| 57 | if($_SESSION['admin']){ | 59 | if($_SESSION['admin']){ |
| 58 | // assets dans classe editing_zone | 60 | // assets dans classe header_additional_inputs |
| 59 | $editing_zone_margin = '5px'; | 61 | $admin_favicon = '<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"> |
| 60 | $buttons_favicon = '<button id="head_favicon_open" onclick="head_favicon.open()"><img id="head_favicon_img" class="action_icon"> Favicon</button> | 62 | <button id="head_favicon_open" onclick="head_favicon.open()"><img id="head_favicon_content" class="action_icon"> Favicon</button> |
| 61 | <script>document.getElementById(\'head_favicon_img\').src = window.Config.favicon;</script> | 63 | <script>document.getElementById("head_favicon_content").src = window.Config.favicon;</script> |
| 62 | <img id="head_favicon_submit" class="action_icon hidden" src="assets/save.svg" onclick="head_favicon.submit()"> | 64 | <img id="head_favicon_submit" class="action_icon hidden" src="assets/save.svg" onclick="head_favicon.submit()"> |
| 63 | <img id="head_favicon_cancel" class="action_icon hidden" src="assets/close.svg" onclick="head_favicon.cancel()">'; | 65 | <img id="head_favicon_cancel" class="action_icon hidden" src="assets/close.svg" onclick="head_favicon.cancel()">'; |
| 64 | $buttons_background = '<button id="header_background_open" onclick="header_background.open()"><img id="header_background_img" class="background_button" src="' . $header_background . '"> Image de fond</button> | 66 | $admin_background = '<input type="file" id="header_background_input" class="hidden" accept="image/png, image/jpeg, image/gif, image/webp, image/tiff"> |
| 67 | <button id="header_background_open" onclick="header_background.open()"><img id="header_background_content" class="background_button" src="' . $header_background . '"> Image de fond</button> | ||
| 65 | <img id="header_background_submit" class="action_icon hidden" src="assets/save.svg" onclick="header_background.submit()"> | 68 | <img id="header_background_submit" class="action_icon hidden" src="assets/save.svg" onclick="header_background.submit()"> |
| 66 | <img id="header_background_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_background.cancel()">'; | 69 | <img id="header_background_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_background.cancel()">'; |
| 67 | 70 | ||
| 68 | // asset dans classe header_content | 71 | // asset dans classe header_content |
| 69 | $buttons_header_logo = '<img id="header_logo_open" class="action_icon" src="assets/edit.svg" onclick="header_logo.open()"> | 72 | $admin_header_logo = '<input type="file" id="header_logo_input" class="hidden" accept="image/png, image/jpeg, image/gif, image/webp, image/tiff"> |
| 73 | <img id="header_logo_open" class="action_icon" src="assets/edit.svg" onclick="header_logo.open()"> | ||
| 70 | <img id="header_logo_submit" class="action_icon hidden" src="assets/save.svg" onclick="header_logo.submit()"> | 74 | <img id="header_logo_submit" class="action_icon hidden" src="assets/save.svg" onclick="header_logo.submit()"> |
| 71 | <img id="header_logo_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_logo.cancel()">'; | 75 | <img id="header_logo_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_logo.cancel()">'; |
| 72 | // texte dans classe header_content | 76 | // texte dans classe header_content |
| 73 | $buttons_header_title = '<img id="header_title_open" class="action_icon" src="assets/edit.svg" onclick="header_title.open()"> | 77 | $admin_header_title = '<input type="text" id="header_title_input" class="hidden" value="' . htmlspecialchars($title ?? '') . '" size="30"> |
| 78 | <img id="header_title_open" class="action_icon" src="assets/edit.svg" onclick="header_title.open()"> | ||
| 74 | <img id="header_title_submit" class="action_icon hidden" src="assets/save.svg" onclick="header_title.submit()"> | 79 | <img id="header_title_submit" class="action_icon hidden" src="assets/save.svg" onclick="header_title.submit()"> |
| 75 | <img id="header_title_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_title.cancel()">'; | 80 | <img id="header_title_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_title.cancel()">'; |
| 76 | $buttons_header_description = '<img id="header_description_open" class="action_icon" src="assets/edit.svg" onclick="header_description.open()"> | 81 | $admin_header_description = '<input type="text" id="header_description_input" class="hidden" value="' . htmlspecialchars($description ?? '') . '" size="30"> |
| 82 | <img id="header_description_open" class="action_icon" src="assets/edit.svg" onclick="header_description.open()"> | ||
| 77 | <img id="header_description_submit" class="action_icon hidden" src="assets/save.svg" onclick="header_description.submit()"> | 83 | <img id="header_description_submit" class="action_icon hidden" src="assets/save.svg" onclick="header_description.submit()"> |
| 78 | <img id="header_description_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_description.cancel()">'; | 84 | <img id="header_description_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_description.cancel()">'; |
| 79 | 85 | ||
| 80 | //$buttons_social_networks = '<img class="action_icon" src="assets/edit.svg" onclick="editSocialNetworks()">'; | 86 | // icônes réseaux sociaux |
| 81 | $buttons_social_networks = ''; | 87 | $social_networks_inputs = '<div id="header_social_input" class="hidden">'; |
| 88 | foreach($keys as $one_key){ | ||
| 89 | $social_networks_inputs .= '<div> | ||
| 90 | <input type="text" placeholder="nom du réseau social"> | ||
| 91 | <input type="text" placeholder="lien https://..."> | ||
| 92 | <input type="file"> | ||
| 93 | </div>'; | ||
| 94 | } | ||
| 95 | $social_networks_inputs .= '</div>'; | ||
| 96 | /*$admin_social_networks = $social_networks_inputs . '<img id="header_social_open" class="action_icon" src="assets/edit.svg" onclick="header_social.open()"> | ||
| 97 | <div id="header_social_submit" class="hidden"></div> | ||
| 98 | <img id="header_social_cancel" class="action_icon hidden" src="assets/close.svg" onclick="header_social.cancel()">';*/ | ||
| 99 | $admin_social_networks = ''; | ||
| 82 | } | 100 | } |
| 83 | else{ | 101 | else{ |
| 84 | $editing_zone_margin = '0'; | 102 | $admin_favicon = ''; |
| 85 | $buttons_favicon = ''; | 103 | $admin_background = ''; |
| 86 | $buttons_background = ''; | 104 | $admin_header_logo = ''; |
| 87 | $buttons_header_logo = ''; | 105 | $admin_header_title = ''; |
| 88 | $buttons_header_title = ''; | 106 | $admin_header_description = ''; |
| 89 | $buttons_header_description = ''; | 107 | $admin_social_networks = ''; |
| 90 | $buttons_social_networks = ''; | ||
| 91 | } | 108 | } |
| 92 | 109 | ||
| 93 | ob_start(); | 110 | ob_start(); |
diff --git a/src/view/MenuBuilder.php b/src/view/MenuBuilder.php index 12298cf..8e8b9a9 100644 --- a/src/view/MenuBuilder.php +++ b/src/view/MenuBuilder.php | |||
| @@ -55,32 +55,26 @@ class MenuBuilder extends AbstractBuilder | |||
| 55 | <img class="move_entry_icon" onclick="switchMenuPositions(' . $entry->getId() . ', \'down\')" src="assets/arrow-down.svg"> | 55 | <img class="move_entry_icon" onclick="switchMenuPositions(' . $entry->getId() . ', \'down\')" src="assets/arrow-down.svg"> |
| 56 | <span class="menu_entry_checkbox"> | 56 | <span class="menu_entry_checkbox"> |
| 57 | <input type="checkbox" ' . $checked . ' onclick="checkMenuEntry(' . $entry->getId() . ')"> | 57 | <input type="checkbox" ' . $checked . ' onclick="checkMenuEntry(' . $entry->getId() . ')"> |
| 58 | </span> | 58 | </span>'; |
| 59 | <button>' . $entry->getPageName() . '</button>'; | ||
| 60 | 59 | ||
| 61 | // seul la modification des URL est possible pour l'instant, les noms des entrées de menu attendront | 60 | // entrées URL: bouton poubelle + nom du lien + adresse |
| 62 | if(str_starts_with($entry->getEndOfPath(), 'http')){ | 61 | if(str_starts_with($entry->getEndOfPath(), 'http')){ |
| 63 | $this->html .= '<form style="display: inline;" id="delete-i' . $entry->getId() . '" method="post" action="' . new URL(['from' => 'menu_chemins']) . '"> | 62 | $this->html .= '<form style="display: inline;" id="delete-i' . $entry->getId() . '" method="post" action="' . new URL(['from' => 'menu_chemins']) . '"> |
| 64 | <input type="hidden" name="delete" value="' . $entry->getId() . '"> | 63 | <input type="hidden" name="delete" value="' . $entry->getId() . '"> |
| 65 | <input type="image" class="move_entry_icon" src="assets/delete-bin.svg" alt="delete link button" onclick="return confirm(\'Voulez-vous vraiment supprimer cette entrée?\');"> | 64 | <input type="image" class="move_entry_icon" src="assets/delete-bin.svg" alt="delete link button" onclick="return confirm(\'Voulez-vous vraiment supprimer cette entrée?\');"> |
| 66 | </form> | 65 | </form> |
| 67 | <span class="url"> | 66 | <span class="url_name"> |
| 67 | <button class="url_name"><input type="" value="' . htmlspecialchars($entry->getPageName()) . '"></button> | ||
| 68 | <img class="move_entry_icon" src="assets/save.svg" onclick="editUrl(' . $entry->getId() . ', \'url_name\')"> | ||
| 69 | </span> | ||
| 70 | <span class="url_content"> | ||
| 68 | <input type="url" value="' . htmlspecialchars($entry->getEndOfPath()) . '"> | 71 | <input type="url" value="' . htmlspecialchars($entry->getEndOfPath()) . '"> |
| 69 | <img class="move_entry_icon" src="assets/save.svg" onclick="editUrlEntry(' . $entry->getId() . ')"> | 72 | <img class="move_entry_icon" src="assets/save.svg" onclick="editUrl(' . $entry->getId() . ', \'url_content\')"> |
| 70 | </span>'; | 73 | </span>'; |
| 71 | |||
| 72 | // code à recycler pour pouvoir modifier le nom de l'entrée de menu correspondant aux liens | ||
| 73 | /*$this->html .= '<span id="cancel-i' . $entry->getId() . '"> | ||
| 74 | <input type="hidden" name="cancel" value="' . $entry->getId() . '"> | ||
| 75 | <button class="hidden" onclick="cancelUrlEntry(' . $entry->getId() . ')">Annuler</button> | ||
| 76 | </span> | ||
| 77 | <span id="submit-i' . $entry->getId() . '"> | ||
| 78 | <input type="hidden" name="submit" value="' . $entry->getId() . '"> | ||
| 79 | <input type="submit" class="hidden" onclick="submitUrlEntry(' . $entry->getId() . ')"> | ||
| 80 | </span>';*/ | ||
| 81 | } | 74 | } |
| 82 | else{ | 75 | else{ |
| 83 | $this->html .= '<i class="path">' . $entry->getPagePath() . '</i>'; | 76 | $this->html .= '<button>' . $entry->getPageName() . '</button> |
| 77 | <i class="path">' . $entry->getPagePath() . '</i>'; | ||
| 84 | } | 78 | } |
| 85 | 79 | ||
| 86 | if(count($entry->getChildren()) > 0){ | 80 | if(count($entry->getChildren()) > 0){ |
diff --git a/src/view/templates/footer.php b/src/view/templates/footer.php index 4db38ae..0bc85f5 100644 --- a/src/view/templates/footer.php +++ b/src/view/templates/footer.php | |||
| @@ -4,25 +4,21 @@ | |||
| 4 | <div class="data"> | 4 | <div class="data"> |
| 5 | <div class="contact"> | 5 | <div class="contact"> |
| 6 | <div id="footer_name"> | 6 | <div id="footer_name"> |
| 7 | <span id="footer_name_span"><?= htmlspecialchars($name ?? '') ?></span> | 7 | <span id="footer_name_content"><?= htmlspecialchars($name ?? '') ?></span> |
| 8 | <input type="text" id="footer_name_input" class="hidden" value="<?= htmlspecialchars($name ?? '') ?>" size="30"> | 8 | <?= $admin_footer_name ?> |
| 9 | <?= $buttons_footer_name ?> | ||
| 10 | </div> | 9 | </div> |
| 11 | <div id="footer_address"> | 10 | <div id="footer_address"> |
| 12 | <span id="footer_address_span"><?= htmlspecialchars($address ?? '') ?></span> | 11 | <span id="footer_address_content"><?= htmlspecialchars($address ?? '') ?></span> |
| 13 | <input type="text" id="footer_address_input" class="hidden" value="<?= htmlspecialchars($address ?? '') ?>" size="30"> | 12 | <?= $admin_footer_address ?> |
| 14 | <?= $buttons_footer_address ?> | ||
| 15 | </div> | 13 | </div> |
| 16 | <div id="footer_email"> | 14 | <div id="footer_email"> |
| 17 | <a href="mailto:<?= $email ?>"><span id="footer_email_span"><?= htmlspecialchars($email ?? '') ?></span></a> | 15 | <a id="footer_email_content" href="mailto:<?= $email ?>"><?= htmlspecialchars($email ?? '') ?></a> |
| 18 | <input type="text" id="footer_email_input" class="hidden" value="<?= htmlspecialchars($email ?? '') ?>" size="30"> | 16 | <?= $admin_footer_email ?> |
| 19 | <?= $buttons_footer_email ?> | ||
| 20 | </div> | 17 | </div> |
| 21 | </div> | 18 | </div> |
| 22 | <div id="footer_logo"> | 19 | <div id="footer_logo"> |
| 23 | <a href="<?= new URL ?>"><img id="footer_logo_img" src="<?= $footer_logo ?? '' ?>" alt="logo_alt"></a> | 20 | <a href="<?= new URL ?>"><img id="footer_logo_content" src="<?= $footer_logo ?? '' ?>" alt="logo_alt"></a> |
| 24 | <input type="file" id="footer_logo_input" class="hidden" accept="image/png, image/jpeg, image/gif, image/webp, image/tiff"> | 21 | <?= $admin_footer_logo ?> |
| 25 | <?= $buttons_footer_logo ?> | ||
| 26 | </div> | 22 | </div> |
| 27 | <?php if($_SESSION['admin']){ ?> | 23 | <?php if($_SESSION['admin']){ ?> |
| 28 | <script> | 24 | <script> |
diff --git a/src/view/templates/header.php b/src/view/templates/header.php index ac8af7f..9c74f9b 100644 --- a/src/view/templates/header.php +++ b/src/view/templates/header.php | |||
| @@ -5,54 +5,52 @@ | |||
| 5 | <div id="nav_zone"> | 5 | <div id="nav_zone"> |
| 6 | <?= $nav ?> | 6 | <?= $nav ?> |
| 7 | </div> | 7 | </div> |
| 8 | <div class="editing_zone"> | 8 | <div class="header_additional_inputs"> |
| 9 | <div id="head_favicon" style="margin: <?= $editing_zone_margin ?>;"> | 9 | <div id="head_favicon"> |
| 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"> | 10 | <?= $admin_favicon ?> |
| 11 | <?= $buttons_favicon ?> | ||
| 12 | </div> | 11 | </div> |
| 13 | <div id="header_background"> | 12 | <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"> | 13 | <?= $admin_background ?> |
| 15 | <?= $buttons_background ?> | ||
| 16 | </div> | 14 | </div> |
| 17 | </div> | 15 | </div> |
| 18 | <div class="header_content"> | 16 | <div class="header_content"> |
| 19 | <div class="header_left_col"> | 17 | <div class="header_left_col"> |
| 20 | <div id="header_logo"> | 18 | <div id="header_logo"> |
| 21 | <a href="<?= new URL ?>"><img id="header_logo_img" src="<?= $header_logo ?? '' ?>" alt="header_logo"></a> | 19 | <a href="<?= new URL ?>"><img id="header_logo_content" src="<?= $header_logo ?? '' ?>" alt="header_logo"></a> |
| 22 | <input type="file" id="header_logo_input" class="hidden" accept="image/png, image/jpeg, image/gif, image/webp, image/tiff"> | 20 | <?= $admin_header_logo ?> |
| 23 | <?= $buttons_header_logo ?> | ||
| 24 | </div> | 21 | </div> |
| 25 | </div> | 22 | </div> |
| 26 | <div class="nav_button"> | 23 | <div class="nav_button"> |
| 27 | <button>MENU</button> | 24 | <button>MENU</button> |
| 28 | </div> | 25 | </div> |
| 29 | <div class="site_title"> | 26 | <div class="header_center_col"> |
| 30 | <h1 id="header_title"> | 27 | <h1 id="header_title"> |
| 31 | <a href="<?= new URL ?>"><span id="header_title_span"><?= htmlspecialchars($title ?? '') ?></span></a> | 28 | <a id="header_title_content" href="<?= new URL ?>"><?= htmlspecialchars($title ?? '') ?></a> |
| 32 | <input type="text" id="header_title_input" class="hidden" value="<?= htmlspecialchars($title ?? '') ?>" size="30"> | 29 | <?= $admin_header_title ?> |
| 33 | <?= $buttons_header_title ?> | ||
| 34 | </h1> | 30 | </h1> |
| 35 | <h2 id="header_description"> | 31 | <h2 id="header_description"> |
| 36 | <span id="header_description_span"><?= htmlspecialchars($description ?? '') ?></span> | 32 | <span id="header_description_content"><?= htmlspecialchars($description ?? '') ?></span> |
| 37 | <input type="text" id="header_description_input" class="hidden" value="<?= htmlspecialchars($description ?? '') ?>" size="30"> | 33 | <?= $admin_header_description ?> |
| 38 | <?= $buttons_header_description ?> | ||
| 39 | </h2> | 34 | </h2> |
| 40 | </div> | 35 | </div> |
| 41 | <div class="header_right_col"> | 36 | <div class="header_right_col"> |
| 42 | <div class="social"> | 37 | <div id="header_social"> |
| 43 | <?= $social_networks ?> | 38 | <div id="header_social_content"> |
| 44 | <?= $buttons_social_networks ?> | 39 | <?= $social_networks ?> |
| 40 | </div> | ||
| 41 | <?= $admin_social_networks ?> | ||
| 45 | </div> | 42 | </div> |
| 46 | <?= $breadcrumb ?? '' ?> | 43 | <?= $breadcrumb ?? '' ?> |
| 47 | </div> | 44 | </div> |
| 48 | </div> | 45 | </div> |
| 49 | <?php if($_SESSION['admin']){ ?> | 46 | <?php if($_SESSION['admin']){ ?> |
| 50 | <script> | 47 | <script> |
| 51 | let head_favicon = new InputFile('head_favicon'); | 48 | let head_favicon = new InputFileFavicon('head_favicon'); |
| 52 | let header_background = new InputFile('header_background'); | 49 | let header_background = new InputFileHeaderBackground('header_background'); |
| 53 | let header_logo = new InputFile('header_logo'); | 50 | let header_logo = new InputFile('header_logo'); |
| 54 | let header_title = new InputText('header_title'); | 51 | let header_title = new InputText('header_title'); |
| 55 | let header_description = new InputText('header_description'); | 52 | let header_description = new InputText('header_description'); |
| 53 | let header_social = new InputToggler('header_social'); | ||
| 56 | </script> | 54 | </script> |
| 57 | <?php } ?> | 55 | <?php } ?> |
| 58 | </header> \ No newline at end of file | 56 | </header> \ No newline at end of file |
