Skip to content
Snippets Groups Projects
Commit 4b46ee3f authored by Eugen Ciur's avatar Eugen Ciur
Browse files

show pinned tags compoenent only if pinned tags exists

parent b722b853
Branches
Tags
No related merge requests found
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
<i class="fa fa-home me-2"></i>Home <i class="fa fa-home me-2"></i>Home
</LinkTo> </LinkTo>
</li> </li>
{{#if this.show_pinned_tags}}
<li> <li>
<button class="btn btn-toggle rounded align-items-center text-white" data-bs-toggle="collapse" data-bs-target="#home-collapse" aria-expanded="false"> <button class="btn btn-toggle rounded align-items-center text-white" data-bs-toggle="collapse" data-bs-target="#home-collapse" aria-expanded="false">
Pinned tags Pinned Tags
</button> </button>
<div id="home-collapse" class="collapse"> <div id="home-collapse" class="collapse">
<ul class="list-unstyled px-3 mx-3 my-1"> <ul class="list-unstyled px-3 mx-3 my-1">
...@@ -38,6 +39,7 @@ ...@@ -38,6 +39,7 @@
</ul> </ul>
</div> </div>
</li> </li>
{{/if}}
<li> <li>
<LinkTo <LinkTo
@route="authenticated.nodes" @route="authenticated.nodes"
... ...
......
...@@ -10,4 +10,14 @@ export default class SidebarComponent extends Component { ...@@ -10,4 +10,14 @@ export default class SidebarComponent extends Component {
return tags.filter(tag => tag.pinned); return tags.filter(tag => tag.pinned);
}); });
} }
get show_pinned_tags() {
if (this.args.pinned_tags) {
if (this.args.pinned_tags.length > 0) {
return true;
}
}
return false;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment