This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/front/show_sitemap.html.erb

31 lines
889 B
Plaintext

<div class="site-map">
<% i = 1 %>
<% @items.each do |item| %>
<% if item.show_in_sitemap_for(I18n.locale.to_s) %>
<div class="map-block">
<h4><%= i %> <a href='<%= item.path %>'><%= item.title %></a></h4>
<ul>
<% ii = 1 %>
<% item.children.each do |child| %>
<% if child.show_in_sitemap_for(I18n.locale.to_s) %>
<li class="clear"><%= "#{i}-#{ii}" %> <a href='<%= child.path %>'><%= child.title %></a></span></li>
<% ii += 1 %>
<% end %>
<% end if item.children %>
</ul>
</div>
<% i += 1 %>
<% end %>
<% end %>
</div>
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
<script>
$(document).ready(function(){
$('.site-map').masonry({
itemSelector: '.map-block',
columnWidth: 220,
isAnimated: true
});
});
</script>