diff options
| author | polo <ordipolo@gmx.fr> | 2025-09-29 20:20:26 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-09-29 20:20:26 +0200 |
| commit | 23fe455ead832c97fdabafca78393e21a18086bf (patch) | |
| tree | f49603ceff42972ee3f3dae88050c2da586f2759 | |
| parent | 58d2a7f5f0b8fbb93730ad2332fa484bbfc80d4c (diff) | |
| download | cms-23fe455ead832c97fdabafca78393e21a18086bf.tar.gz cms-23fe455ead832c97fdabafca78393e21a18086bf.tar.bz2 cms-23fe455ead832c97fdabafca78393e21a18086bf.zip | |
présentation mosaïque
| -rw-r--r-- | public/css/body.css | 26 | ||||
| -rw-r--r-- | src/model/Blocks.php | 8 | ||||
| -rw-r--r-- | src/view/AbstractBuilder.php | 4 | ||||
| -rw-r--r-- | src/view/NewBuilder.php | 2 | ||||
| -rw-r--r-- | src/view/templates/modify_page.php | 4 | ||||
| -rw-r--r-- | src/view/templates/new.php | 10 | ||||
| -rw-r--r-- | 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 | |||
| 67 | display: grid; /* et c'est tout */ | 67 | display: grid; /* et c'est tout */ |
| 68 | /* la règle grid-template-columns est ajoutée dynamiquement par PHP ou JS*/ | 68 | /* la règle grid-template-columns est ajoutée dynamiquement par PHP ou JS*/ |
| 69 | } | 69 | } |
| 70 | .galery_photos | 70 | .mosaic > .section_child |
| 71 | { | 71 | { |
| 72 | display: flex; | 72 | display: flex; |
| 73 | flex-wrap: wrap; | 73 | flex-wrap: wrap; |
| 74 | justify-content: space-evenly; | 74 | justify-content: space-evenly; |
| 75 | } | 75 | } |
| 76 | .galery_photos .html_from_editor img | 76 | .mosaic > .section_child article |
| 77 | { | 77 | { |
| 78 | max-width: 300px; | 78 | max-width: 300px; |
| 79 | max-height: 200px; | 79 | } |
| 80 | .mosaic > .section_child img /* règle ciblant un élément généré par l'éditeur */ | ||
| 81 | { | ||
| 82 | /*max-width: 300px;*/ | ||
| 83 | max-height: 300px; | ||
| 80 | object-fit: contain; | 84 | object-fit: contain; |
| 81 | } | 85 | } |
| 82 | article | 86 | article |
| 83 | { | 87 | { |
| 84 | /*display: flex;*/ | ||
| 85 | background-color: white; | 88 | background-color: white; |
| 86 | margin: 15px; | 89 | margin: 15px; |
| 87 | padding: 0 15px; | 90 | padding: 15px; |
| 88 | /*min-height: 150px;*/ | 91 | /*min-height: 150px;*/ |
| 89 | } | 92 | } |
| 90 | article .logo2 | 93 | article .logo2 |
| @@ -94,14 +97,10 @@ article .logo2 | |||
| 94 | max-height: 200px; | 97 | max-height: 200px; |
| 95 | margin-right: 15px; | 98 | margin-right: 15px; |
| 96 | } | 99 | } |
| 97 | .new_content, .article_content | 100 | .overflow_hidden div |
| 98 | { | 101 | { |
| 99 | width: 100%; | ||
| 100 | } | ||
| 101 | .new_content | ||
| 102 | { | ||
| 103 | /*max-height: 400;*/ | ||
| 104 | overflow: hidden; | 102 | overflow: hidden; |
| 103 | max-height: 500px; | ||
| 105 | } | 104 | } |
| 106 | .new_content button | 105 | .new_content button |
| 107 | { | 106 | { |
| @@ -149,10 +148,6 @@ button .action_icon:hover | |||
| 149 | { | 148 | { |
| 150 | float: right; | 149 | float: right; |
| 151 | } | 150 | } |
| 152 | .article_title_zone | ||
| 153 | { | ||
| 154 | padding: 10px; | ||
| 155 | } | ||
| 156 | .under_an_article | 151 | .under_an_article |
| 157 | { | 152 | { |
| 158 | display: flex; | 153 | display: flex; |
| @@ -169,6 +164,7 @@ button .action_icon:hover | |||
| 169 | { | 164 | { |
| 170 | display: flex; | 165 | display: flex; |
| 171 | justify-content: end; | 166 | justify-content: end; |
| 167 | min-width: 100px; /* intéragit avec la règle float sur le bouton "share" */ | ||
| 172 | } | 168 | } |
| 173 | .delete_button | 169 | .delete_button |
| 174 | { | 170 | { |
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 @@ | |||
| 2 | // src/model/Blocks.php | 2 | // src/model/Blocks.php |
| 3 | 3 | ||
| 4 | class Blocks{ | 4 | class Blocks{ |
| 5 | static public array $blocks = ['post_block' => 'Articles libres', 'news_block' => 'Actualités', 'galery' => 'Galerie', 'calendar' => 'Calendrier', 'form' => 'Formulaire']; | 5 | static public array $blocks = ['post_block' => 'Articles libres', 'news_block' => 'Actualités', |
| 6 | static public array $presentations = ['fullwidth' => 'Pleine largeur', 'grid' => 'Grille', 'mosaic' => 'Mosaïque', 'carousel' => 'Carrousel']; | 6 | //'galery' => 'Galerie', |
| 7 | 'calendar' => 'Calendrier', 'form' => 'Formulaire']; | ||
| 8 | static public array $presentations = ['fullwidth' => 'Pleine largeur', 'grid' => 'Grille', 'mosaic' => 'Mosaïque' | ||
| 9 | //, 'carousel' => 'Carrousel' | ||
| 10 | ]; | ||
| 7 | } \ No newline at end of file | 11 | } \ 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 | |||
| 49 | return str_replace('_', '', ucwords($input, '_')); | 49 | return str_replace('_', '', ucwords($input, '_')); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | public function render(): string // = getHTML() | 52 | protected function render(): string // = getHTML() |
| 53 | { | 53 | { |
| 54 | return $this->html; | 54 | return $this->html; |
| 55 | } | 55 | } |
| 56 | public function addHTML(string $html): void | 56 | protected function addHTML(string $html): void |
| 57 | { | 57 | { |
| 58 | $this->html .= $html; | 58 | $this->html .= $html; |
| 59 | } | 59 | } |
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 | |||
| 56 | if(Director::$page_path->getLast()->getEndOfPath() === 'article'){ | 56 | if(Director::$page_path->getLast()->getEndOfPath() === 'article'){ |
| 57 | $content = $node->getArticle()->getContent(); | 57 | $content = $node->getArticle()->getContent(); |
| 58 | $from_to_button = '<p><a class="link_to_article" href="' . new URL(isset($_GET['from']) ? ['page' => $_GET['from']] : []) . '"><button>Retour</button></a></p>'; | 58 | $from_to_button = '<p><a class="link_to_article" href="' . new URL(isset($_GET['from']) ? ['page' => $_GET['from']] : []) . '"><button>Retour</button></a></p>'; |
| 59 | $overflow = ''; | ||
| 59 | } | 60 | } |
| 60 | else{ | 61 | else{ |
| 61 | $from_to_button = '<p><a class="link_to_article" href="' . new URL(['page' => 'article', 'id' => $id, 'from' => CURRENT_PAGE]) . '"><button><img class="action_icon" src="assets/book-open.svg">Lire la suite</button></a></p>'; | 62 | $from_to_button = '<p><a class="link_to_article" href="' . new URL(['page' => 'article', 'id' => $id, 'from' => CURRENT_PAGE]) . '"><button><img class="action_icon" src="assets/book-open.svg">Lire la suite</button></a></p>'; |
| 63 | $overflow = ' overflow_hidden'; | ||
| 62 | } | 64 | } |
| 63 | 65 | ||
| 64 | $date = $node->getArticle()->getDateTime()->format('Y-m-d\TH:i:s.v\Z'); // format: 2025-07-17T13:54:00.000Z | 66 | $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 @@ | |||
| 46 | </form> | 46 | </form> |
| 47 | <div class="explanations"> | 47 | <div class="explanations"> |
| 48 | <p><b>Articles libres</b>: textes riches générés par l'éditeur et librement positionnables</p> | 48 | <p><b>Articles libres</b>: textes riches générés par l'éditeur et librement positionnables</p> |
| 49 | <p><b>Actualilés</b>: contenus structurés avec titre, aperçu, date et possédant une page dédiée</p> | 49 | <p><b>Actualités</b>: contenus structurés avec titre, aperçu, date et possédant une page dédiée</p> |
| 50 | <p><b>Galerie</b>: photos parcourables en mode plein écran (cette fonctionalité n'est pas encore disponible)</p> | 50 | <!-- <p><b>Galerie</b>: photos parcourables en mode plein écran (cette fonctionalité n'est pas encore disponible)</p> --> |
| 51 | </div> | 51 | </div> |
| 52 | </div> | 52 | </div> |
| 53 | <div class="modify_block"> | 53 | <div class="modify_block"> |
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 @@ | |||
| 1 | <?php declare(strict_types=1); ?> | 1 | <?php declare(strict_types=1); ?> |
| 2 | <article> | 2 | <article> |
| 3 | <div class="new_content" id="<?= $id ?>"> | 3 | <div class="new_content <?= $overflow ?>" id="<?= $id ?>"> |
| 4 | <div class="article_title_zone"> | 4 | <div class="data" id="<?= $id_title ?>"> |
| 5 | <div class="data" id="<?= $id_title ?>"> | 5 | <?= $title ?> |
| 6 | <?= $title ?> | ||
| 7 | </div> | ||
| 8 | <?= $title_buttons ?> | ||
| 9 | </div> | 6 | </div> |
| 7 | <?= $title_buttons ?> | ||
| 10 | <div class="data new_content_text" id="<?= $id_preview ?>"> | 8 | <div class="data new_content_text" id="<?= $id_preview ?>"> |
| 11 | <?= $preview ?> | 9 | <?= $preview ?> |
| 12 | </div> | 10 | </div> |
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 @@ | |||
| 1 | <?php declare(strict_types=1); ?> | 1 | <?php declare(strict_types=1); ?> |
| 2 | <article> | 2 | <article> |
| 3 | <div class="article_content"> | 3 | <div class="post_content"> |
| 4 | <div class="article_title_zone"> | 4 | <div class="article_title_zone"> |
| 5 | <?= $share_button ?> | 5 | <?= $share_button ?> |
| 6 | </div> | 6 | </div> |
| 7 | <div id="<?= $id ?>" class="html_from_editor"> | 7 | <div id="<?= $id ?>"> |
| 8 | <?= $html ?> | 8 | <?= $html ?> |
| 9 | </div> | 9 | </div> |
| 10 | <div class="article_admin_zone"> | 10 | <div class="article_admin_zone"> |
