Skip to content

Commit

Permalink
client: Make show_thumbnails=0 show thumbnail in expanded items
Browse files Browse the repository at this point in the history
#1022 added support for not showing thumbnails in the entry list. Unfortunately, that removed them altogether.

This patch shows them again when an article is expanded.
  • Loading branch information
jtojnar committed Feb 20, 2021
1 parent 8cec05c commit 3c219f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/templates/Item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ export default function Item({ item, selected, expanded, setNavExpanded }) {
: null}

{/* thumbnail */}
{selfoss.config.showThumbnails && item.thumbnail && item.thumbnail.trim().length > 0 ?
<div className="entry-thumbnail">
{item.thumbnail && item.thumbnail.trim().length > 0 ?
<div className={classNames({'entry-thumbnail': true, 'entry-thumbnail-always-visible': selfoss.config.showThumbnails})}>
<a href={anonymize(item.link)} target="_blank" rel="noopener noreferrer">
<img src={`thumbnails/${item.thumbnail}`} alt={item.strippedTitle} />
</a>
Expand Down
4 changes: 4 additions & 0 deletions assets/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ span.offline-count.diff {
margin: 0 10px 5px 0;
}

.entry:not(.expanded) .entry-thumbnail:not(.entry-thumbnail-always-visible) {
display: none;
}

.entry:not(.expanded) .entry-content,
.entry:not(.expanded) .entry-toolbar {
display: none;
Expand Down

0 comments on commit 3c219f6

Please # to comment.