add twig agenda
This commit is contained in:
parent
bb8f308ff9
commit
75fdf97b01
@ -1,19 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* The template for displaying Archive pages.
|
$timber_post = new Timber\Post();
|
||||||
*
|
$context['posts'] = new Timber\PostQuery();
|
||||||
* 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.
|
$context['post'] = $timber_post;
|
||||||
*
|
|
||||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
$context = Timber::context();
|
||||||
*
|
|
||||||
* Methods for TimberHelper can be found in the /lib sub-directory
|
$args = array(
|
||||||
*
|
'post_type' => 'post',
|
||||||
* @package WordPress
|
);
|
||||||
* @subpackage Timber
|
|
||||||
* @since Timber 0.2
|
$context['posts'] = Timber::get_posts( $args );
|
||||||
*/
|
|
||||||
$timber_post = new Timber\Post();
|
|
||||||
$context['post'] = $timber_post;
|
|
||||||
|
|
||||||
Timber::render( array( 'agenda.twig' ), $context );
|
Timber::render( array( 'agenda.twig' ), $context );
|
||||||
|
@ -1,16 +1,44 @@
|
|||||||
{% extends "base.twig" %}
|
{% extends "base.twig" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<section>
|
||||||
|
<div>
|
||||||
|
{% for item in posts %}
|
||||||
|
<div class="item thumbnails">
|
||||||
|
<div class="__cat">
|
||||||
|
<div class="img__cat">
|
||||||
|
<img src="" alt="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{dump(post)}}
|
<div class="__images">
|
||||||
<div class="content-wrapper">
|
<div class="__img">
|
||||||
<article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
|
<img src="" alt="">
|
||||||
<section class="article-content">
|
</div>
|
||||||
<h1 class="article-h1">{{post.title}}</h1>
|
</div>
|
||||||
<div class="article-body">
|
|
||||||
{{post.content}}
|
<div class="wrap__content">
|
||||||
|
<div class="__title">{{posts.title}}</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>
|
||||||
|
</span>
|
||||||
|
<span class="end">
|
||||||
|
<time>{{item.horaires_horaire_de_fin}}</time>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="lieu">{{item.lieu}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</article>
|
|
||||||
</div><!-- /content-wrapper -->
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user