first commit
This commit is contained in:
75
templates/articles/news.php
Normal file
75
templates/articles/news.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<? global $lang, $config, $settings;?>
|
||||
<div id="news">
|
||||
<div id="title">Aktualności</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div id="article-main">
|
||||
<?
|
||||
$this -> articles[0]['language']['seo_link'] ? $url = $this -> articles[0]['language']['seo_link'] : $url = 'a-' . $this -> articles[0]['id'] . '-' . \S::seo( $this -> articles[0]['language']['title'] );
|
||||
|
||||
if ( $this -> articles[0]['show_title'] ):
|
||||
?>
|
||||
<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="<?= $this -> articles[0]['language']['title'];?>" <? if ( $this -> articles[0]['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> articles[0]['language']['title'];?></a>
|
||||
</h3>
|
||||
<?
|
||||
endif;
|
||||
|
||||
if ( $this -> articles[0]['show_date_add'] )
|
||||
echo '<div class="date-add">' . $lang['data-dodania'] . ': ' . $this -> articles[0]['date_add'] . '</div>';
|
||||
|
||||
if ( $this -> articles[0]['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> articles[0]['date_modify'] . '</div>';
|
||||
|
||||
?>
|
||||
<div class="entry">
|
||||
<?
|
||||
if ( $this -> articles[0]['language']['entry'] )
|
||||
{
|
||||
echo $this -> articles[0]['language']['entry'];
|
||||
|
||||
if ( $this -> articles[0]['language']['text'] )
|
||||
$more = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $this -> articles[0]['language']['text'];
|
||||
|
||||
$more = false;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<? if ( $more ):?>
|
||||
<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="<?= $this -> articles[0]['language']['title'];?>" <? if ( $this -> articles[0]['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $lang['wiecej'];?></a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<? for ( $i = 1; $i < $settings['news_limit']; $i++ ):?>
|
||||
<? if ( !empty( $this -> articles[$i] ) ):?>
|
||||
<div class="article-list">
|
||||
<?
|
||||
$this -> articles[$i]['language']['seo_link'] ? $url = $this -> articles[$i]['language']['seo_link'] : $url = 'a-' . $this -> articles[$i]['id'] . '-' . \S::seo( $this -> articles[$i]['language']['title'] );
|
||||
|
||||
if ( $this -> articles[$i]['show_title'] ):
|
||||
?>
|
||||
<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="<?= $this -> articles[$i]['language']['title'];?>" <? if ( $this -> articles[$i]['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> articles[$i]['language']['title'];?></a>
|
||||
</h3>
|
||||
<?
|
||||
endif;
|
||||
|
||||
if ( $this -> articles[$i]['show_date_add'] )
|
||||
echo '<div class="date-add">' . $lang['data-dodania'] . ': ' . $this -> articles[$i]['date_add'] . '</div>';
|
||||
|
||||
if ( $this -> articles[$i]['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> articles[$i]['date_modify'] . '</div>';
|
||||
|
||||
?>
|
||||
<? if ( $more ):?>
|
||||
<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="<?= $this -> articles[$i]['language']['title'];?>" <? if ( $this -> articles[$i]['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $lang['wiecej'];?></a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endfor;?>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user