version 1.418, 2025/02/18 03:42:04
|
version 1.419, 2025/03/03 22:03:02
|
Line 3976 sub list_from_array {
|
Line 3976 sub list_from_array {
|
sub generate_menu { |
sub generate_menu { |
my @menu = @_; |
my @menu = @_; |
# subs for specific html elements |
# subs for specific html elements |
my ($h3, $div, $ul, $li, $a, $img) = inittags( qw(h3 div ul li a img) ); |
my ($h2, $div, $ul, $li, $a, $img) = inittags( qw(h2 div ul li a img) ); |
|
|
my @categories; # each element represents the entire markup for a category |
my @categories; # each element represents the entire markup for a category |
|
|
Line 4014 sub generate_menu {
|
Line 4014 sub generate_menu {
|
{class => "LC_menubuttons_inline_text"})); |
{class => "LC_menubuttons_inline_text"})); |
} |
} |
|
|
# wrap categorytitle in <h3>, concatenate with |
# wrap categorytitle in <h2>, concatenate with |
# joined and in <ul> tags wrapped @links |
# joined and in <ul> tags wrapped @links |
# and wrap everything in an enclosing <div> and push it into |
# and wrap everything in an enclosing <div> and push it into |
# @categories |
# @categories |
# such that each element looks like: |
# such that each element looks like: |
# <div><h3>title</h3><ul><li>...</li>...</ul></div> |
# <div><h2>title</h2><ul><li>...</li>...</ul></div> |
# the category won't be added if there aren't any links |
# the category won't be added if there aren't any links |
push(@categories, |
push(@categories, |
$div->($h3->(mt($$category{categorytitle}), {class=>"LC_hcell"}). |
$div->($h2->(mt($$category{categorytitle}), {class=>'LC_hcell LC_heading_2'}). |
$ul->(join('' ,@links), {class =>"LC_ListStyleNormal" }), |
$ul->(join('' ,@links), {class =>"LC_ListStyleNormal" }), |
{class=>"LC_Box LC_400Box"})) if scalar(@links); |
{class=>"LC_Box LC_400Box"})) if scalar(@links); |
} |
} |