diff --git a/article.php b/article.php index 1fa1f01585f84ef880dd2ca304ff1c565b4a72e4..72c9ae1c8fe240606ef6d56b3d1d8ad1a22e084b 100644 --- a/article.php +++ b/article.php @@ -20,9 +20,7 @@ <?php echo total_comments();?> <?php echo pluralise(total_comments(), "commentaire", "s") ?>.<?php endif; ?> <?php echo article_custom_field('attribution'); ?></p> <ul style="list-style:none;box-sizing:border-box"> <li style="float:left;padding:15px"><a href="<?php echo article_previous_url()?>">Article précédent</a></li> - <!-- <li style="float:left;padding:15px"><a href="<?php echo article_category_url()?>">Tous les articles de la catégorie <?php echo article_category();?></a></li> - --> <li style="float:left;padding:15px"><a href="<?php echo article_next_url()?>">Article suivant</a></li> </ul> </section> diff --git a/css/style.css b/css/style.css index 79c29ca0ef90f98f4ad98e154d8c8411dee454d5..e94177d302179b789be66cdf2c8ba99356e483a9 100644 --- a/css/style.css +++ b/css/style.css @@ -18,11 +18,9 @@ h2{ } #top { - overflow: hidden; padding: 20px 35px; margin: 20px; background: #fff; - border-bottom: 1px solid rgba(22,54,36,.1); } #top a { float: left; @@ -76,12 +74,13 @@ h2{ } .items > li { padding: 70px 0 60px; + border-bottom: 1px solid; - color: #97c9ae; - background: #3c4552; + #color: #97c9ae; + #background: #3c4552; } .posts .items > li:first-child { - background: #fff !important; + #background: #fff !important; padding: 110px 0; } .items li h1 a, .posts .items > li:first-child h2 a { @@ -151,6 +150,7 @@ h2{ */ .content { padding: 10px 0px; + border-top: 1px solid rgba(22,54,36,.1); } .content ul, .content ol, .items li ul { padding: 20px 30px; diff --git a/functions.php b/functions.php index 4ef37f51f3b9b7ff36d152d7ff4ade46e4c19b4c..ff6ae60fc81cd29c3ce3b399d3898300e895eab8 100644 --- a/functions.php +++ b/functions.php @@ -137,7 +137,22 @@ function build_menu($parent, $tree){ echo '</ul>'; echo '</li>'; }else{ - print_item($item, $class); + if(menu_name($item) == "Blog"){ + echo '<li class="dropdown '.$class.'"><a class="dropdown-toggle" data-toggle="dropdown" href="#">'.menu_name($item).'<span class="caret"></span></a>'; + echo '<ul class="dropdown-menu">'; + echo '<li><a href="'.menu_url($item).'" title="Tous les articles">'; + echo 'Tous les articles </a></li>'; + while(categories()){ + if(category_count() > 0 ){ + echo '<li><a href="'.category_url().'" title="'.category_title().'">'; + echo category_title().' </a></li>'; + } + } + echo '</ul>'; + echo '</li>'; + }else{ + print_item($item, $class); + } } } } diff --git a/posts.php b/posts.php index 6ac5730152703c34d71c2415de6e741b84ead3c9..0f69dc9665c592740e70d048cc62f34aa7bf6124 100644 --- a/posts.php +++ b/posts.php @@ -15,41 +15,36 @@ echo "<h1 style='text-align:center'>$title</h1>\n"; ?> <?php if(has_posts()): ?> - <ul class="items"> <?php posts(); ?> - <li> <h2> Dernier article </h2> <?php include("single_article.php"); ?> - </li> + <!-- <?php if (!preg_match('/category.*/',current_url())): ?> - <li id="<?php echo current_url();?>" style="background:none"> <h2> Catégories d'articles </h2> + <ul style="list-style:none"> <?php $i = 0; while(categories()): ?> - <?php $bg = sprintf('background: hsl(131, 6%%, %d%%);', round(50-(($i / total_categories()) * 20))); ?> <?php if(category_count() > 0 ):?> - <?php ++$i; ?> - <li style="<?php echo $bg; ?>"> + <li > <?php include("single_category.php"); ?> </li> <?php endif; ?> <?php endwhile; ?> - </li> + </ul> <?php endif; ?> - --> + --> <?php if(total_posts() > 1 || $title=="Blog"):?> - <li style="background:none"> <h2> Articles précédents </h2> + <ul class="items"> <?php $i = 0; while(posts()): ?> - <?php $bg = sprintf('background: hsl(131, 6%%, %d%%);', round(50-((++$i / posts_per_page()) * 20))); ?> - <li style="<?php echo $bg; ?>"> + <li > <?php include("single_article.php"); ?> </li> <?php endwhile; ?> </li> + </ul> <?php endif?> - </ul> <?php if(has_pagination()): ?> <nav class="pagination">