Compare commits
No commits in common. "b4de4468c1c75ad60436c6ab2e984d69e2f0888a" and "0477ccbc1b3f6e0aea0542aae214a6c5f3b40ab0" have entirely different histories.
b4de4468c1
...
0477ccbc1b
13 changed files with 58 additions and 186 deletions
|
@ -6,7 +6,6 @@
|
|||
<article class="article container-article" id="post-<?php the_ID(); ?>">
|
||||
<?php if ($haveTitle) { ?>
|
||||
<h1 class="page-title"><?php the_title(); ?></h1>
|
||||
<p class="text-right"><span class="btn-small btn-secondary"> <?php echo reading_time(); ?> </span></p>
|
||||
<?php } ?>
|
||||
|
||||
<div class="article-entry">
|
||||
|
@ -30,5 +29,7 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<?php comments_template(); ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -7,14 +7,8 @@
|
|||
foreach ($menu as $menuElement) {
|
||||
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> ';
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<li class="social-li">
|
||||
<a class="social-link" href="https://kazhnuz.space/links" title="Plus de liens" aria-label="Plus de liens">
|
||||
<i class="fa fa-fw fa-ellipsis-h" aria-hidden="true"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="footer-collumns">
|
||||
|
|
|
@ -1,33 +1,19 @@
|
|||
<?php
|
||||
$parent_categories = get_categories( array(
|
||||
'orderby' => 'slug',
|
||||
'order' => 'ASC',
|
||||
'parent' => 0
|
||||
) );
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-grey" id="navbar-category">
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
foreach( $parent_categories as $parent_category ) {
|
||||
?>
|
||||
<li>
|
||||
<span class="btn btn-navbar">
|
||||
<?php echo $parent_category->name ?> <i class="fa fa-caret-down" aria-hidden="true"></i>
|
||||
|
||||
<ul class="card-menu">
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav nav-justified w-100">
|
||||
<?php
|
||||
$categories = get_categories( array(
|
||||
'orderby' => 'slug',
|
||||
'order' => 'ASC',
|
||||
'parent' => $parent_category->term_id
|
||||
'orderby' => 'name',
|
||||
'order' => 'ASC'
|
||||
) );
|
||||
|
||||
foreach( $categories as $category ) {
|
||||
if ($category->slug != "chapters") {
|
||||
echo '<li><a class="menu-element" href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
echo '<li class="nav-item"><a class="nav-link" href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></li>';
|
||||
}?>
|
||||
</ul>
|
||||
</span>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
@ -5,7 +5,24 @@
|
|||
<i class="fa fa-home" aria-hidden="true"></i><span class="sr-only">Accueil</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php include(TEMPLATEPATH . '/components/navbar-category.php'); ?>
|
||||
<li>
|
||||
<span class="btn btn-navbar">
|
||||
Catégories <i class="fa fa-caret-down" aria-hidden="true"></i>
|
||||
<ul class="card-menu">
|
||||
<?php
|
||||
$categories = get_categories( array(
|
||||
'orderby' => 'name',
|
||||
'order' => 'ASC'
|
||||
) );
|
||||
|
||||
foreach( $categories as $category ) {
|
||||
if ($category->slug != "blog" && $category->slug != "chapters") {
|
||||
echo '<li><a class="menu-element" href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></li>';
|
||||
}
|
||||
}?>
|
||||
</ul>
|
||||
</span>
|
||||
</li>
|
||||
<?php
|
||||
$listmenu = get_nav_menu_locations();
|
||||
$menu = wp_get_nav_menu_items($listmenu['top-navbar']);
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
<article class="card card-preview card-primary">
|
||||
<a href="<?php the_permalink(); ?>" class="preview-link">
|
||||
<div class="preview-item">
|
||||
|
||||
<?php if(!has_post_thumbnail( $post->ID )) {
|
||||
?>
|
||||
<div class="preview-content" aria-hidden="true"><?php the_excerpt(); ?></div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="preview-content" aria-hidden="true"><p class="p-img"><img class="preview-img" src="<?php echo get_the_post_thumbnail_url(); ?>" /></p></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="preview-overlay">
|
||||
<h1 class="card-header"><?php the_title(); ?></h1>
|
||||
<div class="preview-metadata">
|
||||
|
|
|
@ -1,30 +1,16 @@
|
|||
<?php
|
||||
$parent_categories = get_categories( array(
|
||||
'orderby' => 'slug',
|
||||
'order' => 'ASC',
|
||||
'parent' => 0
|
||||
) );
|
||||
|
||||
foreach( $parent_categories as $parent_category ) {
|
||||
?>
|
||||
<div class="card card-primary">
|
||||
<div class="card-header"><i class="fa fa-folder" aria-hidden="true"></i> <?php echo $parent_category->name ?></div>
|
||||
<div class="card card-primary">
|
||||
<div class="card-header"><i class="fa fa-folder" aria-hidden="true"></i> Catégories</div>
|
||||
<ul class="card-menu">
|
||||
<?php
|
||||
$categories = get_categories( array(
|
||||
'orderby' => 'slug',
|
||||
'order' => 'ASC',
|
||||
'parent' => $parent_category->term_id
|
||||
'orderby' => 'name',
|
||||
'order' => 'ASC'
|
||||
) );
|
||||
|
||||
foreach( $categories as $category ) {
|
||||
if ($category->slug != "chapters") {
|
||||
if ($category->slug != "blog" && $category->slug != "chapters") {
|
||||
echo '<li><a class="menu-element" href="' . get_category_link($category->term_id) . '">' . $category->name . '<span class="menu-label label-secondary">'. $category->count . '</span></a></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
}?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,5 @@
|
|||
<?php include(TEMPLATEPATH . '/components/footer-content.php'); ?>
|
||||
<?php wp_footer(); ?>
|
||||
<script src="<?php echo get_template_directory_uri();?>/js/trim.js"></script>
|
||||
<script src="<?php echo get_template_directory_uri();?>/js/prettylinks.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
add_action( 'init', 'kspace_post_supports' );
|
||||
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
set_post_thumbnail_size( 825, 825, true );
|
||||
set_post_thumbnail_size( 825, 510, true );
|
||||
|
||||
/* 1. Niveau support
|
||||
*
|
||||
|
@ -316,25 +316,8 @@ register_taxonomy('roman', 'post',
|
|||
'top-navbar-2' => __( 'Navbar (droite)' ),
|
||||
'link-menu' => __( 'Liste des liens' ),
|
||||
'footer-pages' => __( 'Pages dans le footer' ),
|
||||
'social' => __( 'Reseaux sociaux' ),
|
||||
'social-plus' => __( 'Reseaux sociaux supplémentaires' ),
|
||||
'social' => __( 'Reseaux sociaux' )
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'wpb_custom_new_menu' );
|
||||
|
||||
//estimated reading time
|
||||
function reading_time() {
|
||||
$content = get_post_field( 'post_content', $post->ID );
|
||||
$word_count = str_word_count( strip_tags( $content ) );
|
||||
$readingtime = ceil($word_count / 200);
|
||||
|
||||
if ($readingtime == 1) {
|
||||
$timer = " minute";
|
||||
} else {
|
||||
$timer = " minutes";
|
||||
}
|
||||
$totalreadingtime = $readingtime . $timer;
|
||||
|
||||
return $totalreadingtime;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
var length = 35;
|
||||
|
||||
$(function(){
|
||||
$(".pretty-link").each(function(i){
|
||||
var str = $(this).text().replace("https://", "");
|
||||
$(this).text(str);
|
||||
});
|
||||
});
|
|
@ -1,60 +0,0 @@
|
|||
<?php /* Template Name: page-links */ ?>
|
||||
<?php get_header(); ?> <!-- ouvrir header,php -->
|
||||
<main>
|
||||
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
|
||||
|
||||
<article class="article-content" id="post-<?php the_ID(); ?>">
|
||||
<h1 class="page-title"><?php the_title(); ?></h1>
|
||||
|
||||
<div class="article-body mb-2">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<div class="card card-primary">
|
||||
<h2 class="card-header">Liste de mes réseaux sociaux</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-info">Réseau social</th>
|
||||
<th class="text-right text-info">Lien</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$listmenu = get_nav_menu_locations();
|
||||
$menu = wp_get_nav_menu_items($listmenu['social']);
|
||||
if ($menu != null) {
|
||||
foreach ($menu as $menuElement) {
|
||||
?>
|
||||
<tr>
|
||||
<th><i class="fa fa-fw fa-<?php echo $menuElement->title; ?>" aria-hidden="true"></i> <span class="text-maj"><?php echo $menuElement->title; ?></span></th>
|
||||
<td class="text-right"><a class="pretty-link" href="<?php echo $menuElement->url; ?>"><?php echo $menuElement->url; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$listmenu = get_nav_menu_locations();
|
||||
$menu = wp_get_nav_menu_items($listmenu['social-plus']);
|
||||
if ($menu != null) {
|
||||
foreach ($menu as $menuElement) {
|
||||
?>
|
||||
<tr>
|
||||
<th><i class="fa fa-fw fa-<?php echo $menuElement->title; ?>" aria-hidden="true"></i> <span class="text-maj"><?php echo $menuElement->title; ?></span></th>
|
||||
<td class="text-right"><a class="pretty-link" href="<?php echo $menuElement->url; ?>"><?php echo $menuElement->url; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -132,10 +132,6 @@ article.maintext {
|
|||
padding-bottom: $lineheight;
|
||||
}
|
||||
|
||||
.wp-block-image {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
/* 2.3 - Titles */
|
||||
|
||||
@mixin newTitle($font, $size, $weight) {
|
||||
|
@ -329,7 +325,3 @@ th {
|
|||
&-info { @include table-color($color-info); }
|
||||
&-success { @include table-color($color-success); }
|
||||
}
|
||||
|
||||
.text-maj {
|
||||
text-transform: capitalize;
|
||||
}
|
|
@ -138,9 +138,8 @@ $preview-height: 8*$lineheight;
|
|||
text-align:center;
|
||||
margin:auto;
|
||||
padding:auto;
|
||||
display: flex;
|
||||
display: block;
|
||||
width:100%;
|
||||
height: $preview-height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
11
style.css
11
style.css
|
@ -388,9 +388,6 @@ ul, ol {
|
|||
article.maintext {
|
||||
padding-bottom: 1.5rem; }
|
||||
|
||||
.wp-block-image {
|
||||
text-align: center; }
|
||||
|
||||
/* 2.3 - Titles */
|
||||
h1, h2, h3, h4, h5, h6, h7 {
|
||||
font-family: Open Sans, sans-serif;
|
||||
|
@ -588,9 +585,6 @@ th {
|
|||
.table-success th {
|
||||
color: #859900; }
|
||||
|
||||
.text-maj {
|
||||
text-transform: capitalize; }
|
||||
|
||||
/* --- 03. GLOBAL STYLING --- */
|
||||
/*
|
||||
* Les styles "globaux" touchant toute la page.
|
||||
|
@ -1880,9 +1874,8 @@ ul.breadcrumb, ol.breadcrumb, .breadcrumb {
|
|||
text-align: center;
|
||||
margin: auto;
|
||||
padding: auto;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 12rem; }
|
||||
display: block;
|
||||
width: 100%; }
|
||||
|
||||
.preview-metadata {
|
||||
color: #fdf6e3;
|
||||
|
|
Reference in a new issue