test
This commit is contained in:
parent
270ed287db
commit
a408984d11
@ -1,11 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$timber_post = new Timber\Post();
|
|
||||||
$context['posts'] = new Timber\PostQuery();
|
|
||||||
|
|
||||||
$context['post'] = $timber_post;
|
|
||||||
|
|
||||||
$context = Timber::context();
|
$context = Timber::context();
|
||||||
|
$timber_post = new Timber\Post();
|
||||||
|
$context['posts'] = new Timber\PostQuery();
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
@ -13,4 +11,4 @@ $args = array(
|
|||||||
|
|
||||||
$context['posts'] = Timber::get_posts( $args );
|
$context['posts'] = Timber::get_posts( $args );
|
||||||
|
|
||||||
Timber::render( array( 'agenda.twig' ), $context );
|
Timber::render( ['agenda.twig'] , $context );
|
||||||
|
@ -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 );
|
|
@ -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 );
|
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include 'components/title_page.twig' %}
|
{% include 'components/title_page.twig' %}
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<div class="__head">
|
<div class="__head">
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
{% extends "base.twig" %}
|
{% extends "base.twig" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
page agenda
|
||||||
<section>
|
<section>
|
||||||
<div>
|
<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 %}
|
{% for item in posts %}
|
||||||
{% include 'components/thumbnails/thumbnails.twig' %}
|
{% include 'components/thumbnails/thumbnails.twig' %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
{% extends "base.twig" %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
{% for post in posts %}
|
|
||||||
{% include ["tease-"~post.post_type~".twig", "tease.twig"] %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endblock %}
|
|
@ -12,7 +12,8 @@
|
|||||||
{% block header %}
|
{% block header %}
|
||||||
<div class="logoLamine">
|
<div class="logoLamine">
|
||||||
<h1 class="hdr-logo" role="banner">
|
<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>
|
</h1>
|
||||||
<nav id="nav-main" class="nav-main" role="navigation">
|
<nav id="nav-main" class="nav-main" role="navigation">
|
||||||
{% include "menu.twig" with {'items': menu.get_items} %}
|
{% include "menu.twig" with {'items': menu.get_items} %}
|
||||||
|
@ -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>
|
<a href="{{post.meta('bouton_en_savoir').lien_bouton_en_savoir}}">{{post.meta('bouton_en_savoir').texte_bouton_en_savoir}}</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
<div id="bouton_toutvoir">
|
||||||
|
<a href=""><p>TOUT VOIR</p></a>
|
||||||
|
</div>
|
@ -1,29 +1,21 @@
|
|||||||
<div class="item thumbnails">
|
<div class="item thumbnails">
|
||||||
<div class="__cat">
|
|
||||||
<div class="img__cat">
|
|
||||||
<img src="" alt="">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="__images">
|
<div class="__images">
|
||||||
<div class="__img">
|
<div class="__img">
|
||||||
<img src="" alt="">
|
<img src="{{ Image(item.image_event).src |resize(300, 300) }}" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wrap__content">
|
<div class="wrap__content">
|
||||||
<div class="__title">{{posts.title}}</div>
|
<div class="__title"><h2>{{item.titre}}</h2></div>
|
||||||
<div class="__content">
|
<div class="__content">
|
||||||
<div class="__date">
|
<div class="__date">
|
||||||
<div class="__day">
|
<div class="__day">
|
||||||
<time>{{item.date_de_levenement}}</time>
|
|
||||||
</div>
|
|
||||||
<div class="__hour">
|
|
||||||
<span class="start">
|
<span class="start">
|
||||||
<time>{{item.horaires_horaire_de_debut}}</time>
|
<time><p>du</p>{{item.debut_event}}</time>
|
||||||
</span>
|
</span>
|
||||||
<span class="end">
|
<span class="end">
|
||||||
<time>{{item.horaires_horaire_de_fin}}</time>
|
<time><p>au</p>{{item.fin_event}}</time>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -31,4 +23,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="btn redirection_page">
|
||||||
|
{% include 'components/buttons/bouton_ensavoir.html.twig'with { name__template : 'accueil' } %}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -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,8 +1,6 @@
|
|||||||
{% extends "base.twig" %}
|
{% extends "base.twig" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{{ foo }}</h2>
|
|
||||||
<p>{{ qux }}</p>
|
|
||||||
{% for post in posts %}
|
{% for post in posts %}
|
||||||
{% include ['tease-'~post.post_type~'.twig', 'tease.twig'] %}
|
{% include ['tease-'~post.post_type~'.twig', 'tease.twig'] %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -3,16 +3,14 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
{{dump(post)}}
|
{{dump(post)}}
|
||||||
<article class="post-type-{{ post.post_type }}" id="post-{{ post.ID }}">
|
<article class="post-type-{{ post.titre}}">
|
||||||
<img src="{{ post.thumbnail.src|resize(1200, 300) }}">
|
<img src="{{ post.image_event}}">
|
||||||
|
|
||||||
<section class="article-content">
|
<section class="article-content">
|
||||||
<h1 class="article-h1">{{ post.title }}</h1>
|
<h1 class="article-h1">{{ post.titre }}</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>•</span> <time datetime="{{ post.date|date('Y-m-d H:i:s') }}">{{ post.date }}</time>
|
|
||||||
</p>
|
|
||||||
<div class="article-body">
|
<div class="article-body">
|
||||||
{{post.content}}
|
{{post.description}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
|
@ -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>
|
|
Loading…
x
Reference in New Issue
Block a user