Skip to content
Snippets Groups Projects
Verified Commit 3e5656d3 authored by David Beniamine's avatar David Beniamine
Browse files

Better articles presentation

parent 1aa1ff5c
Branches
No related tags found
No related merge requests found
<?php theme_include('header'); ?>
<section class="content wrap" id="article-<?php echo article_id(); ?>">
<div class="row">
<div class="col-md-6 col-sd-12">
<div class="row" style="padding:70px">
<div class="col-md-4 col-sd-12">
<?php echo article_img(article_slug());?>
</div>
<div class="col-md-6 col-sd-12">
<h1>
<div class="col-md-8 col-sd-12">
<h2>
<?php echo article_title(); ?>
</h1>
</h2>
</div>
</div>
<article>
......
......@@ -21,6 +21,7 @@ h2{
padding: 20px 35px;
margin: 20px;
background: #fff;
border-bottom: 1px solid rgba(22,54,36,.1);
}
#top a {
float: left;
......@@ -31,7 +32,7 @@ h2{
color: #88a795;
}
#top #logo:hover, #top ul a:hover, #top ul .active a, .posts .items li:first-child h2 a:hover, p a:hover {
#top #logo:hover, #top ul a:hover, #top ul .active a, .posts .items li h2 a:hover, p a:hover {
color: #41b171;
}
#top ul {
......@@ -73,19 +74,11 @@ h2{
list-style: none;
}
.items > li {
padding: 70px 0 60px;
border-bottom: 1px solid;
padding: 50px 0 50px;
border-top: 1px solid;
#color: #97c9ae;
#background: #3c4552;
}
.posts .items > li:first-child {
#background: #fff !important;
padding: 110px 0;
}
.items li h1 a, .posts .items > li:first-child h2 a {
color: #3d5145;
}
.items h1 {
padding: 0 0 8px;
}
......@@ -101,7 +94,7 @@ h2{
padding-bottom: 12px;
color: #fff;
color: rgba(176,236,200,.8);
color: #3d5145;
text-decoration: none;
}
......
......@@ -2,29 +2,22 @@
<section class="content">
<?php
$title="Blog";
$title="";
$text="";
if (preg_match('/category.*/',current_url())){
echo "<p id='".current_url()."'></p>";
while(categories()){
echo "<p id='".category_url()."'></p>";
if(category_url() == "/".current_url()){
$title.=" - ".category_title();
$text="<div class='wrap'><p>".category_description()."</p>";
$text.="<p>Cette catégorie regroupe ".category_count()." ".pluralise(category_count(), "article", "s")."</p></div>";
$title.="".category_title();
$text=' <span style="font-size:large"> - '.category_description()."</span>";
}
}
echo '<h1 >'.$title.$text."</h1>\n";
}
echo "<h1 style='text-align:center'>$title</h1>\n";
echo $text;
?>
<?php if(has_posts()): ?>
<?php posts(); ?>
<h2> Dernier article </h2>
<?php include("single_article.php"); ?>
<?php if(total_posts() > 1 || $title=="Blog"):?>
<h2> Articles précédents </h2>
<?php if(total_posts() > 0 || $title==""):?>
<ul class="items">
<?php $i = 0; while(posts()): ?>
<li >
......
......@@ -2,6 +2,15 @@
<div class="row">
<div class="col-md-6 col-sd-12">
<a href="<?php echo article_url(); ?>" title="<?php echo article_title(); ?>"><?php echo article_img(article_slug());?></a>
<div style="font-size:small;padding-top:15px">
<p>Article num&eacute;ro: <?php echo article_number(article_id()); ?>, <?php echo count_words(article_markdown()); ?> mots <?php if(comments_open()): ?>,
<?php echo total_comments();?> <?php echo pluralise(total_comments(), "commentaire", "s") ?>.<?php endif; ?> <?php echo article_custom_field('attribution'); ?><br />
Posté <time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo relative_time(article_time()); ?></time> par <?php echo article_author('real_name'); ?>.
</p>
</div>
</div>
<div class="col-md-6 col-sd-12">
<h2 style="padding:0px">
......@@ -11,10 +20,5 @@
<?php echo article_description(); ?>
</div>
</div>
<footer>
<p>Article num&eacute;ro: <?php echo article_number(article_id()); ?>, <?php echo count_words(article_markdown()); ?> mots <?php if(comments_open()): ?>,
<?php echo total_comments();?> <?php echo pluralise(total_comments(), "commentaire", "s") ?>.<?php endif; ?> <?php echo article_custom_field('attribution'); ?></p>
Posté <time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo relative_time(article_time()); ?></time> par <?php echo article_author('real_name'); ?>.
</footer>
</article>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment