Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

4.4 KB
Raw Blame
<nav
  id="primary-topbar"
  class="sticky top-0 h-16 flex items-center bg-white w-full max-w-full px-4 z-50"
>
  <!-- Absolutely positioned logo -->
  <div class="absolute pl-1 left-2 top-1/2 transform -translate-y-1/2">
    <a href="/agents" class="flex items-center">
      <img src="/img/smythos-logo.png" class="h-6 w-6" alt="SmythOS" />
      <img src="/img/smythos-text.svg" alt="SmythOS" class="ml-3 h-6 w-auto" />
    </a>
  </div>

  <!-- Navigation Links starting at 76rem from left -->
  <div
    class="hidden xl:flex items-center ml-[18rem] border-l border-solid border-gray-100 h-full px-2 gap-2"
  >
    <% if (typeof agent !== 'undefined' && agent) { %> <% if (agent.avatar) { %>
    <img
      class="w-8 h-8 rounded-full"
      src="<%= agent.avatar %>"
      alt="agent avatar"
      onerror="this.onerror=null;this.src='/img/user_default.svg';"
    />
    <% } else { %>
    <div
      class="bg-uipink rounded-full w-8 h-8 flex items-center justify-center text-white font-medium text-xl"
    >
      <%= (agent.name || 'A').charAt(0).toLocaleUpperCase() %>
    </div>
    <% } %>
    <p class="builder-topbar-agent-name font-medium"><%= agent.name %></p>
    <% } %>
  </div>

  <!-- Right side: New Agent, Agent Chat, and User Menu -->
  <div class="flex items-center gap-4 ml-auto">

    <div class="relative">
      <button
        type="button"
        class="flex text-sm rounded-full"
        id="user-menu-button"
        aria-expanded="false"
        data-dropdown-toggle="user-dropdown"
        data-dropdown-placement="bottom"
      >
        <span class="sr-only">Open user menu</span>
        <% if (user?.picture) { %>
        <img
          class="w-8 h-8 rounded-full"
          src="<%= user.picture %>"
          alt="user photo"
          onerror="this.onerror=null;this.src='/img/user_default.svg';"
        />
        <% } else { %>
        <div
          class="bg-uipink rounded-full w-8 h-8 flex items-center justify-center text-white font-medium text-xl"
        >
          <%= (user?.name || user?.email || 'A').charAt(0).toLocaleUpperCase() %>
        </div>
        <% } %>
      </button>

      <div
        class="hidden absolute right-0 z-50 mt-2 w-48 text-base text-left list-none bg-white divide-y divide-gray-100 rounded-lg shadow"
        id="user-dropdown"
      >
        <div class="px-4 pt-3 pb-1">
          <span class="block text-sm text-gray-900"><%= user?.name %></span>
          <span class="block text-sm text-gray-500 truncate"><%= user?.email %></span>
        </div>
        <ul class="block pb-2">
          <% profilePages?.forEach(page => { %>
          <li class="block w-full hover:bg-gray-100">
            <a href="<%= page.url %>" class="block px-4 py-2 text-sm text-gray-700"
              ><%= page.name %></a
            >
          </li>
          <% }) %>
          <li class="block w-full hover:bg-gray-100">
            <a href="/logto/sign-out" class="block px-4 py-2 text-sm text-gray-700">Sign out</a>
          </li>
        </ul>
      </div>
    </div>
    <div class="relative xl:hidden">
      <button
        type="button"
        class="flex xl:hidden text-sm p-1 border-2 border-solid border-transparent focus:border-primary-100 rounded-lg focus:ring-0"
        id="hamburger-menu-button"
        aria-expanded="false"
        data-dropdown-toggle="hamburger-dropdown"
        data-dropdown-placement="bottom"
      >
        <span class="sr-only">Open menu</span>
        <svg
          class="w-5 h-5"
          aria-hidden="true"
          xmlns="http://www.w3.org/2000/svg"
          fill="none"
          viewBox="0 0 17 14"
        >
          <path
            stroke="currentColor"
            stroke-linecap="round"
            stroke-linejoin="round"
            stroke-width="2"
            d="M1 1h15M1 7h15M1 13h15"
          ></path>
        </svg>
      </button>

      <div
        class="hidden xl:hidden absolute right-0 z-50 mt-2 w-48 text-base text-left list-none bg-white divide-y divide-gray-100 rounded-lg shadow"
        id="hamburger-dropdown"
      >
        <ul class="block py-2">
          <% navPages?.forEach(page => { %>
          <li class="block w-full hover:bg-gray-100">
            <a href="<%= page.url %>" class="block px-4 py-2 text-sm text-gray-700"
              ><%= page.name %></a
            >
          </li>
          <% }) %>
        </ul>
      </div>
    </div>
  </div>
</nav>

<%- include('../pages/partials/dropdown-toggle'); -%>