Skip to content

Commit d013e1d

Browse files
wofferlGrotax
authored andcommitted
feat: show intro and date if enough space in compact mode
Signed-off-by: Wolfgang <[email protected]>
1 parent 0f8c285 commit d013e1d

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ You can also check [on GitHub](https://github.com/nextcloud/news/releases), the
77
# Unreleased
88
## [26.x.x]
99
### Changed
10+
- show intro and date if enough space in compact mode
1011

1112

1213
### Fixed

src/components/feed-display/FeedItemRow.vue

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@
3232
<div class="main-container" :class="{ compact: compactMode }">
3333
<h1
3434
class="title-container"
35-
:class="{ compact: compactMode && !verticalSplit, unread: item.unread }"
35+
:class="{ compact: compactMode, unread: item.unread }"
3636
:dir="item.rtl && 'rtl'">
3737
{{ item.title }}
3838
</h1>
3939

4040
<div class="intro-container" :class="{ compact: compactMode }">
4141
<!-- eslint-disable vue/no-v-html -->
42-
<span v-if="!compactMode || !verticalSplit" class="intro" v-html="item.intro" />
42+
<span class="intro" v-html="item.intro" />
4343
<!--eslint-enable-->
4444
</div>
4545

46-
<div v-if="!compactMode || !verticalSplit" class="date-container" :class="{ compact: compactMode }">
46+
<div class="date-container" :class="{ compact: compactMode }">
4747
<time class="date" :title="formatDate(item.pubDate)" :datetime="formatDateISO(item.pubDate)">
4848
{{ formatDateRelative(item.pubDate) }}
4949
</time>
@@ -220,6 +220,7 @@ export default defineComponent({
220220
}
221221
222222
.feed-item-row.compact {
223+
container-type: inline-size;
223224
display: flex; padding: 4px 4px !important;
224225
border-bottom: 1px solid var(--color-border);
225226
}
@@ -237,7 +238,7 @@ export default defineComponent({
237238
}
238239
239240
.feed-item-row .link-container {
240-
padding-right: 12px;
241+
padding-inline-end: 12px;
241242
display: flex;
242243
flex-direction: row;
243244
align-self: center;
@@ -319,10 +320,18 @@ export default defineComponent({
319320
white-space: nowrap;
320321
}
321322
322-
.feed-item-row .date-container.compact {
323-
flex: 0 0 auto;
324-
font-size: small;
325-
padding-right: 4px;
323+
@container (min-width: 500px) {
324+
.feed-item-row .date-container.compact {
325+
flex: 0 0 auto;
326+
font-size: small;
327+
padding-inline-end: 4px;
328+
}
329+
}
330+
331+
@container (max-width: 499px) {
332+
.feed-item-row .date-container.compact {
333+
display: none;
334+
}
326335
}
327336
328337
.feed-item-row .button-container {

0 commit comments

Comments
 (0)