This commit is contained in:
Chloe Listrat 2020-05-27 18:00:19 +02:00
parent 270ed287db
commit a408984d11
14 changed files with 43 additions and 96 deletions

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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>

View File

@ -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 %}

View File

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

View File

@ -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} %}

View File

@ -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>

View File

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

View File

@ -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>

View File

@ -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 %}

View File

@ -1,8 +1,6 @@
{% extends "base.twig" %}
{% block content %}
<h2>{{ foo }}</h2>
<p>{{ qux }}</p>
{% for post in posts %}
{% include ['tease-'~post.post_type~'.twig', 'tease.twig'] %}
{% endfor %}

View File

@ -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>

View File

@ -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>