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" >
2013-11-23 00:11:06 +01:00
<?php $this -> context -> imageLink = \Chibi\UrlHelper :: route ( 'post' , 'view' , [ 'id' => $this -> context -> featuredPost -> id ]) ?>
<?php $this -> context -> transport -> post = $this -> context -> featuredPost ?>
<?php echo $this -> renderFile ( 'post-file-render' ) ?>
2013-10-21 09:35:06 +02:00
< / 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" >
2013-12-18 15:10:53 +01:00
<?php $tags = $this -> context -> featuredPost -> getTags () ?>
2013-12-14 16:55:07 +01:00
<?php uasort ( $tags , function ( $a , $b ) { return strnatcasecmp ( $a -> name , $b -> name ); }) ?>
<?php foreach ( $tags as $tag ) : ?>
< li >
< a href = " <?php echo \Chibi\UrlHelper :: route ( 'post' , 'list' , [ 'query' => $tag -> name ]) ?> " >
<?php echo $tag -> name ?>
< / a >
< / li >
<?php endforeach ?>
2013-11-10 12:23:59 +01:00
< / 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 ?>