generated from open-sdg/open-sdg-site-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e688ee
commit d7ac34f
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<ul class="nav nav-tabs" role="tablist"> | ||
{% if site.metadata_tabs and site.metadata_tabs.size > 0 %} | ||
{% for tab in site.metadata_tabs %} | ||
{% if tab.scope %} | ||
{% assign tab_key = tab.scope %} | ||
{% assign tab_obj = tab %} | ||
{% endif %} | ||
{% if tab_key == 'global' and page.indicator.standalone %} | ||
{% continue %} | ||
{% endif %} | ||
{% assign tab_preset = "tab_meta_" | append: tab_key %} | ||
{% assign tab_label = "Change to " | append: tab_obj.title | append: " tab" %} | ||
<li role="presentation" class="nav-item"> | ||
<button | ||
type="button" | ||
class="nav-link {% if forloop.first %}active{% endif %}" | ||
data-bs-toggle="tab" | ||
id="tab-{{ tab_key }}" | ||
data-bs-target="#{{ tab_key }}" | ||
aria-controls="{{ tab_key }}" | ||
role="tab" | ||
{% include autotrack.html preset=tab_preset category="Tab change" action="Change metadata view" label=tab_label %} | ||
>{{ tab_obj.title | t }}</button> | ||
</li> | ||
{% endfor %} | ||
{% else %} | ||
{% include components/indicator/metadata-tabs-default.html %} | ||
{% endif %} | ||
</ul> |