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 /src | |
| parent | 58d2a7f5f0b8fbb93730ad2332fa484bbfc80d4c (diff) | |
| download | cms-23fe455ead832c97fdabafca78393e21a18086bf.tar.gz cms-23fe455ead832c97fdabafca78393e21a18086bf.tar.bz2 cms-23fe455ead832c97fdabafca78393e21a18086bf.zip | |
présentation mosaïque
Diffstat (limited to 'src')
| -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 |
6 files changed, 18 insertions, 14 deletions
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"> |
