add template
This commit is contained in:
10
web/app/themes/la_mine/accueil.php
Normal file
10
web/app/themes/la_mine/accueil.php
Normal 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 );
|
@@ -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 );
|
||||
|
10
web/app/themes/la_mine/association.php
Normal file
10
web/app/themes/la_mine/association.php
Normal 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 );
|
@@ -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")
|
||||
|
54
web/app/themes/la_mine/inc/function.php
Normal file
54
web/app/themes/la_mine/inc/function.php
Normal 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);
|
||||
?>
|
10
web/app/themes/la_mine/la_benevole_zone.php
Normal file
10
web/app/themes/la_mine/la_benevole_zone.php
Normal 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 );
|
10
web/app/themes/la_mine/la_collecte.php
Normal file
10
web/app/themes/la_mine/la_collecte.php
Normal 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 );
|
12
web/app/themes/la_mine/les_projets.php
Normal file
12
web/app/themes/la_mine/les_projets.php
Normal 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 );
|
10
web/app/themes/la_mine/les_temps_forts.php
Executable file
10
web/app/themes/la_mine/les_temps_forts.php
Executable 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
0
web/app/themes/la_mine/page.php
Executable file → Normal file
10
web/app/themes/la_mine/privatiser_lespace.php
Normal file
10
web/app/themes/la_mine/privatiser_lespace.php
Normal 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 );
|
BIN
web/app/themes/la_mine/screenshot.png
Executable file
BIN
web/app/themes/la_mine/screenshot.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@@ -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
|
||||
*/
|
||||
|
14
web/app/themes/la_mine/templates/accueil.twig
Normal file
14
web/app/themes/la_mine/templates/accueil.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 %}
|
14
web/app/themes/la_mine/templates/agenda.twig
Normal file
14
web/app/themes/la_mine/templates/agenda.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 %}
|
14
web/app/themes/la_mine/templates/association.twig
Normal file
14
web/app/themes/la_mine/templates/association.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 %}
|
@@ -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>
|
||||
|
@@ -1 +1 @@
|
||||
Copyright {{"now"|date('Y')}}
|
||||
Copyright {{"now"|date('Y')}} by FiguresLibres
|
||||
|
14
web/app/themes/la_mine/templates/la_benevole_zone.twig
Normal file
14
web/app/themes/la_mine/templates/la_benevole_zone.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 %}
|
14
web/app/themes/la_mine/templates/la_collecte.twig
Normal file
14
web/app/themes/la_mine/templates/la_collecte.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 %}
|
14
web/app/themes/la_mine/templates/les_projets.twig
Normal file
14
web/app/themes/la_mine/templates/les_projets.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 %}
|
14
web/app/themes/la_mine/templates/les_temps_forts.twig
Normal file
14
web/app/themes/la_mine/templates/les_temps_forts.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 %}
|
14
web/app/themes/la_mine/templates/privatiser_lespace.twig
Normal file
14
web/app/themes/la_mine/templates/privatiser_lespace.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 %}
|
Reference in New Issue
Block a user