Browse Source

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
maTh 2 years ago
parent
commit
bf68205ae3

+ 21 - 20
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>

+ 0 - 2
p/themes/Alternative-Dark/adark.css

@@ -951,9 +951,7 @@ kbd {
 }
 
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: var(--font-color-dark);
-	font-size: 90%;
 }
 
 #stream-footer {

+ 0 - 2
p/themes/Alternative-Dark/adark.rtl.css

@@ -951,9 +951,7 @@ kbd {
 }
 
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: var(--font-color-dark);
-	font-size: 90%;
 }
 
 #stream-footer {

+ 0 - 2
p/themes/Ansum/_reader-view.scss

@@ -13,9 +13,7 @@
 			border: none;
 
 			.author {
-				margin: 0 0 10px;
 				color: variables.$grey-medium-dark;
-				font-size: 90%;
 			}
 		}
 	}

+ 0 - 2
p/themes/Ansum/ansum.css

@@ -1111,9 +1111,7 @@ main.prompt {
 	border: none;
 }
 #stream.reader .flux .content .author {
-	margin: 0 0 10px;
 	color: #ba9;
-	font-size: 90%;
 }
 
 /*=== Configuration pages */

+ 0 - 2
p/themes/Ansum/ansum.rtl.css

@@ -1111,9 +1111,7 @@ main.prompt {
 	border: none;
 }
 #stream.reader .flux .content .author {
-	margin: 0 0 10px;
 	color: #ba9;
-	font-size: 90%;
 }
 
 /*=== Configuration pages */

+ 0 - 2
p/themes/Flat/flat.css

@@ -866,9 +866,7 @@ th {
 }
 
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: #999;
-	font-size: 90%;
 }
 
 /*=== GLOBAL VIEW */

+ 0 - 2
p/themes/Flat/flat.rtl.css

@@ -866,9 +866,7 @@ th {
 }
 
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: #999;
-	font-size: 90%;
 }
 
 /*=== GLOBAL VIEW */

+ 0 - 2
p/themes/Mapco/_reader-view.scss

@@ -13,9 +13,7 @@
 			border: none;
 
 			.author {
-				margin: 0 0 10px;
 				color: variables.$grey-medium-dark;
-				font-size: 90%;
 			}
 		}
 	}

+ 0 - 2
p/themes/Mapco/mapco.css

@@ -1126,9 +1126,7 @@ main.prompt {
 	border: none;
 }
 #stream.reader .flux .content .author {
-	margin: 0 0 10px;
 	color: #a6a7ae;
-	font-size: 90%;
 }
 
 /*=== Configuration pages */

+ 0 - 2
p/themes/Mapco/mapco.rtl.css

@@ -1126,9 +1126,7 @@ main.prompt {
 	border: none;
 }
 #stream.reader .flux .content .author {
-	margin: 0 0 10px;
 	color: #a6a7ae;
-	font-size: 90%;
 }
 
 /*=== Configuration pages */

+ 0 - 5
p/themes/Nord/nord.css

@@ -1200,11 +1200,6 @@ optgroup::before {
 	border-radius: 12px;
 }
 
-#stream.reader .flux .author {
-	margin: 0 0 10px;
-	font-size: 90%;
-}
-
 /*=== GLOBAL VIEW */
 /*================*/
 .box.category .box-title .title {

+ 0 - 5
p/themes/Nord/nord.rtl.css

@@ -1200,11 +1200,6 @@ optgroup::before {
 	border-radius: 12px;
 }
 
-#stream.reader .flux .author {
-	margin: 0 0 10px;
-	font-size: 90%;
-}
-
 /*=== GLOBAL VIEW */
 /*================*/
 .box.category .box-title .title {

+ 0 - 2
p/themes/Origine/origine.css

@@ -1007,9 +1007,7 @@ a:hover .icon {
 }
 
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: var(--font-color-grey);
-	font-size: 90%;
 }
 
 /*=== GLOBAL VIEW */

+ 0 - 2
p/themes/Origine/origine.rtl.css

@@ -1007,9 +1007,7 @@ a:hover .icon {
 }
 
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: var(--font-color-grey);
-	font-size: 90%;
 }
 
 /*=== GLOBAL VIEW */

+ 0 - 2
p/themes/Pafat/pafat.css

@@ -982,9 +982,7 @@ a.signin {
 }
 
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: var(--font-color-grey);
-	font-size: 90%;
 }
 
 /*=== GLOBAL VIEW */

+ 0 - 2
p/themes/Pafat/pafat.rtl.css

@@ -982,9 +982,7 @@ a.signin {
 }
 
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: var(--font-color-grey);
-	font-size: 90%;
 }
 
 /*=== GLOBAL VIEW */

+ 2 - 4
p/themes/Swage/swage.css

@@ -157,8 +157,8 @@ th {
 	background-color: var(--color-background-light);
 }
 
-.config-articleicons td,
-.config-articleicons th {
+form td,
+form th {
 	font-weight: normal;
 	text-align: center;
 }
@@ -1154,9 +1154,7 @@ button.as-link {
 	border-color: var(--color-border-grey);
 }
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: var(--color-text-light-darker);
-	font-size: 90%;
 }
 
 #nav_menu_actions ul.dropdown-menu {

+ 2 - 4
p/themes/Swage/swage.rtl.css

@@ -157,8 +157,8 @@ th {
 	background-color: var(--color-background-light);
 }
 
-.config-articleicons td,
-.config-articleicons th {
+form td,
+form th {
 	font-weight: normal;
 	text-align: center;
 }
@@ -1154,9 +1154,7 @@ button.as-link {
 	border-color: var(--color-border-grey);
 }
 #stream.reader .flux .author {
-	margin: 0 0 10px;
 	color: var(--color-text-light-darker);
-	font-size: 90%;
 }
 
 #nav_menu_actions ul.dropdown-menu {

+ 0 - 2
p/themes/Swage/swage.scss

@@ -1474,9 +1474,7 @@ button.as-link {
 	}
 
 	.author {
-		margin: 0 0 10px;
 		color: var(--color-text-light-darker);
-		font-size: 90%;
 	}
 }
 

+ 0 - 5
p/themes/base-theme/base.css

@@ -652,11 +652,6 @@ th {
 	border-color: #ddd;
 }
 
-#stream.reader .flux .author {
-	margin: 0 0 10px;
-	font-size: 90%;
-}
-
 /*=== GLOBAL VIEW */
 /*================*/
 .box.category .box-title .title {

+ 0 - 5
p/themes/base-theme/base.rtl.css

@@ -652,11 +652,6 @@ th {
 	border-color: #ddd;
 }
 
-#stream.reader .flux .author {
-	margin: 0 0 10px;
-	font-size: 90%;
-}
-
 /*=== GLOBAL VIEW */
 /*================*/
 .box.category .box-title .title {