Browse Source

add btn more

chloe 4 years ago
parent
commit
c8b91521ad

+ 1 - 1
web/app/themes/la_mine/accueil.php

@@ -13,4 +13,4 @@ $args = 'post_type=post&numberposts=3&orderby=date';
 
 $context['posts'] = Timber::get_posts( $args );
 
-Timber::render(['accueil.twig'], $context);
+Timber::render('accueil.twig', $context);

+ 1 - 3
web/app/themes/la_mine/agenda.php

@@ -2,8 +2,6 @@
 /**
  * template name: agenda
  */
-
-
 $context = Timber::context();
 $timber_post     = new Timber\Post();
 
@@ -13,4 +11,4 @@ $args = array(
 
 $context['posts'] = Timber::get_posts( $args );
 
-Timber::render( ['agenda.twig'] , $context );
+Timber::render('agenda.twig', $context );

+ 1 - 1
web/app/themes/la_mine/page.php

@@ -25,4 +25,4 @@ $context = Timber::context();
 
 $timber_post     = new Timber\Post();
 $context['post'] = $timber_post;
-Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'page.twig' ), $context );
+Timber::render( array( 'page.twig' ), $context );

+ 1 - 1
web/app/themes/la_mine/templates/agenda.twig

@@ -2,9 +2,9 @@
 
 {% block content %}
 	<section>
-		page agenda
 		<div>
 		{% for item in posts %}
+		page agenda 
 			{% include 'components/thumbnails/thumbnails.twig'%}
 		{% endfor %}
 		</div>

+ 1 - 1
web/app/themes/la_mine/templates/components/buttons/bouton_ensavoir.html.twig

@@ -1,5 +1,5 @@
   <div id="bouton_en_savoir">
-{% if name_template == accueil %}
+{% if button == 'true' %}
 <a href="{{post.meta('bouton_en_savoir').lien_bouton_en_savoir}}">{{post.meta('bouton_en_savoir').texte_bouton_en_savoir}}</a>
 {% else %}
     <div id="bouton_en_savoir">

+ 4 - 1
web/app/themes/la_mine/templates/components/thumbnails/thumbnails.twig

@@ -22,9 +22,12 @@
       <div class="lieu">{{item.lieu}}</div>
     </div>
   </div>
+  <div class="btn __more">
+    <a href="{{site.url}}/{{item.slug}}">En savoir plus</a>
+  </div>
 
   <div id="btn redirection_page">
-    {% include 'components/buttons/bouton_ensavoir.html.twig'with { name__template : 'accueil' } %}
+    {% include 'components/buttons/bouton_ensavoir.html.twig' with { buttons : 'true' } %}
   </div>
 
 </div>

+ 0 - 1
web/app/themes/la_mine/templates/footer.twig

@@ -1,2 +1 @@
-{{ dump(options) }}
 <h3>{{ site_options }}</h3>