2013-10-21 09:35:06 +02:00
< div id = "welcome" >
2013-10-19 13:38:20 +02:00
< h1 > <?php echo $this -> config -> main -> title ?> </ h1 >
< p >
< span > serving <?php echo $this -> context -> transport -> postCount ?> posts</ span >
< / p >
< / div >
<?php if ( ! empty ( $this -> context -> featuredPost )) : ?>
2013-10-21 09:35:06 +02:00
< div class = "body" >
< a href = " <?php echo \Chibi\UrlHelper :: route ( 'post' , 'view' , [ 'id' => $this -> context -> featuredPost -> id ]) ?> " >
2013-11-10 12:23:59 +01:00
< img title = "Featured image" src = " <?php echo \Chibi\UrlHelper :: route ( 'post' , 'retrieve' , [ 'name' => $this -> context -> featuredPost -> name ]) ?> " alt = " <?php echo $this -> context -> featuredPost -> name ?> " />
2013-10-21 09:35:06 +02:00
< / a >
< / div >
2013-10-19 13:38:20 +02:00
2013-10-21 09:35:06 +02:00
< div class = "footer" >
2013-11-18 14:00:54 +01:00
< div class = "left" >
2013-11-10 12:23:59 +01:00
Tags:
< ul class = "tags" >
<?php foreach ( $this -> context -> featuredPost -> sharedTag as $tag ) : ?>
< li >
< a href = " <?php echo \Chibi\UrlHelper :: route ( 'post' , 'list' , [ 'query' => $tag -> name ]) ?> " >
<?php echo $tag -> name ?>
< / a >
< / li >
<?php endforeach ?>
< / ul >
2013-11-18 14:00:54 +01:00
< / div >
2013-11-10 12:23:59 +01:00
2013-11-18 14:00:54 +01:00
< div class = "right" >
2013-11-10 12:23:59 +01:00
Featured 
<?php if ( $this -> context -> featuredPostUser ) : ?>
by < a href = " <?php echo \Chibi\UrlHelper :: route ( 'user' , 'view' , [ 'name' => $this -> context -> featuredPostUser -> name ]) ?> " > <?php echo $this -> context -> featuredPostUser -> name ?> </ a > , 
<?php endif ?>
<?php $x = round (( time () - $this -> context -> featuredPostDate ) / ( 24 * 3600. )) ?>
<?php if ( $x == 0 ) : ?>
today
<?php elseif ( $x == 1 ) : ?>
yesterday
<?php else : ?>
<?php printf ( '%d days ago' , $x ) ?>
<?php endif ?>
2013-11-18 14:00:54 +01:00
< / div >
2013-11-10 12:23:59 +01:00
2013-10-19 13:38:20 +02:00
< div class = "clear" > < / div >
< / div >
2013-10-21 09:35:06 +02:00
< div class = "clear" > < / div >
2013-10-19 13:38:20 +02:00
<?php endif ?>