<%= leaf_item_tag(leaf) do %> <%= image_tag "handle.svg", aria: { hidden: true }, size: 24 %> Move <%= leaf.title %> <%= link_to leafable_path(leaf), class: "toc__thumbnail", data: { turbo_frame: "_top" } do %> <%= leaf.section.body if leaf.section? %> <%= leaf.leafable.body.to_html if leaf.page? %> <%= image_tag leaf.leafable.image.variant(:large) if leaf.picture&.image&.attached? %> <% end %>
<%= form_with model: [ leaf.book, leaf ], url: leafable_path(leaf), class: "flex align-center max-width min-width", id: dom_id(leaf, "form") do |form| %> <%= form.text_field :title, class: "input full-width", autofocus: true, autocomplete: "off", data: { controller: "autoselect" } %> <% end %> <%= button_to leafable_path(leaf), method: :delete, class: "btn btn--negative txt-small" do %> <%= image_tag "trash.svg", aria: { hidden: true }, size: 24 %> Delete this page <% end %>
<% if leaf.page? %> <%= word_count(leaf.leafable.body.content) %> <% end %> <%= yield if block_given? %> <% end %>