first commit
This commit is contained in:
77
templates_user/articles/news.php
Normal file
77
templates_user/articles/news.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<? global $lang, $config, $settings; ?>
|
||||
<? if ( $this->articles[0] ):?>
|
||||
<div id="news">
|
||||
<div id="title">Aktualności</div>
|
||||
<div class="news-container">
|
||||
<div class="big-article">
|
||||
<div id="article-main">
|
||||
<? $main_img = \front\factory\Articles::get_image($this->articles[0]); ?>
|
||||
<? $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']); ?>
|
||||
|
||||
<a class = "big-article-link" 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; ?>></a>
|
||||
<div class="img"><img src="<?= $main_img; ?>" alt=""></div>
|
||||
<div class="content-container">
|
||||
<?
|
||||
if ($this->articles[0]['show_date_add'])
|
||||
echo '<div class="date-add"> <i class="fa fa-clock-o" aria-hidden="true"></i>' . date('Y-m-d', strtotime($this->articles[0]['date_add'])) . '</div>';
|
||||
|
||||
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; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="small-articles">
|
||||
<? for ($i = 1; $i < 3; $i++) : ?>
|
||||
<? if (!empty($this->articles[$i])) : ?>
|
||||
<? $main_img = \front\factory\Articles::get_image($this->articles[$i]); ?>
|
||||
<? $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']); ?>
|
||||
<div class="small-article">
|
||||
<div class="img">
|
||||
<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; ?>><img src="<?= $main_img; ?>" alt=""></a>
|
||||
</div>
|
||||
<div class="content-container">
|
||||
<?
|
||||
if ($this->articles[$i]['show_date_add'])
|
||||
echo '<div class="date-add"> <i class="fa fa-clock-o" aria-hidden="true"></i>' . date('Y-m-d', strtotime($this->articles[$i]['date_add'])) . '</div>';
|
||||
|
||||
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;
|
||||
|
||||
?>
|
||||
<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>
|
||||
<? endif; ?>
|
||||
<? endfor; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
Reference in New Issue
Block a user