diff options
author | polo <ordipolo@gmx.fr> | 2025-07-18 15:57:57 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2025-07-18 15:57:57 +0200 |
commit | b55a029a5b4867349a172873d20a6ffd91c20e23 (patch) | |
tree | 724b89251f8efbedbe6e06411546fab01e948d53 /src | |
parent | 27d88f0b226a0bb8e07f0bea83f47a9bc4bbff32 (diff) | |
download | cms-b55a029a5b4867349a172873d20a6ffd91c20e23.zip |
petites améliorations smartphones, logo et fond de header et footer gérés dans NodeData
Diffstat (limited to 'src')
-rw-r--r-- | src/controller/installation.php | 12 | ||||
-rw-r--r-- | src/view/HeaderBuilder.php | 14 | ||||
-rw-r--r-- | src/view/templates/footer.php | 2 | ||||
-rw-r--r-- | src/view/templates/header.php | 7 |
4 files changed, 21 insertions, 14 deletions
diff --git a/src/controller/installation.php b/src/controller/installation.php index 5cfae45..acb87f1 100644 --- a/src/controller/installation.php +++ b/src/controller/installation.php | |||
@@ -115,22 +115,22 @@ function makeStartPage(EntityManager $entityManager){ | |||
115 | /* -- table image -- */ | 115 | /* -- table image -- */ |
116 | // paramètres: file_name, file_path, file_path_mini, mime_type, alt | 116 | // paramètres: file_name, file_path, file_path_mini, mime_type, alt |
117 | $favicon = new Image("favicon48x48.png", NULL, "assets/favicon48x48.png", "image/png", "favicon"); | 117 | $favicon = new Image("favicon48x48.png", NULL, "assets/favicon48x48.png", "image/png", "favicon"); |
118 | $logo = new Image("logo-nb-et-ffn.png", NULL, "assets/logo-nb-et-ffn.png", "image/png", "head_logo"); | ||
119 | $facebook = new Image("facebook.svg", NULL, "assets/facebook.svg", "image/svg+xml", "facebook"); | 118 | $facebook = new Image("facebook.svg", NULL, "assets/facebook.svg", "image/svg+xml", "facebook"); |
120 | $instagram = new Image("instagram.svg", NULL, "assets/instagram.svg", "image/svg+xml", "instagram"); | 119 | $instagram = new Image("instagram.svg", NULL, "assets/instagram.svg", "image/svg+xml", "instagram"); |
121 | $linkedin = new Image("linkedin.svg", NULL, "assets/linkedin.svg", "image/svg+xml", "linkedin"); | 120 | $linkedin = new Image("linkedin.svg", NULL, "assets/linkedin.svg", "image/svg+xml", "linkedin"); |
122 | $github = new Image("github.svg", NULL, "assets/github.svg", "image/svg+xml", "github"); | 121 | $github = new Image("github.svg", NULL, "assets/github.svg", "image/svg+xml", "github"); |
123 | $fond_piscine = new Image("fond-piscine.jpg", "assets/fond-piscine.jpg", NULL, "images/jpg", "fond-piscine"); | ||
124 | 122 | ||
125 | /* -- table node_data -- */ | 123 | /* -- table node_data -- */ |
126 | // paramètres: data, node, images | 124 | // paramètres: data, node, images |
127 | $head_accueil_data = new NodeData(["description" => "Club, École de natation et Perfectionnement"], $head_accueil, new ArrayCollection([$favicon])); | 125 | $head_accueil_data = new NodeData(["description" => "page d'accueil"], $head_accueil, new ArrayCollection([$favicon])); |
128 | $head_login_data = new NodeData(["description" => "Connexion"], $head_login, new ArrayCollection([$favicon])); | 126 | $head_login_data = new NodeData(["description" => "Connexion"], $head_login, new ArrayCollection([$favicon])); |
129 | $head_article_data = new NodeData(["description" => ""], $head_article, new ArrayCollection([$favicon])); | 127 | $head_article_data = new NodeData(["description" => ""], $head_article, new ArrayCollection([$favicon])); |
130 | $head_edit_menu_data = new NodeData(["description" => "Menu et chemins"], $head_edit_menu, new ArrayCollection([$favicon])); | 128 | $head_edit_menu_data = new NodeData(["description" => "Menu et chemins"], $head_edit_menu, new ArrayCollection([$favicon])); |
131 | $head_new_page_data = new NodeData(["description" => "Nouvelle page"], $head_new_page, new ArrayCollection([$favicon])); | 129 | $head_new_page_data = new NodeData(["description" => "Nouvelle page"], $head_new_page, new ArrayCollection([$favicon])); |
132 | $header_data = new NodeData(["title" => "Les Nageurs Bigoudens", "description" => "Club, École de natation et Perfectionnement", "social" => ["facebook_link" => "https://www.facebook.com/nageursbigoudens29120", "instagram_link" => "https://www.instagram.com/nageursbigoudens/"]], $header, new ArrayCollection([$logo, $facebook, $instagram, $linkedin, $github, $fond_piscine])); | 130 | $header_data = new NodeData(["title" => "Titre", "description" => "Sous-titre", "header_logo" => "assets/logo-nb-et-ffn.png", "header_background" => "assets/fond-piscine.jpg", |
133 | $footer_data = new NodeData(["adresse" => "17, rue Raymonde Folgoas Guillou, 29120 Pont-l’Abbé", "contact_nom" => "Les Nageurs Bigoudens", "e_mail" => "nb.secretariat@orange.fr", "logo_footer" => "assets/logo-nb-et-ffn.png"], $footer); | 131 | "social" => ["facebook" => "https://www.facebook.com", "instagram" => "https://www.instagram.com", "linkedin" => "https://www.linkedin.com"]], |
132 | $header, new ArrayCollection([$facebook, $instagram, $linkedin, $github])); | ||
133 | $footer_data = new NodeData(["contact_nom" => "Nom", "adresse" => "adresse", "e_mail" => "e-mail", "footer_logo" => "assets/logo-nb-et-ffn.png"], $footer); | ||
134 | 134 | ||
135 | /* -- table page -- */ | 135 | /* -- table page -- */ |
136 | $entityManager->persist($accueil); | 136 | $entityManager->persist($accueil); |
@@ -157,12 +157,10 @@ function makeStartPage(EntityManager $entityManager){ | |||
157 | 157 | ||
158 | /* -- table image -- */ | 158 | /* -- table image -- */ |
159 | $entityManager->persist($favicon); | 159 | $entityManager->persist($favicon); |
160 | $entityManager->persist($logo); | ||
161 | $entityManager->persist($facebook); | 160 | $entityManager->persist($facebook); |
162 | $entityManager->persist($instagram); | 161 | $entityManager->persist($instagram); |
163 | $entityManager->persist($linkedin); | 162 | $entityManager->persist($linkedin); |
164 | $entityManager->persist($github); | 163 | $entityManager->persist($github); |
165 | $entityManager->persist($fond_piscine); | ||
166 | 164 | ||
167 | /* -- table node_data -- */ | 165 | /* -- table node_data -- */ |
168 | $entityManager->persist($head_accueil_data); | 166 | $entityManager->persist($head_accueil_data); |
diff --git a/src/view/HeaderBuilder.php b/src/view/HeaderBuilder.php index b49b24c..87dc2f2 100644 --- a/src/view/HeaderBuilder.php +++ b/src/view/HeaderBuilder.php | |||
@@ -55,16 +55,22 @@ class HeaderBuilder extends AbstractBuilder | |||
55 | { | 55 | { |
56 | for($i = 0; $i < count($keys); $i++) | 56 | for($i = 0; $i < count($keys); $i++) |
57 | { | 57 | { |
58 | // réseaux sociaux | ||
58 | if(str_contains($image->getFileName(), $keys[$i])){ | 59 | if(str_contains($image->getFileName(), $keys[$i])){ |
59 | $social_networks .= '<a href="' . $social[$keys[$i]] . '" target="_blank" rel="noopener noreferrer"> | 60 | $social_networks .= '<a href="' . $social[$keys[$i]] . '" target="_blank" rel="noopener noreferrer"> |
60 | <img src="' . rtrim($image->getFilePathMini(), '/') . '" alt="' . $keys[$i] . '_alt"></a>'; | 61 | <img src="' . rtrim($image->getFilePathMini(), '/') . '" alt="' . $keys[$i] . '_alt"></a>'; |
61 | break; | 62 | break; |
62 | } | 63 | } |
63 | if(str_contains($image->getFileName(), 'logo')) | 64 | // logo en-tête |
64 | { | 65 | /*if(str_contains($image->getFileName(), 'header_logo')){ |
65 | $logo = rtrim($image->getFilePathMini(), '/'); | 66 | $header_logo = rtrim($image->getFilePathMini(), '/'); |
66 | break; | 67 | break; |
67 | } | 68 | }*/ |
69 | // image de fond | ||
70 | /*if(str_contains($image->getFileName(), 'header_background')){ | ||
71 | $header_background = rtrim($image->getFilePath(), '/'); | ||
72 | break; | ||
73 | }*/ | ||
68 | } | 74 | } |
69 | } | 75 | } |
70 | 76 | ||
diff --git a/src/view/templates/footer.php b/src/view/templates/footer.php index 8f6d465..1b63edf 100644 --- a/src/view/templates/footer.php +++ b/src/view/templates/footer.php | |||
@@ -5,7 +5,7 @@ | |||
5 | <p class="contact"><?= $contact_nom ?><br> | 5 | <p class="contact"><?= $contact_nom ?><br> |
6 | <?= $adresse ?><br> | 6 | <?= $adresse ?><br> |
7 | <a href="mailto:<?= $e_mail ?>"><?= $e_mail ?></a></p> | 7 | <a href="mailto:<?= $e_mail ?>"><?= $e_mail ?></a></p> |
8 | <p class="footer_logo"><img src="<?= $logo_footer ?>" alt="logo"><p> | 8 | <p class="footer_logo"><img src="<?= $footer_logo ?>" alt="logo"><p> |
9 | </div> | 9 | </div> |
10 | <div class="<?= $empty_admin_zone ?>"></div> | 10 | <div class="<?= $empty_admin_zone ?>"></div> |
11 | <div class="<?= $div_admin ?>"> | 11 | <div class="<?= $div_admin ?>"> |
diff --git a/src/view/templates/header.php b/src/view/templates/header.php index a749f45..b1215c5 100644 --- a/src/view/templates/header.php +++ b/src/view/templates/header.php | |||
@@ -1,14 +1,17 @@ | |||
1 | <?php declare(strict_types=1); ?> | 1 | <?php declare(strict_types=1); ?> |
2 | <body> | 2 | <body> |
3 | <div> | 3 | <div> |
4 | <header> | 4 | <header style="background-image: url('<?= $header_background ?>');"> |
5 | <div id="nav_zone"> | 5 | <div id="nav_zone"> |
6 | <?= $nav ?> | 6 | <?= $nav ?> |
7 | </div> | 7 | </div> |
8 | 8 | ||
9 | <div class="header-content"> | 9 | <div class="header-content"> |
10 | <div class="head_logo"> | 10 | <div class="head_logo"> |
11 | <a href="<?= new URL ?>"><img src="<?= $logo ?>" alt="logo_alt"></a> | 11 | <a href="<?= new URL ?>"><img src="<?= $header_logo ?>" alt="logo_alt"></a> |
12 | </div> | ||
13 | <div class="nav_button"> | ||
14 | <button>MENU</button> | ||
12 | </div> | 15 | </div> |
13 | <div class="site_title"> | 16 | <div class="site_title"> |
14 | <a href="<?= new URL ?>"><h1><?= $title ?></h1></a> | 17 | <a href="<?= new URL ?>"><h1><?= $title ?></h1></a> |