Browse Source

création twig de la page projet, privatiser, accueil et asso

chloe 4 năm trước cách đây
mục cha
commit
234ab9f041

+ 15 - 6
web/app/themes/la_mine/agenda.php

@@ -1,10 +1,19 @@
 <?php
 /**
- * template name: Agenda
+ * The template for displaying Archive pages.
+ *
+ * Used to display archive-type pages if nothing more specific matches a query.
+ * For example, puts together date-based pages if no date.php file exists.
+ *
+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
+ *
+ * Methods for TimberHelper can be found in the /lib sub-directory
+ *
+ * @package  WordPress
+ * @subpackage  Timber
+ * @since   Timber 0.2
  */
+ $timber_post     = new Timber\Post();
+ $context['post'] = $timber_post;
 
-$context = Timber::context();
-
-$timber_post     = new Timber\Post();
-$context['post'] = $timber_post;
-Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'agenda.twig' ), $context );
+Timber::render( array( 'agenda.twig' ), $context );

+ 10 - 0
web/app/themes/la_mine/evenement.php

@@ -0,0 +1,10 @@
+<?php
+/**
+ * template name: evenement
+ */
+
+$context = Timber::context();
+
+$timber_post     = new Timber\Post();
+$context['post'] = $timber_post;
+Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'agenda.twig' ), $context );

+ 42 - 8
web/app/themes/la_mine/templates/accueil.twig

@@ -1,14 +1,48 @@
 {% extends "base.twig" %}
 
 {% block content %}
-	<div class="content-wrapper">
-		<article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
-			<section class="article-content">
-				<h1 class="article-h1">{{post.title}}</h1>
-				<div class="article-body">
-					{{post.content}}
+{% include 'components/title_page.twig' %}
+
+<div class="content">
+			<section class="hero">
+				<h1 class="titre">{{ post.meta('titre') }}</h1>
+				<div class="sous_titre">
+     			<h2 class="texte_chapeau">{{ post.meta('sous_titre') }}</h2>
+ 				</div>
+				<div class="slide_image">
+					{% for item in post.meta('slide_image') %}
+						<div class="images"><img src="{{ Image(item.image).src }}" /></div>
+					{% endfor %}
 				</div>
 			</section>
-		</article>
-	</div><!-- /content-wrapper -->
+			<section class="prochainement"></section>
+			<section class="association">
+				<section class="article-content">
+						<h2 class="texte_chapeau">{{ post.meta('texte_chapeau_asso') }}</h2>
+						<div class="image_sectionasso">
+							<img src="{{ Image(post.meta('image')).src }}" />
+						</div>
+						<div class="article-body">
+							{{ post.meta('paragraphe_descriptif') }}
+							{{ post.meta('paragraphe_descriptif_2') }}
+						</div>
+						<div class="redirection_page">
+						{% include 'components/buttons/bouton_ensavoir.html.twig' %}
+						</div>
+				</section>
+			</section>
+			<section class="section_projet">
+				<section class="article-content">
+					<h2 class="texte_chapeau">{{ post.meta('texte_chapeau_projet') }}</h2>
+				</section>
+				<section class="section_temps_forts"></section>
+				<section class="mine_en_video">
+					<section class="article-content">
+							<div class="video_lamine">
+								{{video_la_mine}}
+							</div>
+					</section>
+				</section>
+	</div>
+
 {% endblock %}

+ 2 - 0
web/app/themes/la_mine/templates/agenda.twig

@@ -1,6 +1,8 @@
 {% extends "base.twig" %}
 
 {% block content %}
+
+{{dump(post)}}
 	<div class="content-wrapper">
 		<article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
 			<section class="article-content">

+ 22 - 3
web/app/themes/la_mine/templates/association.twig

@@ -2,14 +2,33 @@
 
 {% block content %}
 {% include 'components/title_page.twig' %}
-{% include '/components/sider_left.twig' %}
+{% include '/components/sider_left.twig' with { name : 'association' } %}
 
 <div class="colonne_droite">
 		<section class="article_content">
