diff options
Diffstat (limited to 'src/view/templates')
| -rw-r--r-- | src/view/templates/footer.php | 19 | ||||
| -rw-r--r-- | src/view/templates/head.php | 4 | ||||
| -rw-r--r-- | src/view/templates/header.php | 34 |
3 files changed, 40 insertions, 17 deletions
diff --git a/src/view/templates/footer.php b/src/view/templates/footer.php index 986bbdc..4db38ae 100644 --- a/src/view/templates/footer.php +++ b/src/view/templates/footer.php | |||
| @@ -4,25 +4,34 @@ | |||
| 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 | <script>let footer_name = new InputText('footer_name');</script> | ||
| 8 | <span id="footer_name_span"><?= htmlspecialchars($name ?? '') ?></span> | 7 | <span id="footer_name_span"><?= htmlspecialchars($name ?? '') ?></span> |
| 9 | <input type="text" id="footer_name_input" class="hidden" value="<?= htmlspecialchars($name ?? '') ?>" size="30"> | 8 | <input type="text" id="footer_name_input" class="hidden" value="<?= htmlspecialchars($name ?? '') ?>" size="30"> |
| 10 | <?= $buttons_footer_name ?> | 9 | <?= $buttons_footer_name ?> |
| 11 | </div> | 10 | </div> |
| 12 | <div id="footer_address"> | 11 | <div id="footer_address"> |
| 13 | <script>let footer_address = new InputText('footer_address');</script> | ||
| 14 | <span id="footer_address_span"><?= htmlspecialchars($address ?? '') ?></span> | 12 | <span id="footer_address_span"><?= htmlspecialchars($address ?? '') ?></span> |
| 15 | <input type="text" id="footer_address_input" class="hidden" value="<?= htmlspecialchars($address ?? '') ?>" size="30"> | 13 | <input type="text" id="footer_address_input" class="hidden" value="<?= htmlspecialchars($address ?? '') ?>" size="30"> |
| 16 | <?= $buttons_footer_address ?> | 14 | <?= $buttons_footer_address ?> |
| 17 | </div> | 15 | </div> |
| 18 | <div id="footer_email"> | 16 | <div id="footer_email"> |
| 19 | <script>let footer_email = new InputText('footer_email');</script> | 17 | <a href="mailto:<?= $email ?>"><span id="footer_email_span"><?= htmlspecialchars($email ?? '') ?></span></a> |
| 20 | <a href="mailto:<?= $e_mail ?>"><span id="footer_email_span"><?= htmlspecialchars($email ?? '') ?></span></a> | ||
| 21 | <input type="text" id="footer_email_input" class="hidden" value="<?= htmlspecialchars($email ?? '') ?>" size="30"> | 18 | <input type="text" id="footer_email_input" class="hidden" value="<?= htmlspecialchars($email ?? '') ?>" size="30"> |
| 22 | <?= $buttons_footer_email ?> | 19 | <?= $buttons_footer_email ?> |
| 23 | </div> | 20 | </div> |
| 24 | </div> | 21 | </div> |
| 25 | <p class="footer_logo"><img src="<?= $footer_logo ?>" alt="logo"></p> | 22 | <div id="footer_logo"> |
| 23 | <a href="<?= new URL ?>"><img id="footer_logo_img" 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"> | ||
| 25 | <?= $buttons_footer_logo ?> | ||
| 26 | </div> | ||
| 27 | <?php if($_SESSION['admin']){ ?> | ||
| 28 | <script> | ||
| 29 | let footer_name = new InputText('footer_name'); | ||
| 30 | let footer_address = new InputText('footer_address'); | ||
| 31 | let footer_email = new InputText('footer_email'); | ||
| 32 | let footer_logo = new InputFile('footer_logo'); | ||
| 33 | </script> | ||
| 34 | <?php } ?> | ||
| 26 | </div> | 35 | </div> |
| 27 | <div class="<?= $empty_admin_zone ?>"></div> | 36 | <div class="<?= $empty_admin_zone ?>"></div> |
| 28 | <div class="<?= $div_admin ?>"> | 37 | <div class="<?= $div_admin ?>"> |
diff --git a/src/view/templates/head.php b/src/view/templates/head.php index 83a0e7c..bce0a19 100644 --- a/src/view/templates/head.php +++ b/src/view/templates/head.php | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | <!DOCTYPE html> | 2 | <!DOCTYPE html> |
| 3 | <html lang="fr"> | 3 | <html lang="fr"> |
| 4 | <head> | 4 | <head> |
| 5 | <script>window.Config = {page: "<?= CURRENT_PAGE ?>", favicon: "<?= $favicon ?>"};</script> | ||
| 5 | <meta charset="utf-8"> | 6 | <meta charset="utf-8"> |
| 6 | <title><?= $title ?></title> | 7 | <title><?= $title ?></title> |
| 7 | <link rel="icon" type="image/png" href="<?= $favicon ?>" alt="<?= $alt ?>"> | 8 | <link rel="icon" type="<?= $favicon_type ?>" href="<?= $favicon ?>"> |
| 8 | <meta name="description" content="<?= $description ?>"> | 9 | <meta name="description" content="<?= $description ?>"> |
| 9 | <meta name="viewport" content="width=device-width"> | 10 | <meta name="viewport" content="width=device-width"> |
| 10 | <script>window.Config = {page: "<?= CURRENT_PAGE ?>"};</script> | ||
| 11 | <?= $css ?> | 11 | <?= $css ?> |
| 12 | <?= $js ?> | 12 | <?= $js ?> |
| 13 | </head> \ No newline at end of file | 13 | </head> \ No newline at end of file |
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 |
