<header class="border-bottom border-2 border-primary-subtle">
  <div class="container">
    <nav class="navbar navbar-expand">
      <h2>Animals App</h2>
      <div class="navbar-nav ms-auto">
        <% if (language == "ru") { %>
          <a class="nav-link fs-5 me-3" href="/" aria-current="page">Главная</a>
          <% if (isLoggedIn) { %>
            <a class="nav-link fs-5 me-3" href="/blog">Блог</a>
            <a class="nav-link fs-5 me-3" href="/weather">Погода</a>
            <a class="nav-link fs-5 me-3" href="/cats">Коты</a>
            <a class="nav-link fs-5 me-3" href="/dogs">Собаки</a>
            <% if (isAdmin) { %>
              <a class="nav-link fs-5 me-3" href="/admin"><i>Админ</i></a>
            <% } %>
            <a class="nav-link fs-5 me-3" href="/profile">Профиль</a>
          <% } %>
          <% if (!isLoggedIn) { %>
            <a class="nav-link fs-5 me-3" href="/login">Вход</a>
          <% } %>
          <div id="language-selector" class="d-flex">
            <a href="/language?lang=en" class="nav-link d-flex align-items-center"><img id="language_en" src="images/en.png">EN</a>
            <a href="/language?lang=ru" class="nav-link d-flex align-items-center"><img id="language_ru" src="images/ru.png">RU</a>
          </div>
        <% } else { %>
          <a class="nav-link fs-5 me-3" href="/" aria-current="page">Home</a>
          <% if (isLoggedIn) { %>
            <a class="nav-link fs-5 me-3" href="/blog">Blog</a>
            <a class="nav-link fs-5 me-3" href="/weather">Weather</a>
            <a class="nav-link fs-5 me-3" href="/cats">Cats</a>
            <a class="nav-link fs-5 me-3" href="/dogs">Dogs</a>
            <% if (isAdmin) { %>
              <a class="nav-link fs-5 me-3" href="/admin"><i>Admin</i></a>
            <% } %>
            <a class="nav-link fs-5 me-3" href="/profile">Profile</a>
          <% } %>
          <% if (!isLoggedIn) { %>
            <a class="nav-link fs-5 me-3" href="/login">Log In</a>
          <% } %>
          <div id="language-selector" class="d-flex">
            <a href="/language?lang=en" class="nav-link d-flex align-items-center"><img id="language_en" src="images/en.png">EN</a>
            <a href="/language?lang=ru" class="nav-link d-flex align-items-center"><img id="language_ru" src="images/ru.png">RU</a>
          </div>
        <% } %>
      </div>
    </nav>
  </div>
</header>
