mirror of
https://github.com/discourse/discourse.git
synced 2025-04-11 13:42:57 +08:00
FEATURE: Add links to subcategories page on category page (#29474)
This applies only to the optimized category page style.
This commit is contained in:
parent
5cc531ed75
commit
9a80d71882
@ -28,6 +28,16 @@
|
|||||||
{{dir-span this.category.description_excerpt htmlSafe="true"}}
|
{{dir-span this.category.description_excerpt htmlSafe="true"}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/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>
|
||||||
|
|
||||||
<td class="topics">
|
<td class="topics">
|
||||||
|
@ -23,6 +23,18 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -314,6 +314,14 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: var(--primary-high);
|
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 {
|
.category-logo.aspect-image {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
|
@ -265,6 +265,14 @@ tr.category-topic-link {
|
|||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.category-subcategories td {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-description + .category-subcategories td {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.subcategories-list {
|
.subcategories-list {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
td {
|
td {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user