fix languages

This commit is contained in:
Dennis Eichhorn 2021-02-07 15:03:40 +01:00
parent 40ec874200
commit 0988004c07
2 changed files with 8 additions and 3 deletions

View File

@ -36,8 +36,13 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->getHtml('Author'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Date'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<?php $count = 0; foreach ($articles as $key => $news) : ++$count; $url = UriFactory::build('{/prefix}news/article?{?}&id=' . $news->getId());
$color = 'darkred';
<?php
$count = 0;
foreach ($articles as $key => $news) : ++$count;
$url = UriFactory::build('{/prefix}news/article?{?}&id=' . $news->getId());
$color = 'darkred';
if ($news->getType() === NewsType::ARTICLE) { $color = 'green'; }
elseif ($news->getType() === NewsType::HEADLINE) { $color = 'purple'; }
elseif ($news->getType() === NewsType::LINK) { $color = 'yellow'; }

View File

@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
<?php $tags = $news->getTags(); foreach ($tags as $tag) : ?>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getTitle()); ?></span>
<?php endforeach; ?>
<a tabindex="0" href="<?= $url; ?>" class="button floatRight">More</a>
<a tabindex="0" href="<?= $url; ?>" class="button floatRight"><?= $this->getHtml('More', '0', '0'); ?></a>
</div>
</div>
</div>