65 lines
2.3 KiB
PHP
65 lines
2.3 KiB
PHP
<? global $lang, $config, $settings;?>
|
|
<!-- <div id="news">
|
|
<div class="content">
|
|
<div class="row">
|
|
<? foreach ( $this -> articles as $article ):?>
|
|
<div class="col-xs-12 col-md-6 col-lg-4 col-xl-3">
|
|
<div class="article">
|
|
<? $article[ 'language' ][ 'seo_link' ] ? $url = $article[ 'language' ][ 'seo_link' ] : $url = 'a-' . $article[ 'id' ] . '-' . \S::seo( $article[ 'language' ][ 'title' ] );?>
|
|
<? if ( $img = \front\factory\Articles::get_image( $article ) ):?>
|
|
<img src="<?= $img;?>" alt="">
|
|
<? else:?>
|
|
<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="img"></a>
|
|
<? endif;?>
|
|
</div>
|
|
</div>
|
|
<? endforeach;?>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
|
|
<div id="news">
|
|
<div class="content">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<?
|
|
foreach ( $this -> articles as $key => $article ) {
|
|
if( $key == 1) echo '<div class="blog-list-masonry">';
|
|
|
|
if($key == 0) {
|
|
$tpl = new \Tpl;
|
|
$tpl -> page_id = $this -> page_id;
|
|
$tpl -> article = $article;
|
|
$tpl -> element_id = $key;
|
|
echo '<div class="blog-first-box">';
|
|
echo $tpl -> render( '__partials/article-entry-custom' );
|
|
include 'templates_user/blog-newsletter-v2.php';
|
|
echo '</div>';
|
|
} else {
|
|
if ( $article['password'] and !\S::get_session( 'article-' . $article['id'] . '-' . $article['password'] ) )
|
|
echo \front\view\Articles::password_view( [ 'article' => $article ] );
|
|
else
|
|
{
|
|
$tpl = new \Tpl;
|
|
$tpl -> page_id = $this -> page_id;
|
|
$tpl -> article = $article;
|
|
$tpl -> element_id = $key;
|
|
echo $tpl -> render( '__partials/article-entry-custom' );
|
|
}
|
|
}
|
|
|
|
if( $key == count($this -> articles) - 1) echo '</div>';
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-12 text-center mt-5 pt-4">
|
|
<a href="/blog" class="btn1">Więcej artykułów</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|