création twig de la page projet, privatiser, accueil et asso
This commit is contained in:
parent
3978fb61c8
commit
234ab9f041
@ -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
web/app/themes/la_mine/evenement.php
Normal file
10
web/app/themes/la_mine/evenement.php
Normal file
@ -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 );
|
@ -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 %}
|
||||
|
@ -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">
|
||||
|
@ -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 %}
|
||||
|
@ -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>
|
@ -1,34 +1,25 @@
|
||||
{% if form %}
|
||||
{% include '/components/formulaire.twig' %}
|
||||
{% endif %}
|
||||
{{dump(post)}}
|
||||
|
||||
{% if name == 'benevole' %}
|
||||
<!-- cleaner le code + condition bouton pour asso voir pour condition bouton dans le wordpress -->
|
||||
|
||||
<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 %}
|
||||
|
||||
{{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
web/app/themes/la_mine/templates/evenement.twig
Normal file
14
web/app/themes/la_mine/templates/evenement.twig
Normal file
@ -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 %}
|
@ -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>
|
||||
|
@ -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 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>
|
||||
</article>
|
||||
</div><!-- /content-wrapper -->
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
<div class="zone">
|
||||
</section><!-- /zone de projet -->
|
||||
|
||||
{% endblock %}
|
||||
|
@ -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}}
|
||||
<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 %}
|
||||
|
@ -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 %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user