Skip to content

Commit

Permalink
Create metadata-tabs.html
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscalleja3 authored Aug 19, 2024
1 parent 4e688ee commit d7ac34f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions _includes/components/indicator/metadata-tabs.html
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>

0 comments on commit d7ac34f

Please sign in to comment.