Fixing mobile-foldable.
This commit is contained in:
parent
0dfec91375
commit
df6fecc018
@ -36,6 +36,7 @@
|
||||
%= include 'page/_mobile_menu', categories => $categories
|
||||
<div class="page-contents">
|
||||
%= include 'page/_desktop_menu', categories => $categories, current_category_slug => $current_category_slug
|
||||
%= include 'page/_mobile_foldable', categories => $categories
|
||||
<%= content %></body>
|
||||
<hr/>
|
||||
<div class="footer description">
|
||||
|
15
templates/page/_mobile_foldable.html.ep
Normal file
15
templates/page/_mobile_foldable.html.ep
Normal file
@ -0,0 +1,15 @@
|
||||
<nav class="mobile-foldable" id="mobile-foldable"><%
|
||||
my $first = 1;
|
||||
for my $category_key (sort {
|
||||
$categories->{$a}{priority} <=> $categories->{$b}{priority}
|
||||
} keys %$categories) {
|
||||
my $category = $categories->{$category_key};
|
||||
if (defined $category->{parent} || $category->{slug} eq 'index') {
|
||||
next;
|
||||
}
|
||||
%><a href="<%= '/'.$category->{slug} %>"><%==$category->{menu_text}%></a><div class="child-categories-mobile"><%
|
||||
for my $child_category ($category->{children}->@*) {
|
||||
%><a href="<%="/$child_category->{slug}"%>">* <%==$child_category->{menu_text}%></a><%
|
||||
}%></div><%
|
||||
}
|
||||
%></nav>
|
@ -7,18 +7,3 @@
|
||||
<img class="open-menu-icon-hover" src="/img/hamburger-menu-purple.webp" alt="Expandir el menú."/>
|
||||
</a>
|
||||
</nav>
|
||||
<nav class="mobile-foldable" id="mobile-foldable"><%
|
||||
my $first = 1;
|
||||
for my $category_key (sort {
|
||||
$categories->{$a}{priority} <=> $categories->{$b}{priority}
|
||||
} keys %$categories) {
|
||||
my $category = $categories->{$category_key};
|
||||
if (defined $category->{parent} || $category->{slug} eq 'index') {
|
||||
next;
|
||||
}
|
||||
%><a href="<%= '/'.$category->{slug} %>"><%==$category->{menu_text}%></a><div class="child-categories-mobile"><%
|
||||
for my $child_category ($category->{children}->@*) {
|
||||
%><a href="<%="/$child_category->{slug}"%>">* <%==$child_category->{menu_text}%></a><%
|
||||
}%></div><%
|
||||
}
|
||||
%></nav>
|
||||
|
Loading…
Reference in New Issue
Block a user