sub my_html_template { my (%opt) = @_; my $heading = textify(basename($0)) !~ /index/ ? textify(basename($0)) : 'My '.lc((split(/\//,cwd))[-1]); my $title = textify(join(' - ',($root_name,map(ucfirst,split(/\//,$relative_path))))); $title .= textify(" - $opt{heading}") if $opt{heading}; my $page_heading = $opt{heading} ? $opt{heading} : $heading; my $page_heading_id = idify($page_heading); $page_heading =~ s/_/ /g; html(0, { head => { title => $title, links => [map {{ rel => 'stylesheet', type => 'text/css', href => $_ }} get_styles($root_path.'/files/css')], scripts => [{ type => 'text/javascript', src => "$root_link/files/javascript/list.js" }] }, body => [ sub { nav(2, sub { heading(3,1,'Site menu', { id => 'Site_menu' }); list(4,'u',get_menu( directory => $root_path, tab => 2, color => 0, full => 0 ), { onclick => 'list_onclick(event)' }); link_list(3,qq($root_user off-site),%other_sites); link_list(3,qq(Reciprocated links),%reciprocated_links); }); article(2, sub { heading(3,1,$page_heading, { id => $page_heading_id }); &{$opt{code}}; paragraph(4,"Contact $link{mail}!", { class => 'address' }); # I should use the address tag here. paragraph(4,'I am against the Internet Blacklist Legislation ...', { class => 'address' }); }); }], }); }