% title = request.path_info[1..-1].capitalize.gsub(/\/$/, "") %>
<%= title %>
<%= erb :headerBoilerplate %>
<%= erb :asidemenu %>
<%= erb :topbar %>
<% folder = request.path_info[1..-1] %>
<% if !Dir.exists?(folder) %>
<%= erb :noFolder, locals: {folder: folder} %>
<% else %>
<% if Dir.children("./" + folder).empty? %>
<%= erb :noFile, locals: {file: folder } %>
<% else %>
<%= erb :index, locals: {folders: [folder], searchquery: ""} %>
<%= erb :search, locals: {folder: folder} %>
<% end %>
<% end %>
<%= erb :bottom %>