Sha256: 5e71844d355416aba35dfd593d8154771dafa6e51488dbf6b110365e72395f8b

Contents?: true

Size: 1.33 KB

Versions: 7

Compression:

Stored size: 1.33 KB

Contents

<% expand ||= false %>

<% if expand %>
  <div class="mb-3">
    <%= render 'account/shared/menu/heading' do %>
      <%= title %>
    <% end %>

    <%= yield %>
  </div>
<% else %>
  <div>
    <div class="inline-block relative group" id="<%= title.underscore %>">
      <%= render 'account/shared/menu/heading' do %>
        <%= title %>

        <svg class="inline-block flex-shrink-0 h-3 w-3 <%= @menu_orientation == :top ? "rotate-90 -mt-0.5" : "" %>" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
          <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
        </svg>
      <% end %>

      <div class="invisible absolute group-hover:visible transition duration-200 scale-90 group-hover:scale-100 z-40
        <%= @menu_orientation == :top ? "group-hover:translate-x-3 top-100 left-0 -ml-10 -mt-2 pt-4" : "group-hover:translate-x-3 top-0 left-full -mt-3 -ml-5 pl-4" %>
      ">
        <div class="bg-primary-700 rounded-lg py-3 px-4 w-56 shadow">
          <% @last_menu_orientation = @menu_orientation %>
          <% @menu_orientation = :side %>
          <%= yield %>
          <% @menu_orientation = @last_menu_orientation%>
        </div>
      </div>
    </div>
  </div>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.2.10 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.9 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.8 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.7 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.6 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.5 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.4 app/views/themes/light/menu/_subsection.html.erb