diff options
Diffstat (limited to 'src/view/PostBlockBuilder.php')
-rw-r--r-- | src/view/PostBlockBuilder.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/view/PostBlockBuilder.php b/src/view/PostBlockBuilder.php index 6ec91f7..8ad0498 100644 --- a/src/view/PostBlockBuilder.php +++ b/src/view/PostBlockBuilder.php | |||
@@ -21,11 +21,12 @@ class PostBlockBuilder extends AbstractBuilder | |||
21 | extract($node->getNodeData()->getData()); | 21 | extract($node->getNodeData()->getData()); |
22 | } | 22 | } |
23 | 23 | ||
24 | $presentation = $node->getNodeData()->getPresentation()->getName(); // affichage list ou grid | 24 | // stratégie d'affichage du contenu (utilisation de méthodes ou de classe List, GridPresentation, etc) |
25 | 25 | $section_class = $node->getNodeData()->getPresentation()->getName(); // = list, grid , mosaic ou carousel | |
26 | // exécution de la stratégie (utilisation de méthodes ou de classe List, Grid, CarouselPresentation) | 26 | if($section_class === 'grid'){ |
27 | $section_class = $presentation; | 27 | $min_width = (string)$node->getNodeData()->getColsMinWidth(); |
28 | $section_child_class = $presentation === 'grid' ? 'grid_columns' : ''; | 28 | $cols_min_width = 'grid-template-columns: repeat(auto-fit, minmax(' . $min_width . 'px, 1fr));'; |
29 | } | ||
29 | 30 | ||
30 | // ajouter un article | 31 | // ajouter un article |
31 | $new_article = ''; | 32 | $new_article = ''; |