Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.2 KB
Raw Blame
<%# locals: groups (Docs::Catalogue::Group), active_slug (String|nil)

    Slim tree over the docs-engine navigation — fixed 2 levels (section → pages).
    Deliberately NOT shared with the documentation area's _tree partial: that one
    recurses over arbitrarily deep git trees (DirNode/PageNode) — a shared
    component would abstract over two different shapes (D5). The LOOK mirrors it. %>
<ul class="flex flex-col gap-0.5 text-sm">
  <% groups.each do |group| %>
    <li>
      <p class="mt-3 mb-0.5 px-1 text-xs font-semibold uppercase tracking-wide text-muted"><%= group.title %></p>
      <div class="border-l border-cream-300 pl-2">
        <ul class="flex flex-col gap-0.5">
          <% group.items.each do |item| %>
            <li>
              <%= link_to help_page_path(slug: item.slug),
                    class: "flex items-center gap-2 rounded-md px-2 py-1 #{item.slug == active_slug ? 'bg-selected font-medium text-heading' : 'text-body hover:bg-surface-raised'}" do %>
                <span class="truncate"><%= item.title %></span>
              <% end %>
            </li>
          <% end %>
        </ul>
      </div>
    </li>
  <% end %>
</ul>