From 23fe455ead832c97fdabafca78393e21a18086bf Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 29 Sep 2025 20:20:26 +0200 Subject: =?UTF-8?q?pr=C3=A9sentation=20mosa=C3=AFque?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/body.css | 26 +++++++++++--------------- src/model/Blocks.php | 8 ++++++-- src/view/AbstractBuilder.php | 4 ++-- src/view/NewBuilder.php | 2 ++ src/view/templates/modify_page.php | 4 ++-- src/view/templates/new.php | 10 ++++------ src/view/templates/post.php | 4 ++-- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/public/css/body.css b/public/css/body.css index f8e4f81..140655b 100644 --- a/public/css/body.css +++ b/public/css/body.css @@ -67,24 +67,27 @@ section > h3 display: grid; /* et c'est tout */ /* la règle grid-template-columns est ajoutée dynamiquement par PHP ou JS*/ } -.galery_photos +.mosaic > .section_child { display: flex; flex-wrap: wrap; justify-content: space-evenly; } -.galery_photos .html_from_editor img +.mosaic > .section_child article { max-width: 300px; - max-height: 200px; +} +.mosaic > .section_child img /* règle ciblant un élément généré par l'éditeur */ +{ + /*max-width: 300px;*/ + max-height: 300px; object-fit: contain; } article { - /*display: flex;*/ background-color: white; margin: 15px; - padding: 0 15px; + padding: 15px; /*min-height: 150px;*/ } article .logo2 @@ -94,14 +97,10 @@ article .logo2 max-height: 200px; margin-right: 15px; } -.new_content, .article_content +.overflow_hidden div { - width: 100%; -} -.new_content -{ - /*max-height: 400;*/ overflow: hidden; + max-height: 500px; } .new_content button { @@ -149,10 +148,6 @@ button .action_icon:hover { float: right; } -.article_title_zone -{ - padding: 10px; -} .under_an_article { display: flex; @@ -169,6 +164,7 @@ button .action_icon:hover { display: flex; justify-content: end; + min-width: 100px; /* intéragit avec la règle float sur le bouton "share" */ } .delete_button { diff --git a/src/model/Blocks.php b/src/model/Blocks.php index 53268db..21e3c18 100644 --- a/src/model/Blocks.php +++ b/src/model/Blocks.php @@ -2,6 +2,10 @@ // src/model/Blocks.php class Blocks{ - static public array $blocks = ['post_block' => 'Articles libres', 'news_block' => 'Actualités', 'galery' => 'Galerie', 'calendar' => 'Calendrier', 'form' => 'Formulaire']; - static public array $presentations = ['fullwidth' => 'Pleine largeur', 'grid' => 'Grille', 'mosaic' => 'Mosaïque', 'carousel' => 'Carrousel']; + static public array $blocks = ['post_block' => 'Articles libres', 'news_block' => 'Actualités', + //'galery' => 'Galerie', + 'calendar' => 'Calendrier', 'form' => 'Formulaire']; + static public array $presentations = ['fullwidth' => 'Pleine largeur', 'grid' => 'Grille', 'mosaic' => 'Mosaïque' + //, 'carousel' => 'Carrousel' + ]; } \ No newline at end of file diff --git a/src/view/AbstractBuilder.php b/src/view/AbstractBuilder.php index 76c51ed..7b53010 100644 --- a/src/view/AbstractBuilder.php +++ b/src/view/AbstractBuilder.php @@ -49,11 +49,11 @@ abstract class AbstractBuilder return str_replace('_', '', ucwords($input, '_')); } - public function render(): string // = getHTML() + protected function render(): string // = getHTML() { return $this->html; } - public function addHTML(string $html): void + protected function addHTML(string $html): void { $this->html .= $html; } diff --git a/src/view/NewBuilder.php b/src/view/NewBuilder.php index 2a082dd..83dd728 100644 --- a/src/view/NewBuilder.php +++ b/src/view/NewBuilder.php @@ -56,9 +56,11 @@ class NewBuilder extends AbstractBuilder if(Director::$page_path->getLast()->getEndOfPath() === 'article'){ $content = $node->getArticle()->getContent(); $from_to_button = '

'; + $overflow = ''; } else{ $from_to_button = '

'; + $overflow = ' overflow_hidden'; } $date = $node->getArticle()->getDateTime()->format('Y-m-d\TH:i:s.v\Z'); // format: 2025-07-17T13:54:00.000Z diff --git a/src/view/templates/modify_page.php b/src/view/templates/modify_page.php index fbcbf20..b799df2 100644 --- a/src/view/templates/modify_page.php +++ b/src/view/templates/modify_page.php @@ -46,8 +46,8 @@

Articles libres: textes riches générés par l'éditeur et librement positionnables

-

Actualilés: contenus structurés avec titre, aperçu, date et possédant une page dédiée

-

Galerie: photos parcourables en mode plein écran (cette fonctionalité n'est pas encore disponible)

+

Actualités: contenus structurés avec titre, aperçu, date et possédant une page dédiée

+
diff --git a/src/view/templates/new.php b/src/view/templates/new.php index b1b3453..30b244f 100644 --- a/src/view/templates/new.php +++ b/src/view/templates/new.php @@ -1,12 +1,10 @@
-
-
-
- -
- +
+
+
+
diff --git a/src/view/templates/post.php b/src/view/templates/post.php index 5cf35c2..d0d01b2 100644 --- a/src/view/templates/post.php +++ b/src/view/templates/post.php @@ -1,10 +1,10 @@
-
+
-
+
-- cgit v1.2.3