<ul class="topnav" id="myTopnav">
  {if $can_logout}
  <li class="icon">
    <a href="javascript:void(0);" onclick="myFunction()">
      Menü &#8801;
    </a>
    <span class="mobile_logout">
        {if $page == 'admin' || $page == 'coach' || $page == 'coach_preview'}
          {$user_login->get_ua_name()}
        {elseif $page == 'view' || $page == 'preview'}
          {$user_login->get_uk_name()}
        {elseif $page == 'tabor'}
          {$user_login->get_cu_email()}
        {elseif $page == 'taborvezeto'}
          {$user_login->get_ucl_name()}
        {/if}
    </span>
  </li>
  {foreach $menus as $menu}
    <li><a href="/{$page}/{$menu.spage_url}{if $page == 'preview'}/{$user_login->get_uk_id()}{elseif $page == 'coach_preview'}/{$user_login->get_ua_id()}{/if}">

        {$menu.spage_title}

    </a></li>
  {/foreach}


  {else}

  <li class="login"><a href="/{$page}">{if $page == 'tabor' || $page == 'taborvezeto'}Tollaslabda táborok 2018. nyár{else}Badminton Coach{/if}</a></li>
  {/if}


  {if $can_logout}
    <li class="logout">
      <a href="{if $page == 'preview' || $page == 'coach_preview'}#{else}/{$page}/logout{/if}">
        <span class="name">
        {if $page == 'admin' || $page == 'coach' || $page == 'coach_preview'}
          {$user_login->get_ua_name()}
        {elseif $page == 'view' || $page == 'preview'}
          {$user_login->get_uk_name()}
        {elseif $page == 'tabor'}
          {$user_login->get_cu_email()}
        {elseif $page == 'taborvezeto'}
          {$user_login->get_ucl_name()}
        {/if}
        </span>
        <img src="/_image/logout{if $page == 'view' || $page == 'preview'}_blue{/if}.png">
      </a>
    </li>
    <li class="logout_mobile">
      <a href="{if $page == 'preview' || $page == 'coach_preview'}#{else}/{$page}/logout{/if}">
        <span class="name">
          Kijelentkezés
        </span>
      </a>
    </li>
  {/if}
</ul>



<script>
function myFunction() {
    var x = document.getElementById("myTopnav");
    if (x.className === "topnav") {
        x.className += " responsive";
    } else {
        x.className = "topnav";
    }
}
</script>
