16 lines
647 B
Plaintext
16 lines
647 B
Plaintext
|
<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>
|