Sha256: ab1013ec8d1ad8576a8b8f6c149214cf7d751064ff330d9e249c992f28b14b91

Contents?: true

Size: 828 Bytes

Versions: 5

Compression:

Stored size: 828 Bytes

Contents

<li <% if collection.hierarchy_depth == 1 %> class="py-1 border-b border-gray-300 cursor-pointer"<% end %> data-type="collection"
  x-data="{id: '<%= collection.id %>', hidden: false}"
  @filtered="$nextTick(() => {hidden = !$el.querySelectorAll('[data-type=preview]:not(.hidden)').length})"
  :class="{hidden}">
  <div @click="open[id] = !open[id]" style="<%= nav_padding_style(collection.hierarchy_depth) %>">
    <%= render "partials/nav/label", text: collection.label, icon: "folder" %>
  </div>
  <ul x-show="isOpen(id)" x-cloak>
    <% collection.items.each do |item| %>
      <% if item.type == :collection %>
        <%= render "partials/nav/collection", collection: item %>
      <% elsif item.type == :preview %>
        <%= render "partials/nav/preview", preview: item %>
      <% end %>
    <% end %> 
  </ul>
</li>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lookbook-0.2.4 app/views/lookbook/partials/nav/_collection.html.erb
lookbook-0.2.3 app/views/lookbook/partials/nav/_collection.html.erb
lookbook-0.2.2 app/views/lookbook/partials/nav/_collection.html.erb
lookbook-0.2.1 app/views/lookbook/partials/nav/_collection.html.erb
lookbook-0.2.0 app/views/lookbook/partials/nav/_collection.html.erb