src/views/layout/_navbar.twig line 1

Open in your IDE?
  1. <style>
  2. .navigation--li {
  3.     display: block;
  4.     font-family: var(--font-second);
  5.     margin: 1rem 0;
  6.     text-align: left;
  7. }
  8. .logo_size{
  9.     position: absolute;
  10.     top: -35px;
  11. }
  12. .logo_size img{
  13.     height:80px;
  14. }
  15. </style>
  16.     <div class="container-fluid bg-white">
  17.         <div class="row">
  18.             <div class="col-sm-12 p-0">
  19.             <div class="container">
  20.                 <div class="row">
  21.                 
  22.             <div class="col-sm-12 py-2" style="border-bottom: 1px solid #fbfbfb;">
  23.             
  24.             <div class="display_flx">
  25.             
  26.             {% if app.request.locale == 'en' %}  
  27.      <div class="switches-container">
  28.    <input class="locale--input" id="enLocale" type="radio" name="locale" value="en" checked />
  29.        
  30.         <input class="locale--input" id="hiLocale" type="radio" name="locale" value="hi" />
  31.          <label class="locale--label" for="enLocale">{{ 'english'|trans }}</label>
  32.         <label class="locale--label" for="hiLocale">{{ 'hindi'|trans }}</label>
  33.    
  34.     <div class="switch-wrapper">
  35.       <div class="switch">
  36.         <div>{{ 'english'|trans }}</div>
  37.         <div>{{ 'hindi'|trans }}</div>
  38.       </div>
  39.     </div>
  40.   </div>
  41.     {% else %}
  42.     <div class="switches-container">
  43.     <input class="locale--input" id="enLocale" type="radio" name="locale" value="en" />
  44.     <input class="locale--input" id="hiLocale" type="radio" name="locale" value="hi" checked />
  45.     <label class="locale--label" for="enLocale">{{ 'english'|trans }}</label>
  46.     <label class="locale--label" for="hiLocale">{{ 'hindi'|trans }}</label>
  47.    
  48.     <div class="switch-wrapper">
  49.       <div class="switch">
  50.         <div>{{ 'english'|trans }}</div>
  51.         <div>{{ 'hindi'|trans }}</div>
  52.       </div>
  53.     </div>
  54.   </div>
  55.       
  56.       
  57.     {% endif %} 
  58.             
  59.             
  60.             
  61.             
  62.               </div>
  63.             </div>
  64.             <div class="display_flx sm_hide py-2" style="position: relative;">
  65.                 <div>
  66.                     <a class="logo_size" href="http://89.116.20.47/">
  67.                     {% if app.request.locale == 'en' %}  
  68.                         <img class="" src="{{ asset('images/Elogo.png') }}" alt="PFI" /></a>
  69.                          {% else %}
  70.                         <img class="" src="{{ asset('images/Hlogo.png') }}" alt="PFI" /></a>
  71.                         {% endif %} 
  72.                         
  73.                 </div>
  74.                 <div class="">
  75.                     <div class="partnav">
  76.                         <form class="search1" id="searchForm" autocomplete="off" onsubmit="return searchQuery();">
  77.     <div class="input-group">
  78.         <span class="input-group-text" style="background-color: transparent; border-right: 0px;">
  79.             <img class="search--icon" src="{{ asset('images/search.png') }}" />
  80.         </span>
  81.         <input type="text" class="form-control home_search_inp" name="q" id="search-input" placeholder="{{ 'navbar.search'|trans }}" value="{{ data.query }}" style="border-left: 0px;">
  82.         <a class="btn btn-warning" href="#" id="search-button" onclick="redirectWithQuery()" style="display: flex; justify-content: center; align-items: center;"><b> {{ 'navbar.search'|trans }}</b></a>
  83.     </div>
  84. </form>
  85.                         
  86.                        
  87.                       </div>
  88.                 </div>
  89.             </div>
  90.         </div>
  91.     </div>
  92. </div>
  93. </div>
  94.         </div>
  95.         <nav class="navbar">
  96.           <div class="wrapper">
  97.            {% if app.request.locale == 'en' %}  
  98.             <a class="navbar__logo sm_show" href="http://89.116.20.47/"><img class="navbar__logo--img" src="{{ asset('images/Elogo.png') }}" alt="PFI" /></a>
  99.              {% else %}
  100.               <a class="navbar__logo sm_show" href="http://89.116.20.47/"><img class="navbar__logo--img" src="{{ asset('images/Hlogo.png') }}" alt="PFI" /></a>
  101.               {% endif %} 
  102.             <div class="navbar--toggle" id="menuToggle">
  103.               <span>{{ 'navbar.menu'|trans }}</span>
  104.               
  105.               <i class="fa-solid fa-bars text-warning pe-3" style="font-size: 24px;"></i>
  106.             </div>
  107.             <div class="navbar--menu" id="navbarMenu">
  108.               <ul class="navigation mb-0">
  109.                 <li style="align-items: flex-start; margin-left: 12px;" class="navigation--li dropdown {% if app.request.pathinfo starts with '/bucket/' %}active{% endif %} ">
  110.                   <div class="dropdown--label">
  111.                     <span>{{ 'issues_and_themes'|trans }}</span>
  112.                     <img src="{{ asset('images/dropdown.png') }}" />
  113.                   </div>
  114.                   <div class="dropdown__items">
  115.                     {% for bucket in data.buckets %}
  116.                       <a class="dropdown__items--a" href="{{ path('web_bucket', { id: bucket.id }) }}">{{ bucket.title|striptags|raw }}</a>
  117.                     {% endfor %}
  118.                   </div>
  119.                 </li>
  120.                 <li class="navigation--li dropdown d-none">
  121.                   <div class="dropdown--label">
  122.                     <span>{{ 'choose_lang'|trans }}</span>
  123.                     <img src="{{ asset('images/dropdown.png') }}" />
  124.                   </div>
  125.                   <div class="dropdown__items" style="min-width: 100%">
  126.                     <a class="dropdown__items--a" href="" data-action="lang" data-lang="en">{{ 'english'|trans }}</a>
  127.                     <a class="dropdown__items--a" href="" data-action="lang" data-lang="hi">{{ 'hindi'|trans }}</a>
  128.                   </div>
  129.                 </li>
  130.                 
  131.                 <li class="nav-item">
  132.                     <a class="nav-link {% if app.request.pathinfo == '/introduction' %}active{% endif %}" href="{{ path('web_introduction') }} "  style="margin-right: 0.5rem;">{{ 'introduction'|trans }}</a>
  133.                 </li>
  134.                 <li class="nav-item">
  135.                     <a class="nav-link {% if app.request.pathinfo == '/updates' %}active{% endif %}" href="{{ path('web_updates') }}" style="margin-right: 0.5rem;">{{ 'updates'|trans }}</a>
  136.                 </li>
  137.                 <li class="nav-item">
  138.                     <a class="nav-link {% if app.request.pathinfo == '/dashboard/IN' %}active{% endif %}" href="dashboard/IN" style="margin-right: 0.5rem;">{{ 'state_dashboard'|trans }} </a>
  139.                 </li>
  140.                 <li class="nav-item">
  141.                     <a class="nav-link {% if app.request.pathinfo == '/viewDistrict' %}active{% endif %}" href="{{ path('web_district') }}" style="margin-right: 0.5rem;">{{ 'district_dashboard'|trans }}</a>
  142.                 </li>
  143.                 
  144.                 <li class="nav-item">
  145.                     <a class="nav-link {% if app.request.pathinfo == '/contact' %}active{% endif %}" href="{{ path('web_contact') }}" style="margin-right: 0.5rem;">{{ 'contact_us'|trans }}</a>
  146.                 </li>
  147.               </ul>
  148.               
  149.             </div>
  150.           </div>
  151.         </nav>
  152.         
  153. <script>
  154.     function redirectWithQuery() {
  155.         var inputVal = document.getElementById('search-input').value;
  156.         var url = "{{ path('web_chatbot') }}" + "?q=" + encodeURIComponent(inputVal);
  157.         //alert(url);
  158.         window.location.href = url;
  159.     }
  160. </script>