{% do tab_navigation_add({ name: 'timeline', action: 'timeline' }) %}
{% do tab_navigation_add({ name: 'auction-history', action: 'auction_history' }) %}
{% do tab_navigation_add({ name: 'pedigree', action: 'pedigree' }) %}
{% do tab_navigation_add({ name: 'achievements', action: 'achievements' }) %}
{% do tab_navigation_add({ name: 'news', action: 'news' }) %}
{# {% do tab_navigation_add({ name: 'horse-statistics', action: 'horse_statistics' }) %} #}
{# {% do tab_navigation_add({ name: 'racelist', action: 'racelist' }) %}
{% do tab_navigation_add({ name: 'horses', action: 'horses' }) %}
{% do tab_navigation_add({ name: 'achievements', action: 'achievements' }) %}
{% do tab_navigation_add({ name: 'attendees', action: 'attendees' }) %} #}
{# {% do tab_navigation_add({ name: 'news', action: 'news' }) %} #}
{# <section id="tab_navigation" class="sm:container">
<div class="flex-wrap hidden w-full gap-4 my-4 sm:flex">
{% for item in tab_navigation_get() %}
{% set highlighted = null %}
{% if highlightedTab is defined %}
{% set highlighted = highlightedTab
== path('horse_tab_navigation_' ~ item.action, { id: horse.id })
%}
{% endif %}
<turbo-frame target="tab_content">
<a id="{{ item.name ~ '-' ~ horse.id }}"
href="{{ path('horse_tab_navigation_' ~ item.action, { id: horse.id }) }}"
class="{{ highlighted ? 'btn-sm btn btn-primary' : 'btn-sm btn btn-neutral' }}"
style="{{
highlighted and horse.owner and horse.owner.color
? 'color:white; background-color:' ~ horse.owner.color
}}">
{{ item.name|trans }}
</a>
</turbo-frame>
{% endfor %}
</div>
<div>
<div class="block sm:hidden sticky top-20 w-screen max-w-full z-1000 {{
horse.owner and horse.owner.color
? ''
: 'bg-primary-500'
}} overflow-hidden shadow-md"
style="background-color: {{ horse.owner and horse.owner.color ? horse.owner.color : '' }};">
<div data-controller="tab-navigation"
data-section-navigation-active-class="text-white bg-black"
data-section-navigation-inactive-class="text-black bg-neutral-200 "
id="profile-scroll-bar"
class="relative inline-flex items-center w-screen gap-4 p-3 overflow-scroll sm:my-3 snap-x snap-mandatory sm:flex">
{% for item in tab_navigation_get() %}
{% set highlighted = null %}
{% if highlightedTab is defined %}
{% set highlighted = highlightedTab
== path('horse_tab_navigation_' ~ item.action, { id: horse.id })
%}
{% endif %}
<turbo-frame class="py-2 w-fit min-w-fit" target="tab_content">
<a href="{{ path('horse_tab_navigation_' ~ item.action, { id: horse.id }) }}"
class="flex-none p-3 text-sm font-medium tracking-widest {{
highlighted
? 'text-white bg-black active'
: 'text-black bg-neutral-200 inactive'
}} uppercase snap-center snap-always">
{{ item.name|trans }}
</a>
</turbo-frame>
{% endfor %}
</div>
</div>
</div>
</section> #}
<section id="tab_navigation"
class="{{ horse.owner and horse.owner.color ? '' : 'bg-primary-500' }} mb-4"
style="background-color: {{ horse.owner and horse.owner.color ? horse.owner.color : '' }};">
<div class=" sm:flex-wrap sm:container sm:flex hidden w-full gap-4 p-4 {{
horse.owner and horse.owner.color
? ''
: 'bg-primary-500'
}}"
style="background-color: {{ horse.owner and horse.owner.color ? horse.owner.color : '' }};"
data-controller="tab-navigation">
{% for item in tab_navigation_get() %}
{% set highlighted = null %}
{% if highlightedTab is defined %}
{% set highlighted = highlightedTab
== path('horse_tab_navigation_' ~ item.action, { id: horse.id })
%}
{% endif %}
<turbo-frame class="{{ not highlighted ? 'bg-white' }}" target="tab_content">
<a id="{{ item.name ~ '-' ~ horse.id }}"
href="{{ path('horse_tab_navigation_' ~ item.action, { id: horse.id }) }}"
class="{{ highlighted ? 'btn-sm btn btn-white active' : 'btn-sm btn btn-neutral' }} "
style="{{
not highlighted and horse.owner
? 'color:white; background-color: rgba(' ~ horse.owner.color.r ~ ','
~ horse.owner.color.g
~ ','
~ horse.owner.color.b
~ ',0.6'
}}">
{{ item.name|trans }}
</a>
</turbo-frame>
{% endfor %}
</div>
<div>
<div class="block sm:hidden sticky top-20 w-screen max-w-full z-1000 {{
horse.owner and horse.owner.color
? ''
: 'bg-primary-500'
}} overflow-hidden shadow-md"
style="background-color: {{ horse.owner and horse.owner.color ? horse.owner.color : '' }};">
<div data-controller="tab-navigation"
data-section-navigation-active-class="text-white bg-black"
data-section-navigation-inactive-class="text-black bg-neutral-200 "
id="profile-scroll-bar"
class="relative inline-flex items-center w-screen gap-4 p-3 mx-1 overflow-scroll sm:my-3 snap-x snap-mandatory sm:flex">
{% for item in tab_navigation_get() %}
{% set highlighted = null %}
{% if highlightedTab is defined %}
{% set highlighted = highlightedTab
== path('horse_tab_navigation_' ~ item.action, { id: horse.id })
%}
{% endif %}
<turbo-frame class=" w-fit min-w-fit {{ not highlighted ? 'bg-white' }}"
target="tab_content">
<a href="{{ path('horse_tab_navigation_' ~ item.action, { id: horse.id }) }}"
class="flex-none p-3 text-sm font-medium tracking-widest {{
highlighted
? 'btn-sm btn btn-white active'
: 'btn-sm btn btn-neutral inactive'
}} uppercase "
style="{{
not highlighted and horse.owner
? 'color:white; background-color: rgba(' ~ horse.owner.color.r ~ ','
~ horse.owner.color.g
~ ','
~ horse.owner.color.b
~ ',0.6'
}}">
{{ item.name|trans }}
</a>
</turbo-frame>
{% endfor %}
</div>
</div>
</div>
</section>