Sha256: 7e0b692ca05fc688260866f0270b29693f2bd5f02f1e0140b05a5fd748d7c124

Contents?: true

Size: 1.48 KB

Versions: 17

Compression:

Stored size: 1.48 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" data-controller="desktop-menu" data-action="keydown->desktop-menu#hideSubmenu" 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" %>
      "
        data-desktop-menu-target="menuItemGroup"
      >
        <div class="bg-primary-700 dark:bg-slate-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

17 entries across 17 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.2.27 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.26 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.25 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.24 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.23 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.22 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.21 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.20 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.19 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.18 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.17 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.16 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.15 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.14 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.13 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.12 app/views/themes/light/menu/_subsection.html.erb
bullet_train-themes-light-1.2.11 app/views/themes/light/menu/_subsection.html.erb