chloe 4 роки тому
батько
коміт
a408984d11

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

@@ -1,11 +1,9 @@
 <?php
 
-$timber_post     = new Timber\Post();
-$context['posts'] = new Timber\PostQuery();
-
-$context['post'] = $timber_post;
 
 $context = Timber::context();
+$timber_post     = new Timber\Post();
+$context['posts'] = new Timber\PostQuery();
 
 $args = array(
     'post_type' => 'post',
@@ -13,4 +11,4 @@ $args = array(
 
 $context['posts'] = Timber::get_posts( $args );
 
-Timber::render( array( 'agenda.twig' ), $context );
+Timber::render( ['agenda.twig'] , $context );

+ 0 - 21
web/app/themes/la_mine/author.php

@@ -1,21 +0,0 @@
-<?php
-/**
- * The template for displaying Author Archive pages
- *
- * Methods for TimberHelper can be found in the /lib sub-directory
- *
- * @package  WordPress
- * @subpackage  Timber
- * @since    Timber 0.1
- */
-
-global $wp_query;
-
-$context          = Timber::context();
-$context['posts'] = new Timber\PostQuery();
-if ( isset( $wp_query->query_vars['author'] ) ) {
-	$author            = new Timber\User( $wp_query->query_vars['author'] );
-	$context['author'] = $author;
-	$context['title']  = 'Author Archives: ' . $author->name();
-}
-Timber::render( array( 'author.twig', 'archive.twig' ), $context );

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

@@ -1,10 +0,0 @@
-<?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 );

+ 1 - 2
web/app/themes/la_mine/templates/accueil.twig

@@ -2,10 +2,9 @@
 
 {% block content %}
 {% include 'components/title_page.twig' %}
-
 <section>
 	<div class="hero">
-		<div class="__head">
+				<div class="__head">
 			<h1 class="__titre">{{ post.meta('titre') }}</h1>
 			<div class="__sous_titre">
 				<h2>{{ post.meta('sous_titre') }}</h2>

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

@@ -1,8 +1,18 @@
 {% extends "base.twig" %}
 
 {% block content %}
+page agenda
 	<section>
 		<div>
+			<article class="tease tease-{{post.post_type}}" id="tease-{{post.ID}}">
+				{% block content %}
+					<h2 class="h2"><a href="{{post.link}}">{{post.title}}</a></h2>
+					<p>{{post.preview}}</p>
+					{% if post.get_thumbnail %}
+						<img src="{{post.thumbnail.src}}" />
+					{% endif %}
+				{% endblock %}
+			</article>
 		{% for item in posts %}
 			{% include 'components/thumbnails/thumbnails.twig' %}
 		{% endfor %}

+ 0 - 7
web/app/themes/la_mine/templates/author.twig

@@ -1,7 +0,0 @@
-{% extends "base.twig" %}
-
-{% block content %}
-	{% for post in posts %}
-		{% include ["tease-"~post.post_type~".twig", "tease.twig"] %}
-	{% endfor %}
-{% endblock %}

+ 2 - 1
web/app/themes/la_mine/templates/base.twig

@@ -12,7 +12,8 @@
 			{% block header %}
 				<div class="logoLamine">
 					<h1 class="hdr-logo" role="banner">
-						<a class="hdr-logo-link" href="{{site.url}}" rel="home">{{site.name}}</a>
+						{#<a class="hdr-logo-link" href="{{site.url}}" rel="home">{{site.name}}</a>#}
+						<a class="hdr-logo-link" href="{{site.accueil}}" rel="home">{{site.name}}</a>
 					</h1>
 					<nav id="nav-main" class="nav-main" role="navigation">
 						{% include "menu.twig" with {'items': menu.get_items} %}

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

@@ -1,3 +1,8 @@
-<div id="bouton_en_savoir">
+  <div id="bouton_en_savoir">
+{% if name_template == accueil %}
+<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">
   <a href="{{post.meta('bouton_en_savoir').lien_bouton_en_savoir}}">{{post.meta('bouton_en_savoir').texte_bouton_en_savoir}}</a>
+{% endif %}
 </div>

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

@@ -0,0 +1,3 @@
+<div id="bouton_toutvoir">
+  <a href=""><p>TOUT VOIR</p></a>
+</div>

+ 10 - 14
web/app/themes/la_mine/templates/components/thumbnails/thumbnails.twig

@@ -1,34 +1,30 @@
 <div class="item thumbnails">
-  <div class="__cat">
-    <div class="img__cat">
-      <img src="" alt="">
-    </div>
-  </div>
 
   <div class="__images">
     <div class="__img">
-      <img src="" alt="">
-    </div>
+      <img src="{{ Image(item.image_event).src |resize(300, 300) }}" >
+      </div>
   </div>
 
   <div class="wrap__content">
-    <div class="__title">{{posts.title}}</div>
+    <div class="__title"><h2>{{item.titre}}</h2></div>
     <div class="__content">
       <div class="__date">
         <div class="__day">
-          <time>{{item.date_de_levenement}}</time>
-        </div>
-        <div class="__hour">
           <span class="start">
-            <time>{{item.horaires_horaire_de_debut}}</time>
+            <time><p>du</p>{{item.debut_event}}</time>
           </span>
           <span class="end">
-            <time>{{item.horaires_horaire_de_fin}}</time>
+            <time><p>au</p>{{item.fin_event}}</time>
           </span>
-        </div>
+              </div>
       </div>
       <div class="lieu">{{item.lieu}}</div>
     </div>
   </div>
+  
+  <div id="btn redirection_page">
+    {% include 'components/buttons/bouton_ensavoir.html.twig'with { name__template : 'accueil' } %}
+  </div>
 
 </div>

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

@@ -1,14 +0,0 @@
-{% 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 %}

+ 1 - 3
web/app/themes/la_mine/templates/index.twig

@@ -1,11 +1,9 @@
 {% extends "base.twig" %}
 
 {% block content %}
-	<h2>{{ foo }}</h2>
-	<p>{{ qux }}</p>
 	{% for post in posts %}
 		{% include ['tease-'~post.post_type~'.twig', 'tease.twig'] %}
 	{% endfor %}
-	
+
 	{% include 'partial/pagination.twig' with { pagination: posts.pagination({show_all: false, mid_size: 3, end_size: 2}) } %}
 {% endblock %}

+ 7 - 9
web/app/themes/la_mine/templates/single.twig

@@ -3,16 +3,14 @@
 {% 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) }}">
+		<article class="post-type-{{ post.titre}}">
+			<img src="{{ post.image_event}}">
+
 			<section class="article-content">
-				<h1 class="article-h1">{{ post.title }}</h1>
-				<a href="{{ post.link }}">{{ _e('edit') }}</a>
-				<p class="blog-author">
-					<span>By</span><a href="{{post.author.path}}"> {{ post.author.name }} </a><span>&bull;</span> <time datetime="{{ post.date|date('Y-m-d H:i:s') }}">{{ post.date }}</time>
-				</p>
-				<div class="article-body">
-					{{post.content}}
+				<h1 class="article-h1">{{ post.titre }}</h1>
+
+						<div class="article-body">
+					{{post.description}}
 				</div>
 			</section>
 		</article>

+ 0 - 9
web/app/themes/la_mine/templates/tease.twig

@@ -1,9 +0,0 @@
-<article class="tease tease-{{post.post_type}}" id="tease-{{post.ID}}">
-	{% block content %}
-		<h2 class="h2"><a href="{{post.link}}">{{post.title}}</a></h2>
-		<p>{{post.preview}}</p>
-		{% if post.get_thumbnail %}
-			<img src="{{post.thumbnail.src}}" />
-		{% endif %}
-	{% endblock %}
-</article>