Sha256: 256a39100280f52c5502ad5c8e9fcb742bde142ea39638063cca07800fad5bbc
Contents?: true
Size: 1.33 KB
Versions: 3
Compression:
Stored size: 1.33 KB
Contents
<% helper = Scrapbook::HelperForView.new(self) listing = Scrapbook::FolderListingViewModel.new(self, scrapbook, pathname) pathname_without_handler_exts = helper.remove_handler_exts_from(pathname) %> <% unless listing.root? %><%= link_to "‹ #{listing.parent_display_name}", helper.short_path_to(listing.pathname.parent), class: 'back-to-parent block w-100' %><% end %> <header aria-label="Which folder's contents" class="text-2xl <%= listing.pathname == pathname ? 'bg-sky-100' : '!px-0 children:px-4' %>"><% if listing.pathname == pathname %><span aria-current="page"><%= listing.header_name %></span><% else %><%= link_to(listing.header_name, helper.short_path_to(listing.pathname), class: 'block w-100') %><% end %></header> <ul class="!px-0" aria-label="Sub-folders"><% listing.folders.each do |folder| %><li class="children:px-4"><%= link_to "#{folder.basename}/", helper.short_path_to(folder, scrapbook), class: 'block w-100' %></li><% end %></ul> <ul class="!px-0" aria-label="Sub-files"><% listing.files.each do |file| %><% next if listing.folders.include?(file) %><li class="children:px-4"><% if file == pathname_without_handler_exts %><span class="block w-100 bg-sky-100" aria-current="page"><%= file.basename %></span><% else %><%= link_to file.basename, helper.short_path_to(file, scrapbook), class: 'block w-100' %><% end %></li><% end %></ul>
Version data entries
3 entries across 3 versions & 1 rubygems