Fixing mobile-foldable.

This commit is contained in:
Sergiotarxz 2023-08-29 00:02:27 +02:00
parent 0dfec91375
commit df6fecc018
3 changed files with 16 additions and 15 deletions

View File

@ -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">

View 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>

View File

@ -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>