templates/frontend/layout/_header.html.twig line 1

  1. <div class="bg-brand-gray">
  2.     <div class="p-4 lg:w-[1280px] mx-auto flex justify-between items-center">
  3.         <div class="flex items-center">
  4.             <a href="{{ path('app_home', {'_locale': app.request.locale}) }}"><img class="h-[42px] mr-3" src="{{ asset('images/logo.png') }}"/></a>
  5.             <div class="uppercase text-[#3F4193] align-middle">
  6.                 {{ 'header.slogan' | trans }}
  7.             </div>
  8.         </div>
  9.         <div class="flex space-x-3 text-sm">
  10.             <div class="bg-white rounded flex overflow-hidden items-center">
  11.                 <div class="flex items-center h-full bg-gray-300 text-white px-3">
  12.                     <i class="fa fa-phone"></i>
  13.                 </div>
  14.                 <span class="inline-block py-2 px-3">88108071, 99117508 </span>
  15.             </div>
  16.             <div class="bg-white rounded flex overflow-hidden items-center">
  17.                 <div class="flex items-center h-full bg-gray-300  text-white px-3">
  18.                     <i class="fa fa-envelope"></i>
  19.                 </div>
  20.                 <span class="inline-block py-2 px-3">info@msia.mn</span>
  21.             </div>
  22.             <a href="{{ path('app_login') }}"
  23.                class="inline-block bg-white rounded flex overflow-hidden items-center group">
  24.                 <div class="flex items-center h-full bg-gray-300 group-hover:bg-brand-red text-white px-3">
  25.                     <i class="fa fa-circle-user"></i>
  26.                 </div>
  27.                 <span class="inline-block py-2 px-3">{{ 'header.login' | trans }}</span>
  28.             </a>
  29.             {% if app.request.locale == 'mn' %}
  30.                 <a href="{{ path('app_home', {_locale: 'en'}) }}"
  31.                    class="inline-block bg-white rounded flex overflow-hidden items-center group">
  32.                     <div class="flex items-center h-full bg-gray-300 text-white px-2">
  33.                         <img class="h-[20px]" src="{{ asset('images/flag/uk.png') }}">
  34.                     </div>
  35.                     <span class="inline-block py-2 px-3">English</span>
  36.                 </a>
  37.             {% elseif app.request.locale == 'en' %}
  38.                 <a href="{{ path('app_home', {_locale: 'mn'}) }}"
  39.                    class="inline-block bg-white rounded flex overflow-hidden items-center group">
  40.                     <div class="flex items-center h-full bg-gray-300 text-white px-2">
  41.                         <img class="h-[20px]" src="{{ asset('images/flag/mn.png') }}">
  42.                     </div>
  43.                     <span class="inline-block py-2 px-3">Монгол</span>
  44.                 </a>
  45.             {% endif %}
  46.         </div>
  47.     </div>
  48. </div>
  49. <div class="bg-brand">
  50.     <div class="lg:w-[1280px] mx-auto flex justify-between items-center">
  51.         {% set menus = [
  52.             {label:'menu.homepage', link : 'app_home', locale: ['en','mn'], param: {'_locale': app.request.locale}},
  53.             {label:'menu.intro', link : 'app_intro', locale: ['en','mn'], param: {'_locale': app.request.locale}},
  54.             {label:'menu.about', link : 'app_about', locale: ['en','mn'], param: {'_locale': app.request.locale}},
  55.             {label:'menu.members', link : 'app_members', locale: ['en','mn'], param: {'_locale': app.request.locale}},
  56.             {label:'menu.news', link : 'app_content', locale: ['en','mn'], param: {'_locale': app.request.locale, type: 0}},
  57.             {label:'menu.technology', link : 'app_content', locale: ['en','mn'], param: {'_locale': app.request.locale, type: 1}},
  58.             {label:'menu.training', link : 'app_content', locale: ['en','mn'], param: {'_locale': app.request.locale, type: 2}},
  59.         ] %}
  60.         <nav class="text-brand-gray uppercase text-sm">
  61.             {% for menu in menus %}
  62.                 <a href="{{ path(menu.link, menu.param is defined ? menu.param : {}) }}"
  63.                    class="py-4 px-6 inline-block cursor-pointer hover:text-brand-red">{{ menu.label|trans }}</a>
  64.             {% endfor %}
  65.         </nav>
  66.     </div>
  67. </div>