Fix conditional rendering of tag and category section (#2678)
### Overview This PR fixes an issue where unnecessary horizontal lines were displayed when there were no tags or categories present. The tag and category container is now conditionally rendered, ensuring it only appears when there are tags or categories to display. no tags meaning, in _config.yml ``` display_tags: [] display_categories: [] ``` ### Before and After The difference is illustrated in the images below: - **First Image (Fixed)**: Shows the correct behavior with no extra lines when tags or categories are absent. - **Second Image (Current)**: Demonstrates the issue with unwanted horizontal lines appearing when no tags or categories are present.   ### Impact This change improves the visual consistency and cleanliness of the theme by preventing unnecessary elements from being rendered, particularly in cases where there are no tags or categories defined.
This commit is contained in:
parent
7203eb161c
commit
f0eb587573
@ -29,7 +29,7 @@ pagination:
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if site.display_tags or site.display_categories %}
|
{% if site.display_tags and site.display_tags.size > 0 or site.display_categories and site.display_categories.size > 0 %}
|
||||||
|
|
||||||
<div class="tag-category-list">
|
<div class="tag-category-list">
|
||||||
<ul class="p-0 m-0">
|
<ul class="p-0 m-0">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user