templates/network/auction/components/tab_navigation_component.html.twig line 1

Open in your IDE?
  1. {% do tab_navigation_add({ name: 'timeline', action: 'timeline' }) %}
  2. {% do tab_navigation_add({ name: 'horses', action: 'horses' }) %}
  3. {% do tab_navigation_add({ name: 'attendees', action: 'attendees' }) %}
  4. {% do tab_navigation_add({ name: 'auctionlots', action: 'auctionlots' }) %}
  5. {% do tab_navigation_add({ name: 'news', action: 'news' }) %}
  6. {# {% do tab_navigation_add({ name: 'top-auctionlots', action: 'top_auctionlots' }) %} #}
  7. {# <section id="tab_navigation" class="sm:container">
  8.   <div class="flex-wrap hidden w-full gap-4 my-4 sm:flex">
  9.     {% for item in tab_navigation_get() %}
  10.       {% set highlighted = null %}
  11.       {% if highlightedTab is defined %}
  12.         {% set highlighted = highlightedTab
  13.           == path('auction_tab_navigation_' ~ item.action, { id: auction.id })
  14.         %}
  15.       {% endif %}
  16.       <turbo-frame target="tab_content">
  17.         <a id="{{ item.name ~ '-' ~ auction.id }}"
  18.           href="{{ path('auction_tab_navigation_' ~ item.action, { id: auction.id }) }}"
  19.           class="{{ highlighted ? 'btn-sm btn btn-primary' : 'btn-sm btn btn-neutral' }}"
  20.           style="{{
  21.           highlighted and auction.auctionhouse and auction.auctionhouse.color
  22.             ? 'color:white; background-color:' ~ auction.auctionhouse.color
  23.           }}">
  24.           {{ item.name|trans }}
  25.         </a>
  26.       </turbo-frame>
  27.     {% endfor %}
  28.   </div>
  29.   <div>
  30.     <div class="block sm:hidden sticky top-20 w-screen max-w-full z-1000 {{
  31.       auction.auctionhouse and auction.auctionhouse.color
  32.         ? ''
  33.         : 'bg-primary-500'
  34.       }} overflow-hidden shadow-md"
  35.       style="background-color: {{
  36.       auction and auction.auctionhouse.color
  37.         ? auction.auctionhouse.color
  38.         : ''
  39.       }};">
  40.       <div data-controller="tab-navigation"
  41.         data-section-navigation-active-class="text-white bg-black"
  42.         data-section-navigation-inactive-class="text-black bg-neutral-200 "
  43.         id="profile-scroll-bar"
  44.         class="relative inline-flex items-center w-screen gap-4 p-3 overflow-scroll sm:my-3 snap-x snap-mandatory sm:flex">
  45.         {% for item in tab_navigation_get() %}
  46.           {% set highlighted = null %}
  47.           {% if highlightedTab is defined %}
  48.             {% set highlighted = highlightedTab
  49.               == path('auction_tab_navigation_' ~ item.action, { id: auction.id })
  50.             %}
  51.           {% endif %}
  52.           <turbo-frame class="py-2 w-fit min-w-fit" target="tab_content">
  53.             <a href="{{ path('auction_tab_navigation_' ~ item.action, { id: auction.id }) }}"
  54.               class="flex-none p-3 text-sm font-medium tracking-widest {{
  55.               highlighted
  56.                 ? 'text-white bg-black active'
  57.                 : 'text-black bg-neutral-200 inactive'
  58.               }} uppercase  snap-center snap-always">
  59.               {{ item.name|trans }}
  60.             </a>
  61.           </turbo-frame>
  62.         {% endfor %}
  63.       </div>
  64.     </div>
  65.   </div>
  66. </section> #}
  67. <section id="tab_navigation"
  68.   class="{{ auction.auctionhouse and auction.auctionhouse.color ? '' : 'bg-primary-500' }} mb-4"
  69.   style="background-color: {{
  70.   auction.auctionhouse and auction.auctionhouse.color
  71.     ? auction.auctionhouse.color
  72.     : ''
  73.   }};">
  74.   <div class=" sm:flex-wrap sm:container sm:flex hidden w-full gap-4 p-4 {{
  75.     auction.auctionhouse and auction.auctionhouse.color
  76.       ? ''
  77.       : 'bg-primary-500'
  78.     }}"
  79.     style="background-color: {{
  80.     auction.auctionhouse and auction.auctionhouse.color
  81.       ? auction.auctionhouse.color
  82.       : ''
  83.     }};"
  84.     data-controller="tab-navigation">
  85.     {% for item in tab_navigation_get() %}
  86.       {% set highlighted = null %}
  87.       {% if highlightedTab is defined %}
  88.         {% set highlighted = highlightedTab
  89.           == path('auction_tab_navigation_' ~ item.action, { id: auction.id })
  90.         %}
  91.       {% endif %}
  92.       <turbo-frame class="{{ not highlighted ? 'bg-white' }}" target="tab_content">
  93.         <a id="{{ item.name ~ '-' ~ auction.id }}"
  94.           href="{{ path('auction_tab_navigation_' ~ item.action, { id: auction.id }) }}"
  95.           class="{{ highlighted ? 'btn-sm btn btn-white active' : 'btn-sm btn btn-neutral' }} "
  96.           style="{{
  97.           not highlighted
  98.             ? 'color:white;  background-color: rgba(' ~ auction.auctionhouse.color.r ~ ','
  99.               ~ auction.auctionhouse.color.g
  100.               ~ ','
  101.               ~ auction.auctionhouse.color.b
  102.               ~ ',0.6'
  103.           }}">
  104.           {{ item.name|trans }}
  105.         </a>
  106.       </turbo-frame>
  107.     {% endfor %}
  108.   </div>
  109.   <div>
  110.     <div class="block sm:hidden sticky top-20 w-screen max-w-full z-1000  {{
  111.       auction.auctionhouse and auction.auctionhouse.color
  112.         ? ''
  113.         : 'bg-primary-500'
  114.       }} overflow-hidden shadow-md"
  115.       style="background-color: {{
  116.       auction.auctionhouse and auction.auctionhouse.color
  117.         ? auction.auctionhouse.color
  118.         : ''
  119.       }};">
  120.       <div data-controller="tab-navigation"
  121.         data-section-navigation-active-class="text-white bg-black"
  122.         data-section-navigation-inactive-class="text-black bg-neutral-200 "
  123.         id="profile-scroll-bar"
  124.         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">
  125.         {% for item in tab_navigation_get() %}
  126.           {% set highlighted = null %}
  127.           {% if highlightedTab is defined %}
  128.             {% set highlighted = highlightedTab
  129.               == path('auction_tab_navigation_' ~ item.action, { id: auction.id })
  130.             %}
  131.           {% endif %}
  132.           <turbo-frame class=" w-fit min-w-fit {{ not highlighted ? 'bg-white' }}"
  133.             target="tab_content">
  134.             <a href="{{ path('auction_tab_navigation_' ~ item.action, { id: auction.id }) }}"
  135.               class="flex-none p-3 text-sm font-medium tracking-widest {{
  136.               highlighted
  137.                 ? 'btn-sm btn btn-white active'
  138.                 : 'btn-sm btn btn-neutral inactive'
  139.               }} uppercase "
  140.               style="{{
  141.               not highlighted
  142.                 ? 'color:white;  background-color: rgba(' ~ auction.auctionhouse.color.r ~ ','
  143.                   ~ auction.auctionhouse.color.g
  144.                   ~ ','
  145.                   ~ auction.auctionhouse.color.b
  146.                   ~ ',0.6'
  147.               }}">
  148.               {{ item.name|trans }}
  149.             </a>
  150.           </turbo-frame>
  151.         {% endfor %}
  152.       </div>
  153.     </div>
  154.   </div>
  155. </section>