first commit
This commit is contained in:
52
templates_user/articles/news.php
Normal file
52
templates_user/articles/news.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<? global $lang, $config, $settings;?>
|
||||
<div id="news">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>
|
||||
PORADNIK
|
||||
</h2>
|
||||
<h6>
|
||||
Zapoznaj się z artykułami, które dla Ciebie przygotowaliśmy i dowiedz się więcej o świecie okien i drzwi.
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<? foreach ( $this -> articles as $article ):?>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<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 ) ):?>
|
||||
<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">
|
||||
<img src="<?= $img;?>" alt="">
|
||||
</a>
|
||||
<? 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 class="article-content">
|
||||
<a class="title" 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>
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<?
|
||||
$content = $article[ 'language' ][ 'entry' ];
|
||||
$content = preg_replace( "/<img[^>]+\>/i", "", $content );
|
||||
$content = preg_replace( "/<p[^>]*?><\/p>/", "", $content );
|
||||
echo $content;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<a class="more" 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;?>>Czytaj dalej</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user