feat: simplification breadcrumb
This commit is contained in:
parent
02887963f9
commit
549581e736
9 changed files with 51 additions and 77 deletions
|
@ -1,13 +1,6 @@
|
||||||
<?php get_header(); ?> <!-- ouvrir header,php -->
|
<?php get_header(); ?> <!-- ouvrir header,php -->
|
||||||
<main>
|
<main>
|
||||||
<div class="flex-that">
|
<?php kspace_cat_breadcrumb(get_the_archive_title(), 'calendar'); ?>
|
||||||
<nav aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item"><a href="<?php echo site_url(); ?>">kazhnuz.space</a></li><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-calendar"></i> <?php echo get_the_archive_title(); ?></span></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include(TEMPLATEPATH . '/components/preview-list.php'); ?>
|
<?php include(TEMPLATEPATH . '/components/preview-list.php'); ?>
|
||||||
</main>
|
</main>
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
|
|
|
@ -1,20 +1,8 @@
|
||||||
<?php get_header(); ?> <!-- ouvrir header,php -->
|
<?php get_header(); ?> <!-- ouvrir header,php -->
|
||||||
<main>
|
<main>
|
||||||
<?php
|
<?php $category = get_category( get_query_var( 'cat' ) );
|
||||||
$category = get_category( get_query_var( 'cat' ) );
|
kspace_cat_breadcrumb_with_rss(single_cat_title('', false), 'folder-open', 'la catégorie', get_category_link( $category->cat_ID ) . '/feed' );
|
||||||
$cat_id = $category->cat_ID; ?>
|
?>
|
||||||
<div class="flex-that">
|
|
||||||
<nav aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item"><a href="<?php echo site_url(); ?>">kazhnuz.space</a></li><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-folder-open"></i> <?php echo single_cat_title(); ?></span></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
<div class="rss">
|
|
||||||
<?php echo '<a href="' . get_category_link( $cat_id ) . 'feed/" title="RSS de la categorie" class="btn btn-orange" /><i class="fa fa-rss"></i></a>'; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include(TEMPLATEPATH . '/components/posts-list.php'); ?>
|
<?php include(TEMPLATEPATH . '/components/posts-list.php'); ?>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
20
category.php
20
category.php
|
@ -1,20 +1,8 @@
|
||||||
<?php get_header(); ?> <!-- ouvrir header,php -->
|
<?php get_header(); ?> <!-- ouvrir header,php -->
|
||||||
<main>
|
<main>
|
||||||
<?php
|
<?php $category = get_category( get_query_var( 'cat' ) );
|
||||||
$category = get_category( get_query_var( 'cat' ) );
|
kspace_cat_breadcrumb_with_rss(single_cat_title('', false), 'folder-open', 'la catégorie', get_category_link( $category->cat_ID ) . '/feed' );
|
||||||
$cat_id = $category->cat_ID; ?>
|
?>
|
||||||
<div class="flex-that">
|
|
||||||
<nav aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item"><a href="<?php echo site_url(); ?>">kazhnuz.space</a></li><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-folder-open"></i> <?php echo single_cat_title(); ?></span></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
<div class="rss">
|
|
||||||
<?php echo '<a href="' . get_category_link( $cat_id ) . 'feed/" title="RSS de la categorie" class="btn btn-orange" /><i class="fa fa-rss"></i></a>'; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include(TEMPLATEPATH . '/components/preview-list.php'); ?>
|
<?php include(TEMPLATEPATH . '/components/preview-list.php'); ?>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
@ -22,7 +10,7 @@
|
||||||
<!-- Sidebar custom pour contenir la description -->
|
<!-- Sidebar custom pour contenir la description -->
|
||||||
<aside class="sidebar">
|
<aside class="sidebar">
|
||||||
<div class="card card-info">
|
<div class="card card-info">
|
||||||
<div class="card-header"><i class="fa fa-folder-open"></i> <?php echo single_cat_title(); ?></div>
|
<div class="card-header"><i class="fa fa-folder-open" aria-hidden="true"></i> <?php echo single_cat_title(); ?></div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php the_archive_description() ?>
|
<?php the_archive_description() ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-file"></i> <?php echo the_title(); ?></span></li>
|
?><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-file" aria-hidden="true"></i> <?php echo the_title(); ?></span></li>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
$menu = wp_get_nav_menu_items($listmenu['social']);
|
$menu = wp_get_nav_menu_items($listmenu['social']);
|
||||||
if ($menu != null) {
|
if ($menu != null) {
|
||||||
foreach ($menu as $menuElement) {
|
foreach ($menu as $menuElement) {
|
||||||
echo '<li class="social-li"><a class="social-link" href="'. $menuElement->url .'" alt="'.$menuElement->title.'"><i class="fa fa-fw fa-'.$menuElement->title.'"></i></a></li> ';
|
echo '<li class="social-li"><a class="social-link" href="'. $menuElement->url .'" title="Accéder à mon '.$menuElement->title.'" aria-label="Accéder à mon '.$menuElement->title.'"><i class="fa fa-fw fa-'.$menuElement->title.'" aria-hidden="true"></i></a></li> ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p>Les contenus sont diffusé sous licence Creative Common Attribution - Partage à l'Identique 4.0 - hors mention contraire.</p>
|
<p>Les contenus sont diffusé sous licence Creative Common Attribution - Partage à l'Identique 4.0 - hors mention contraire.</p>
|
||||||
<p>Ces licences vous autorise à partager et copier mes travaux, tant que vous me citiez en source, et que vous autorisez la même chose pour les travaux qui en seraient dérivés. N'hésitez pas à partager ! <i class="color-red fa fa-heart"></i></p>
|
<p>Ces licences vous autorise à partager et copier mes travaux, tant que vous me citiez en source, et que vous autorisez la même chose pour les travaux qui en seraient dérivés. N'hésitez pas à partager ! <i class="color-red fa fa-heart" aria-hidden="true"></i></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -109,6 +109,39 @@ add_action( 'flag_add_form_fields', 'flags_taxonomy_custom_fields_add' );
|
||||||
add_action( 'created_flag', 'save_taxonomy_custom_fields' );
|
add_action( 'created_flag', 'save_taxonomy_custom_fields' );
|
||||||
add_action( 'edited_flag', 'save_taxonomy_custom_fields', 10, 2 );
|
add_action( 'edited_flag', 'save_taxonomy_custom_fields', 10, 2 );
|
||||||
|
|
||||||
|
|
||||||
|
function kspace_cat_breadcrumb_nav($categoryName, $icon) {
|
||||||
|
?>
|
||||||
|
<nav aria-label="breadcrumb">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<?php echo site_url(); ?>">kazhnuz.space</a>
|
||||||
|
</li><li class="breadcrumb-item" aria-current="page">
|
||||||
|
<span class="active"><i class="fa fa-<?php echo $icon; ?>" aria-hidden="true"></i> <?php echo $categoryName; ?></span>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function kspace_cat_breadcrumb($categoryName, $icon) {
|
||||||
|
?>
|
||||||
|
<div class="flex-that">
|
||||||
|
<?php kspace_cat_breadcrumb_nav($categoryName, $icon); ?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
function kspace_cat_breadcrumb_with_rss($categoryName, $icon, $categoryType, $rssLink) {
|
||||||
|
?>
|
||||||
|
<div class="flex-that">
|
||||||
|
<?php kspace_cat_breadcrumb_nav($categoryName, $icon); ?>
|
||||||
|
<div class="rss">
|
||||||
|
<a href="<?php echo $rssLink; ?>" class="btn btn-orange" /><i class="fa fa-rss" aria-hidden="true"></i><span class="sr-only">Flux RSS de <?php echo $categoryType; ?></span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
/* 2. Réseaux sociaux
|
/* 2. Réseaux sociaux
|
||||||
*
|
*
|
||||||
* Permet d'afficher les réseaux sociaux en bas du post.
|
* Permet d'afficher les réseaux sociaux en bas du post.
|
||||||
|
@ -147,8 +180,8 @@ function mypost_social_sharing_buttons($content) {
|
||||||
// Add sharing button at the end of page/page content
|
// Add sharing button at the end of page/page content
|
||||||
$content .= '<!-- based on crunchify social sharing. Get your copy here: http://crunchify.me/1VIxAsz -->';
|
$content .= '<!-- based on crunchify social sharing. Get your copy here: http://crunchify.me/1VIxAsz -->';
|
||||||
$content .= '<div class="reagir share-buttons">';
|
$content .= '<div class="reagir share-buttons">';
|
||||||
$content .= '<a class="btn-small btn-twitter" href="'. $twitterURL .'" target="_blank"><i alt="twitter" class="fa fa-fw fa-twitter"></i></a> ';
|
$content .= '<a class="btn-small btn-twitter" href="'. $twitterURL .'" target="_blank"><i aria-label="twitter" class="fa fa-fw fa-twitter"></i></a> ';
|
||||||
$content .= '<a class="btn-small btn-facebook" href="'.$facebookURL.'" target="_blank"><i alt="facebook" class="fa fa-fw fa-facebook"></i></a> ';
|
$content .= '<a class="btn-small btn-facebook" href="'.$facebookURL.'" target="_blank"><i aria-label="facebook" class="fa fa-fw fa-facebook"></i></a> ';
|
||||||
$content .= '<a title="Share to Diaspora*" class="btn-small btn-diaspora" href="'.$diasporaURL.'" target="_blank"><i class="fa fa-fw fa-diaspora"></i></a>';
|
$content .= '<a title="Share to Diaspora*" class="btn-small btn-diaspora" href="'.$diasporaURL.'" target="_blank"><i class="fa fa-fw fa-diaspora"></i></a>';
|
||||||
$content .= '</div>';
|
$content .= '</div>';
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,7 @@
|
||||||
<?php get_header(); ?> <!-- ouvrir header,php -->
|
<?php get_header(); ?> <!-- ouvrir header,php -->
|
||||||
<main>
|
<main>
|
||||||
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
|
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
|
||||||
|
<?php kspace_cat_breadcrumb('Romans', 'folder-open'); ?>
|
||||||
<div class="flex-that">
|
|
||||||
<nav aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class='breadcrumb-item'><a href='<?php echo site_url(); ?>'>kazhnuz.space</a></li><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-folder-open"></i> <?php echo the_title(); ?></span></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
14
tag.php
14
tag.php
|
@ -1,18 +1,8 @@
|
||||||
<?php get_header(); ?> <!-- ouvrir header,php -->
|
<?php get_header(); ?> <!-- ouvrir header,php -->
|
||||||
<main>
|
<main>
|
||||||
<?php $tag = get_category( get_query_var( 'tag' ) );
|
<?php $tag = get_category( get_query_var( 'tag' ) );
|
||||||
$tag_id = $tag->ID;?>
|
kspace_cat_breadcrumb_with_rss(single_cat_title('', false), 'tag', 'RSS du tag', get_tag_link( $tag->cat_ID ) . '/feed' );
|
||||||
<div class="flex-that">
|
?>
|
||||||
<nav aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item"><a href="<?php echo site_url(); ?>">kazhnuz.space</a></li><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-tag"></i> <?php echo single_cat_title(); ?></span></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
<div class="rss">
|
|
||||||
<?php echo '<a href="' . get_tag_link( $tag_id ) . 'feed/" title="RSS de la categorie" class="btn btn-orange" /><i class="fa fa-rss"></i></a>'; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include(TEMPLATEPATH . '/components/preview-list.php'); ?>
|
<?php include(TEMPLATEPATH . '/components/preview-list.php'); ?>
|
||||||
</main>
|
</main>
|
||||||
<!-- Sidebar custom pour contenir la description -->
|
<!-- Sidebar custom pour contenir la description -->
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
<?php get_header(); ?> <!-- ouvrir header,php -->
|
<?php get_header(); ?> <!-- ouvrir header,php -->
|
||||||
<main>
|
<main>
|
||||||
<?php $tag = get_category( get_query_var( 'roman' ) );
|
<?php kspace_cat_breadcrumb(single_cat_title('', false), 'book'); ?>
|
||||||
$tag_id = get_queried_object()->term_id;?>
|
|
||||||
<div class="flex-that">
|
|
||||||
<nav aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item"><a href="<?php echo site_url(); ?>">kazhnuz.space</a></li><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-book"></i> <?php echo single_cat_title(); ?></span></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
<div class="rss">
|
|
||||||
<?php echo '<a href="' . get_tag_link( $tag_id ) . 'feed/" title="RSS de la categorie" class="btn btn-orange" /><i class="fa fa-rss"></i></a>'; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<img class="cover" src="<?php
|
<img class="cover" src="<?php
|
||||||
$term_meta = get_option( "taxonomy_term_$tag_id" );
|
$term_meta = get_option( "taxonomy_term_$tag_id" );
|
||||||
|
@ -41,7 +30,7 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="card card-primary">
|
<div class="card card-primary">
|
||||||
<div class="card-header"><i class="fa fa-list"></i> Chapitres</div>
|
<div class="card-header"><i class="fa fa-list" aria-hidden="true"></i> Chapitres</div>
|
||||||
<div class="card-menu">
|
<div class="card-menu">
|
||||||
<?php if($query->have_posts()) : ?>
|
<?php if($query->have_posts()) : ?>
|
||||||
<?php $i = 1; ?>
|
<?php $i = 1; ?>
|
||||||
|
|
Reference in a new issue