<% helper = Scrapbook::HelperForView.new(self) listing = Scrapbook::FolderListingViewModel.new(self, scrapbook, pathname) pathname_without_handler_exts = helper.remove_handler_exts_from(pathname) indentation_depth = (local_assigns[:nav_depth] || listing.depth) + 1 selection_classes = "active:bg-sky-200 hover:bg-sky-50 [&:has([aria-current=page])]:bg-sky-100" %> <% unless listing.root? %><%= link_to "‹ #{listing.parent_display_name}", helper.short_path_to(listing.pathname.parent, scrapbook), class: 'back-to-parent block w-100' %><% end %>
<%= helper.nav_link_for(scrapbook: scrapbook, pathname: listing.pathname, is_current: pathname == listing.pathname) %>