-			<h1 class="'titre_1'">{{ post.meta('titre_1) }}</h1>
+			<section class="paragraphe_asso">
+			<h1 class="'titre_1'">{{ post.meta('titre_asso') }}</h1>
 			<div class="article_body">
-				{{ post.meta( 'paragraphe_1') }}
+				{{ post.meta('paragraphe_asso') }}
 			</div>
 		</section>
+		<section class="engagements">
+		<h1 class="'titre_1'">{{ post.meta('titre_engage') }}</h1>
+		<div class="article_body">
+			<img src="{{ Image(post.meta('image_engagement')).src }}" />
+			<div class="tableau_engagements">
+				{% for item in post.meta('type_engagement') %}
+				 	<div class="engagement">{{item.titre_engagement}}{{item.paragraphe_engagement}}</div>
+				{% endfor %}
+			</div>
+		</div>
+	</section>
+		<section class="paragraphe_vieasso">
+		<h1 class="'titre_1'">{{ post.meta('titre_vieasso') }}</h1>
+		<div class="article_body">
+			{{ post.meta('paragraphe_vieasso') }}
+		</div>
+	</section>
+		</section>
 	</div><!-- /colonne_droite -->
 {% endblock %}

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

@@ -0,0 +1,3 @@
+<div id="bouton_en_savoir">
+  <a href="{{post.meta('bouton_en_savoir').lien_bouton_en_savoir}}">{{post.meta('bouton_en_savoir').texte_bouton_en_savoir}}</a>
+</div>

+ 19 - 27
web/app/themes/la_mine/templates/components/sider_left.twig

@@ -1,34 +1,25 @@
-{% if form %}
-{% include '/components/formulaire.twig' %}
-{% endif %}
-{{dump(post)}}
 
-{% if name == 'benevole' %}
-<div class="colonne_gauche">
-		<section class="article-content">
-			<h1 class="titre_bloc">{{ post.meta('titre_bloc') }}</h1>
-			<div class="article_body">
-				<!-- {{dump(post)}} -->
-				{{ post.meta('paragraphe_bloc') }}
-			</div>
-		</section>
-
-		<div class = "bouttons" >
-			{% include '/components/buttons/bouton_asso.html.twig' %}
-			{% include '/components/buttons/bouton_contact.html.twig' %}
-		</div>
-</div><!-- /colonne_gauche -->
-<!-- cleaner le code + condition bouton pour asso voir pour condition bouton dans le wordpress -->
-{% endif %}
+		<!-- cleaner le code + condition bouton pour asso voir pour condition bouton dans le wordpress -->
 
-{{dump(post)}}
 <div class="colonne_gauche">
 		<section class="article-content">
-
+			{% if name == 'collecte' %}
+				{#{% include '/components/formulaire.twig' %}#}
+			{% endif %}
 			{% if name == 'association' %}
 				<div class="article_body">
 					<h1 class="titre_bloc">{{ post.meta('titre') }}</h1>
-					{{ post.meta('file') }}
+					<ul>
+					 {% for item in post.meta('documents') %}
+					 	<li>
+							<a href="{{item.document.document.url}}" download>{{item.document.nom_doc}}</a>
+						</li>
+					 {% endfor %}
+				 </ul>
+				<div class="liste_doc">	{{ post.meta('file') }}</div>
+				</div>
+				<div class = "bouttons" >
+				{% include '/components/buttons/bouton_asso.html.twig' %}
 				</div>
 				{% elseif name == 'benevole' %}
 					<h1 class="titre_bloc">{{ post.meta('titre_bloc') }}</h1>
@@ -36,10 +27,11 @@
 						<!-- {{dump(post)}} -->
 						{{ post.meta('paragraphe_bloc') }}
 					</div>
+					<div class = "bouttons" >
+						{% include '/components/buttons/bouton_asso.html.twig' %}
+						{% include '/components/buttons/bouton_contact.html.twig' %}
+					</div>
 			{% endif %}
 
 		</section>
-		<div class = "bouttons" >
-		{% include '/components/buttons/bouton_asso.html.twig' %}
-		</div>
 </div><!-- /colonne_gauche -->

+ 14 - 0
web/app/themes/la_mine/templates/evenement.twig

@@ -0,0 +1,14 @@
+{% extends "base.twig" %}
+
+{% block content %}
+	<div class="content-wrapper">
+		<article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
+			<section class="article-content">
+				<h1 class="article-h1">{{post.title}}</h1>
+				<div class="article-body">
+					{{post.content}}
+				</div>
+			</section>
+		</article>
+	</div><!-- /content-wrapper -->
+{% endblock %}

+ 4 - 4
web/app/themes/la_mine/templates/la_collecte.twig

@@ -2,12 +2,12 @@
 
 {% block content %}
 {% include 'components/title_page.twig'  %}
-{% include 'components/sider_left.twig' %}
+{% include 'components/sider_left.twig' with { name : 'collecte' } %}
 
 <div class="colonne_droite">
-			<section class="article-content">
-				<h1 class="texte-chapeau">{{ post.meta('texte_chapeau') }}</h1>
-				<div class="article-body">
+			<section class="article_content">
+				<h1 class="texte_chapeau">{{ post.meta('texte_chapeau') }}</h1>
+				<div class="article_body">
      			{{ post.meta('paragraphe_descriptif') }}
  				</div>
 			</section>

+ 23 - 9
web/app/themes/la_mine/templates/les_projets.twig

@@ -1,14 +1,28 @@
 {% extends "base.twig" %}
 
 {% block content %}
-	<div class="content-wrapper">
-		<article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
-			<section class="article-content">
-				<h1 class="article-h1">{{post.title}}</h1>
-				<div class="article-body">
-					{{post.content}}
+{% include 'components/title_page.twig'  %}
+{# {{dump(post)}} #}
+<section class="zone_projet">
+		<div class="zone">
+			{% for item in post.meta('zone_de_projets') %}
+					<div class="zone_de_projets">
+					<h2>{{item.titre_zone}}</h2>
+					{{item.paragraphe_descriptif}}
 				</div>
-			</section>
-		</article>
-	</div><!-- /content-wrapper -->
+
+						<section class="article_content">
+							{% for item2 in item.projet %}
+							<h3>{{item2.titre_du_projet}}</h3>
+							<div class="article_body">
+							<img src="{{ Image(item2.image).src }}" />
+							<p>{{item2.paragraphe_descriptif}}</p>
+							</div>
+						</section>
+						{% endfor %}
+
+						{% endfor %}
+			<div class="zone">
+	</section><!-- /zone de projet -->
+
 {% endblock %}

+ 33 - 8
web/app/themes/la_mine/templates/privatiser_lespace.twig

@@ -1,14 +1,39 @@
 {% extends "base.twig" %}
 
 {% block content %}
-	<div class="content-wrapper">
-		<article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
+{% include 'components/title_page.twig'  %}
+
+<section class="texte_intro">
+
 			<section class="article-content">
-				<h1 class="article-h1">{{post.title}}</h1>
-				<div class="article-body">
-					{{post.content}}
-				</div>
+				<h2 class="texte_chapeau">{{ post.meta('texte_chapeau') }}</h2>
+				<div class="article_body">
+     			{{ post.meta('paragraphe_descriptif') }}
+ 				</div>
 			</section>
-		</article>
-	</div><!-- /content-wrapper -->
+
+</section>
+
+<section class="slide_imglegende">
+	{% for item in post.meta('slide_image') %}
+		<div class="images"><img src="{{ Image(item.image).src }}" /></div>
+		<div class="legendes">{{ item.titre_legende}}{{ item.texte_legende}}</div>
+	{% endfor %}
+</section>
+
+<section class="organisation">
+<div class="colonne_orga">
+				<section class="article-content">
+					{% for item in post.meta('type_organisation') %}
+					<h2 class="titre_bloc">{{ item.titre_bloc}}</h2>
+					<div class="article_body">{{ item.paragraphe_descriptif}}</div>
+					{% endfor %}
+				</section>
+</div><!-- /colonne_orga -->
+</section>
+
+<section class="telechargement_plaquette">
+	<a href="{{post.meta('bouton').document.url}}"download>{{post.meta('bouton').texte}}</a>
+</div>
+</section>
 {% endblock %}

+ 1 - 20
web/app/themes/la_mine/templates/single.twig

@@ -2,6 +2,7 @@
 
 {% block content %}
 	<div class="content-wrapper">
+		{{dump(post)}}
 		<article class="post-type-{{ post.post_type }}" id="post-{{ post.ID }}">
 			<img src="{{ post.thumbnail.src|resize(1200, 300) }}">
 			<section class="article-content">
@@ -14,26 +15,6 @@
 					{{post.content}}
 				</div>
 			</section>
-
-			<!-- comment box -->
-			<section class="comment-box">
-				<!-- comments -->
-				<div class="comments">
-				    {% if post.comments %}
-					<h3> comments </h3>
-					{% for cmt in post.comments %}
-					    {% include "comment.twig" with {comment:cmt} %}
-					{% endfor %}
-				    {% endif %}
-				</div>
-
-				{% if post.comment_status == "closed" %}
-					<p> comments for this post are closed </p>
-				{% else %}
-				    <!-- comment form -->
-				    {% include "comment-form.twig" %}
-				{% endif %}
-			</section>
 		</article>
 	</div><!-- /content-wrapper -->
 {% endblock %}