templates/partials/_navbar.html.twig line 1

Open in your IDE?
  1. <header class="bg-white shadow-lg sticky top-0 z-50">
  2.     <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
  3.         <div class="flex justify-between items-center py-4">
  4.             <a href="{{ path('app_home', {'_locale': app.request.locale}) }}" class="flex items-center space-x-3">
  5.                 <div class="w-12 h-12 rounded-full bg-primary-blue flex items-center justify-center border-2 border-gold overflow-hidden pulse-glow">
  6.                     <img src="https://aficargo.com/a.png" alt="AFI CARGO Logo" class="w-full h-full object-contain">
  7.                 </div>
  8.                 <h1 class="text-2xl md:text-3xl font-extrabold tracking-wide">
  9.                     <span class="text-primary-blue">AFI</span>
  10.                     <span class="text-primary-blue">CARGO</span>
  11.                 </h1>
  12.             </a>
  13.             <nav class="hidden lg:flex items-center space-x-6">
  14.                 {% set nav_items = {
  15.                     'home': 'nav.home',
  16.                     'about': 'nav.about',
  17.                     'company-profile': 'nav.profile',
  18.                     'services': 'nav.services',
  19.                     'afi-business': 'nav.business',
  20.                     'gallery': 'nav.gallery',
  21.                     'tracking': 'nav.tracking',
  22.                     'offices': 'nav.offices',
  23.                     'contact': 'nav.contact'
  24.                 } %}
  25.                 {% for id, label in nav_items %}
  26.                     <a href="#{{ id }}" class="nav-link font-semibold text-gray-700 hover:text-primary-blue transition duration-300 text-sm xl:text-base">
  27.                         {{ label|trans }}
  28.                     </a>
  29.                 {% endfor %}
  30.                 <div class="ml-4">
  31.                     <select id="language-select" class="p-1.5 rounded-md border border-gray-300 font-medium text-sm focus:outline-none focus:ring-2 focus:ring-gold cursor-pointer">
  32.                         <option value="en" {{ app.request.locale == 'en' ? 'selected' }}>🇬🇧 EN</option>
  33.                         <option value="fr" {{ app.request.locale == 'fr' ? 'selected' }}>🇫🇷 FR</option>
  34.                         <option value="zh" {{ app.request.locale == 'zh' ? 'selected' }}>🇨🇳 ä¸­æ–‡</option>
  35.                         <option value="pt" {{ app.request.locale == 'pt' ? 'selected' }}>🇵🇹 PT</option>
  36.                     </select>
  37.                 </div>
  38.             </nav>
  39.             <button id="mobile-menu-button" class="lg:hidden text-primary-blue text-2xl">
  40.                 <i class="fas fa-bars"></i>
  41.             </button>
  42.         </div>
  43.         <div id="mobile-menu" class="lg:hidden hidden py-4 border-t border-gray-200">
  44.             <div class="flex flex-col space-y-4">
  45.                 {% for id, label in nav_items %}
  46.                     <a href="#{{ id }}" class="font-semibold text-gray-700 hover:text-primary-blue transition duration-300 mobile-nav-link">
  47.                         {{ label|trans }}
  48.                     </a>
  49.                 {% endfor %}
  50.                 <div class="pt-4 border-t border-gray-200">
  51.                     <select id="mobile-language-select" class="w-full p-2 rounded-md border border-gray-300 font-medium focus:outline-none focus:ring-2 focus:ring-gold cursor-pointer">
  52.                         <option value="en" {{ app.request.locale == 'en' ? 'selected' }}>🇬🇧 English</option>
  53.                         <option value="fr" {{ app.request.locale == 'fr' ? 'selected' }}>🇫🇷 Français</option>
  54.                         <option value="zh" {{ app.request.locale == 'zh' ? 'selected' }}>🇨🇳 ä¸­æ–‡</option>
  55.                         <option value="pt" {{ app.request.locale == 'pt' ? 'selected' }}>🇵🇹 Português</option>
  56.                     </select>
  57.                 </div>
  58.             </div>
  59.         </div>
  60.     </div>
  61. </header>