templates/frontend/_header.html.twig line 1

Open in your IDE?
  1. {% set current_route = app.request.attributes.get('_route') %}
  2. <header class="header-top {{ current_route == 'homepage' ? 'is-transparant' : '' }}">
  3.     <div class="main-header">
  4.         <div class="container">
  5.             <nav
  6.                 class="navbar navbar-expand-lg navbar-light is-customized">
  7.                 <!-- bg-dark -->
  8.                 <a class="navbar-brand" href="{{ path('homepage') }}">
  9.                     <img class="img1" src="{{ asset('/assets/logo/kota_kediri.png') }}">
  10.                     {% if current_route == 'homepage' %}
  11.                         <img class="img2" src="{{ asset('/assets/logo/logo_masbup.png') }}">
  12.                     {% else %}
  13.                         <img class="img3" src="{{ asset('/assets/logo/logo_masbup_merah.png') }}">
  14.                     {% endif %}
  15.                 </a>
  16.                 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  17.                     <span class="navbar-toggler-icon"></span>
  18.                 </button>
  19.                 <div class="collapse navbar-collapse" id="navbarSupportedContent">
  20.                     <ul class="navbar-nav ml-auto text-header">
  21.                         <li class="nav-item">
  22.                             <a class="nav-link {{ current_route == 'homepage' ? 'is-home' : '' }}" href="{{ path('homepage')}}" class="nav-link {{ app.request.get('_route') == 'index' ? 'active' }} " style="padding-right: 0.75rem!important;">BERANDA</a>
  23.                         </li>
  24.                         <li class="nav-item">
  25.                             <a href="{{ path('dataset')}}" class="nav-link {{ current_route == 'homepage' ? 'is-home' : '' }} {{ app.request.get('_route') == 'dataset' ? 'active' }} " style="padding-right: 0.75rem!important;">DATASET</a>
  26.                         </li>
  27.                         {# <li class="nav-item">
  28.                             <a href="{{ path('infografik')}}" class="nav-link {{ current_route == 'homepage' ? 'is-home' : '' }} {{ app.request.get('_route') == 'infografik' ? 'active' }} ">INFOGRAFIK</a>
  29.                         </li> #}
  30.                         <li class="nav-item">
  31.                             <a href="{{ path('publikasii')}}" class="nav-link {{ current_route == 'homepage' ? 'is-home' : '' }} {{ app.request.get('_route') == 'publikasii' ? 'active' }} ">PUBLIKASI</a>
  32.                         </li>
  33.                         <li class="nav-item">
  34.                             <a href="{{ path('list-publikasi')}}" class="nav-link {{ current_route == 'homepage' ? 'is-home' : '' }} {{ app.request.get('_route') == 'list-publikasi' ? 'active' }} ">DAFTAR RILIS PUBLIKASI</a>
  35.                         </li>
  36.                         <li class="nav-item">
  37.                             <a href="{{ path('visualisasi')}}" class="nav-link {{ current_route == 'homepage' ? 'is-home' : '' }} {{ app.request.get('_route') == 'visualisasi' ? 'active' }} ">VISUALISASI</a>
  38.                         </li>
  39.                     </li>
  40.                 </ul>
  41.             </div>
  42.         </nav>
  43.     </div>
  44. </div></header>