add template

This commit is contained in:
2020-05-20 15:58:33 +02:00
parent cf7a95d818
commit c602563e67
85 changed files with 36637 additions and 375 deletions

View File

@@ -0,0 +1,10 @@
<?php
/**
* template name: Accueil
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'accueil.twig' ), $context );

View File

@@ -1,11 +1,10 @@
<?php
/**
* Template Name: agenda
* template name: Agenda
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'page.twig' ), $context );
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'agenda.twig' ), $context );

View File

@@ -0,0 +1,10 @@
<?php
/**
* template name: Association
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'association.twig' ), $context );

View File

@@ -53,6 +53,19 @@ Timber::$dirname = array( 'templates', 'views' );
Timber::$autoescape = false;
// REMOVE EDITOR
function remove_editor() {
remove_post_type_support(
'page', 'editor'
);
remove_post_type_support(
'post', 'editor'
);
};
add_action('admin_init', 'remove_editor');
/**
* We're going to configure our theme inside of a subclass of Timber\Site
* You can move this to its own file and include here via php's include("MySite.php")

View File

@@ -0,0 +1,54 @@
<?php
function wpc_cpt() {
/* Property */
$labels = array(
'name' => _x('Properties', 'Post Type General Name', 'la_mine'),
'singular_name' => _x('Property', 'Post Type Singular Name', 'la_mine'),
'menu_name' => __('Properties', 'la_mine'),
'name_admin_bar' => __('Properties', 'la_mine'),
'parent_item_colon' => __('Parent Item:', 'la_mine'),
'all_items' => __('All Items', 'la_mine'),
'add_new_item' => __('Add New Item', 'la_mine'),
'add_new' => __('Add New', 'la_mine'),
'new_item' => __('New Item', 'la_mine' ),
'edit_item' => __('Edit Item', 'la_mine'),
'update_item' => __('Update Item', 'la_mine'),
'view_item' => __('View Item', 'la_mine'),
'search_items' => __('Search Item', 'la_mine'),
'not_found' => __('Not found', 'la_mine'),
'not_found_in_trash' => __('Not found in Trash', 'la_mine'),
);
$rewrite = array(
'slug' => _x('property', 'property', 'la_mine'),
'with_front' => true,
'pages' => true,
'feeds' => false,
);
$args = array(
'label' => __('property', 'la_mine'),
'description' => __('Properties', 'la_mine'),
'labels' => $labels,
'supports' => array('title', 'editor', 'thumbnail', 'comments', 'revisions', 'custom-fields'),
'taxonomies' => array('property_type'),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-admin-home',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'query_var' => 'property',
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type('property', $args);
}
add_action('init', 'wpc_cpt', 10);
?>

View File

@@ -0,0 +1,10 @@
<?php
/**
* template name: La bénévole zone
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'la_benevole_zone.twig' ), $context );

View File

@@ -0,0 +1,10 @@
<?php
/**
* template name: La collecte
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'la_collecte.twig' ), $context );

View File

@@ -0,0 +1,12 @@
<?php
/**
* template name: Les projets
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'les_projets.twig' ), $context );

View File

@@ -0,0 +1,10 @@
<?php
/**
* template name: Les temps forts
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'les_temps_forts.twig' ), $context );

0
web/app/themes/la_mine/page.php Executable file → Normal file
View File

View File

@@ -0,0 +1,10 @@
<?php
/**
* template name: Privatiser l'espace
*/
$context = Timber::context();
$timber_post = new Timber\Post();
$context['post'] = $timber_post;
Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'privatiser_lespace.twig' ), $context );

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,5 +1,6 @@
/*
* Theme Name: My Timber Starter Theme
* Description: Starter Theme to use with Timber
* Author: Upstatement and YOU!
* Theme Name: La mine
* Description: Theming for La mine, construct with timber
* Author: Kévin Tessier & Chloé listrat
* Version: 1.0.0
*/

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

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

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

View File

@@ -3,7 +3,7 @@
<div class="comment-content">{{comment.comment_content|wpautop}}</div>
<section class="comment-box">
<!-- comment form -->
{% include "comment-form.twig" %}
@@ -18,4 +18,4 @@
{% endif %}
</section>
</div>
</div>

View File

@@ -1 +1 @@
Copyright {{"now"|date('Y')}}
Copyright {{"now"|date('Y')}} by FiguresLibres

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

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

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

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

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