aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar maTh <1645099+math-GH@users.noreply.github.com> 2024-04-15 23:14:34 +0200
committerGravatar GitHub <noreply@github.com> 2024-04-15 23:14:34 +0200
commitbf68205ae3b04ceb927cd0fb98e12f19b1daac37 (patch)
tree4af463aea956fd496fcdecae56bea7a31c3f6fe4 /app
parentb22d9279bdf12ba4a2b0de911f123813a80a8691 (diff)
Improved: Reading view: author (#6289)
* move the margin from themes to frss.css + delete font-size * same source code as normal view for author information
Diffstat (limited to 'app')
-rw-r--r--app/views/helpers/index/article.phtml41
1 files changed, 21 insertions, 20 deletions
diff --git a/app/views/helpers/index/article.phtml b/app/views/helpers/index/article.phtml
index caf06359d..56fd06b4f 100644
--- a/app/views/helpers/index/article.phtml
+++ b/app/views/helpers/index/article.phtml
@@ -40,27 +40,28 @@
<?php if (FreshRSS_Context::userConf()->show_author_date === 'h' || FreshRSS_Context::userConf()->show_author_date === 'b') { ?>
<div class="subtitle">
<?php if (FreshRSS_Context::userConf()->show_feed_name === 'a') { ?>
- <div class="website"><a href="<?= $this->internal_rendering ? $feed->website() : _url('index', 'reader', 'get', 'f_' . $feed->id()) ?>" title="<?= _t('gen.action.filter') ?>">
- <?php if (FreshRSS_Context::userConf()->show_favicons): ?>
- <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php
- endif; ?><span><?= $feed->name() ?></span></a></div>
+ <div class="website">
+ <a href="<?= $this->internal_rendering ? $feed->website() : _url('index', 'reader', 'get', 'f_' . $feed->id()) ?>" title="<?= _t('gen.action.filter') ?>">
+ <?php if (FreshRSS_Context::userConf()->show_favicons): ?>
+ <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php
+ endif; ?><span><?= $feed->name() ?></span>
+ </a>
+ </div>
+ <?php }
+
+ $authors = $entry->authors();
+ if (!empty($authors) && is_array($authors)) {
+ ?>
+ <div class="author">
+ <?= _t('gen.short.by_author') ?>
+ <?php
+ foreach ($authors as $author) {
+ $href = Minz_Url::display(Minz_Request::modifiedCurrentRequest(['search' => 'author:"' . htmlspecialchars_decode($author, ENT_QUOTES) . '"']));
+ ?>
+ <a href="<?= $href ?>" title="<?= _t('gen.action.filter') ?>"><?= $author ?></a>
+ <?php } ?>
+ </div>
<?php } ?>
- <div class="author"><?php
- $authors = $entry->authors();
- if (is_array($authors)) {
- if ($this->internal_rendering):
- foreach ($authors as $author): ?>
- <?= $author ?>
- <?php endforeach;
- else:
- foreach ($authors as $author): ?>
- <a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(['search' => 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))])) ?>">
- <?= $author ?>
- </a>
- <?php endforeach;
- endif;
- } ?>
- </div>
<div class="date">
<time datetime="<?= $entry->machineReadableDate() ?>"><?= $entry->date() ?></time>
</div>