Skip to content

Commit

Permalink
#278156 Improve icmaa-blog headlines (#950)
Browse files Browse the repository at this point in the history
  • Loading branch information
cewald authored Oct 4, 2023
1 parent 4bc9999 commit d635d2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/modules/icmaa-blog/components/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div>
<slot>
<CategoryHeadline
v-if="category || headline"
:category="category || { name: headline }"
v-if="aggrHeadline"
:category="aggrHeadline"
:level="headlineLevel"
/>
</slot>
Expand Down Expand Up @@ -124,6 +124,11 @@ export default {
}
},
computed: {
aggrHeadline () {
if (this.headline && this.headline !== '') return { ...this.category, name: this.headline }
if (this.category) return this.category
return null
},
showPrevPagination (): boolean {
if (!this.pagination) return false
const { start } = this.pagination
Expand Down
2 changes: 1 addition & 1 deletion src/modules/icmaa-blog/components/ListCategoryHeadline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class="t-mb-4 t-flex t-flex-wrap t-items-baseline t-pr-2 t-text-xl t-text-base-dark"
>
<router-link
v-if="!isBlogPage"
v-if="!isBlogPage && category.url"
:to="localizedRoute(category.url === 'root' ? { name: 'icmaa-blog-home' } : { name: 'icmaa-blog', params: { identifier: category.url } })"
:title="$t('Show all articles')"
class="hover:t-underline"
Expand Down

0 comments on commit d635d2e

Please sign in to comment.