-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Do not expand menu in mobile by default
- Loading branch information
1 parent
0db28d7
commit 947882e
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
app/views/decidim/shared/_extended_navigation_bar.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<div class="row expanded"> | ||
<div class="process-nav"> | ||
<div class="row"> | ||
<button class="process-nav__trigger hide-for-medium" data-toggle="process-nav-content"> | ||
<%= icon "caret-bottom", class: "icon--small process-nav__trigger__icon", aria_label: t("decidim.shared.extended_navigation_bar.unfold"), role: "img" %> | ||
<% default_item = active_item || items.first %> | ||
<span class="process-nav__link"> | ||
<%= default_item[:name] %> | ||
</span> | ||
</button> | ||
<div class="row column process-nav__content" id="process-nav-content" data-toggler=".is-active"> | ||
<ul> | ||
<% items.each_with_index do |item, index| %> | ||
<li class="<%= "is-active" if item[:active] %> <%= "hide-for-medium" if index > max_items %>"> | ||
<%= link_to item[:url], class: "process-nav__link #{item[:active] ? 'active' : nil}" do %> | ||
<%= item[:name] %> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
|
||
<% if extra_items.any? %> | ||
<button class="button tiny process-nav__more show-for-medium" data-toggle="process-nav__hide-content"> | ||
<%= t("decidim.shared.extended_navigation_bar.more") %> <i></i><i></i><i></i> | ||
</button> | ||
<div class="dropdown-pane process-nav__hidden-content" id="process-nav__hide-content" | ||
data-dropdown | ||
data-hover="true" | ||
data-hover-pane="true" | ||
data-v-offset="-25" | ||
data-position="bottom" | ||
data-alignment="right"> | ||
<div class="process-nav__hidden-content__more"> | ||
<%= t("decidim.shared.extended_navigation_bar.more") %> <i></i><i></i><i></i> | ||
</div> | ||
<ul> | ||
<% extra_items.each do |item| %> | ||
<li class="<%= "is-active" if item[:active] %>"> | ||
<%= link_to item[:url], class: "process-nav__link #{item[:active] ? 'active' : nil}" do %> | ||
<%= item[:name] %> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |