==
<?php
function onStart(){
        $categories = \Indikator\News\Models\Categories::where("hidden", 2)->where("status", 1)->limit(6)->get();
        $this["categories"] = $categories;
    }
?>
==
<!-- Header ============================================================ -->
<header class="new__header">
  <div class="auto_container">
      <div class="header__inner">
          <a href="{{ 'index'|page}}" class="head__logo">
              {% set logo = attribute(this.theme, 'logo_' ~ activeLocale) %}
              <img src="{{ logo.path }}" alt="">
          </a>
          <div class="head__right">

              <form class="search__form" action="{{ 'search'|page }}" method="GET">
                {{form_token()}}
                  <div class="input__wrap">
                      <input type="text" class="for__search" name="query" placeholder="{{'Поиск'|_}}">
                      <button type="submit" class="input__magnify">
                          <img src="{{ 'assets/images/lupa.svg'|theme }}" alt="">
                      </button>
                  </div>
              </form>
          </div>
          <div class="for__mobile">
              <div class="loupe">
                  <img src="{{ 'assets/images/loupe.svg'|theme }}" alt="">
              </div>
              <button type="button" class="new__hamburg">
                  <span></span>
              </button>
          </div>
      </div>
  </div>
</header>
<!-- Header end ======================================================== -->

<!-- Mobile Search  =====================================================-->
<div class="mobile__search">
  <div class="auto_container">
      <div class="mobile__inner">
          <a href="{{ 'index'|page}}" class="mobile__logo">
              <img src="{{ 'assets/images/new_logo.png'|theme }}" alt="">
          </a>
          <form action="{{ 'search'|page }}" method="GET" class="mobile__form">
              <div class="mobile_input__wrap">
                  <input type="text" type="text" name="query" placeholder="{{'Поиск'|_}}">
                  <button type="submit" class="mobile__magnify">
                      <img src="{{ 'assets/images/lupa.svg'|theme }}" alt="">
                  </button>
                  <div class="mobile__close">
                      <!-- <img src="imags/close_btn.svg" alt=""> -->
                  </div>
              </div>
          </form>
      </div>
  </div>
</div>
<!-- Mobile Search end ==================================================-->

<!-- Navs ============================================================== -->
<nav class="new__navs" id="nav">
  <div class="auto_container">
      <div class="navs__back ">
          <div class="navs__inner">
              <div class="nav__col">
                {% for item in categories %}
                  <a href="{{ 'category'|page({ slug: item.slug })}}" class="nav__link">{{item.name}}</a>
                {% endfor %}
              </div>
              <div class="nav__col">
                  <a href="{{ 'archive'|page}}" class="nav__group">
                      <div class="nav__icon">
                          <img src="{{ 'assets/images/inbox.svg'|theme }}" alt="">
                      </div>
                      <div class="nav__icon--green">
                          <img src="{{ 'assets/images/inbox_green.svg'|theme }}" alt="">
                      </div>
                      <span>
                        {{'Архив'|_}}
                      </span>
                  </a>
                  <div class="nav__group nav_open_media">
                      <div class="nav__icon">
                          <img src="{{ 'assets/images/film.svg'|theme }}" alt="">
                      </div>
                      <div class="nav__icon--green">
                          <img src="{{ 'assets/images/film_green.svg'|theme }}" alt="">
                      </div>
                      <span class="open__link">
                        {{'Мультимедиа'|_}}
                      </span>
                      <div class="hidden__media">
                          <a href="{{ 'gallery'|page}}" class="link__media">
                            {{'Фоторепортаж '|_}}
                          </a>
                          <a href="{{ 'videos'|page}}" class="link__media">
                            {{'Видеорепортаж '|_}}
                          </a>
                      </div>
                  </div>
                  <div class="nav__group">
                        {% if this.page.id == 'post'  %}
                        <div class="new__lang">
                            <a href="{{ url('/tk') }}" class="lang__item">
                                <img src="{{ 'assets/images/lang_tm.png'|theme }}" alt="">
                            </a>
                            <a href="{{ url('/ru') }}" class="lang__item">
                                <img src="{{ 'assets/images/lang_ru.png'|theme }}" alt="">
                            </a>
                            <a href="{{ url('/en') }}" class="lang__item">
                                <img src="{{ 'assets/images/lang_en.png'|theme }}" alt="">
                            </a>
                        </div>
                    {% else %}

                        <div class="new__lang">
                            <a href="#" class="lang__item" data-request="onSwitchLocale" data-request-data="locale: 'tk'"> <img src="{{ 'assets/images/lang_tm.png'|theme }}" alt=""> </a>
                        <a href="#" class="lang__item" data-request="onSwitchLocale" data-request-data="locale: 'ru'"> <img src="{{ 'assets/images/lang_ru.png'|theme }}" alt=""> </a>
                        <a href="#" class="lang__item" data-request="onSwitchLocale" data-request-data="locale: 'en'"> <img src="{{ 'assets/images/lang_en.png'|theme }}" alt=""> </a>
                        </div>

                    {% endif %}
                  </div>
              </div>

          </div>
      </div>
  </div>
</nav>
<!-- Navs ============================================================== -->
