first commit
This commit is contained in:
58
templates_user/articles/articles-list.php
Normal file
58
templates_user/articles/articles-list.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<? global $lang;?><div class="row">
|
||||
<? if ( is_array( $this -> articles ) ): foreach( $this -> articles as $article ):?>
|
||||
<div class="col-md-6"> <div class="article-list">
|
||||
<?
|
||||
$article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );
|
||||
?>
|
||||
<div class="img">
|
||||
<img src="<?= \front\factory\Articles::get_image( $article );?>" alt="">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<? if ( $article['tags'] ):
|
||||
echo '<div class="article-tags">';
|
||||
echo '<ul>';
|
||||
foreach ( $article['tags'] as $tag ):
|
||||
echo '<li>';
|
||||
echo '<a href="/tag,' . \S::seo( $tag ) . '">' . $tag . '</a>';
|
||||
echo '</li>';
|
||||
endforeach;
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
endif;
|
||||
?>
|
||||
<div class="article-content">
|
||||
<h3 class="article-title">
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $article['language']['title'];?></a>
|
||||
</h3>
|
||||
<div class="entry">
|
||||
<?
|
||||
$content = $article['language']['entry'];
|
||||
$content = preg_replace( "/<img[^>]+\>/i", "", $content );
|
||||
$content = preg_replace( "/<p[^>]*?><\/p>/", "", $content );
|
||||
echo $content;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" class="more" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>>Chcę czytać dalej <img alt="" src="/upload/filemanager/icons/right-yellow.svg"></a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user