FEATURE: Add links to subcategories page on category page (#29474)

This applies only to the optimized category page style.
This commit is contained in:
Bianca Nenciu
2024-10-29 20:47:46 +02:00
committed by GitHub
parent 81647a4c53
commit fda0a5b2cb
4 changed files with 38 additions and 0 deletions
@@ -28,6 +28,16 @@
{{dir-span this.category.description_excerpt htmlSafe="true"}}
</div>
{{/if}}
{{#if (gt this.category.subcategories.length 0)}}
<div class="category-subcategories">
<LinkTo @route="discovery.subcategories" @model={{this.slugPath}}>
{{i18n
"category_row.subcategory_count"
count=this.category.subcategories.length
}}
</LinkTo>
</div>
{{/if}}
</td>
<td class="topics">
@@ -23,6 +23,18 @@
</td>
</tr>
{{/if}}
{{#if (gt this.category.subcategories.length 0)}}
<tr class="category-subcategories">
<td colspan="3">
<LinkTo @route="discovery.subcategories" @model={{this.slugPath}}>
{{i18n
"category_row.subcategory_count"
count=this.category.subcategories.length
}}
</LinkTo>
</td>
</tr>
{{/if}}
</tbody>
</table>
</div>
@@ -314,6 +314,14 @@
overflow: hidden;
color: var(--primary-high);
}
.category-subcategories {
font-size: var(--font-down-1);
margin-top: 0.5em;
a {
color: var(--primary-high);
}
}
.category-logo.aspect-image {
margin-top: 0.5em;
}
@@ -265,6 +265,14 @@ tr.category-topic-link {
padding-bottom: 15px;
}
.category-subcategories td {
padding-top: 0;
}
.category-description + .category-subcategories td {
padding-top: 0;
}
.subcategories-list {
border-bottom: none;
td {