From: b Date: Sat, 14 Oct 2023 22:54:50 +0000 (+0000) Subject: HTML output indented for readability X-Git-Tag: v1.1.0~27 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=578862b1b88e41b37013c141360cf843ccfe5f8c;p=ott%2Fbsta HTML output indented for readability --- diff --git a/bsta_lib.1.pm b/bsta_lib.1.pm index a2005c1..372ba20 100644 --- a/bsta_lib.1.pm +++ b/bsta_lib.1.pm @@ -19,6 +19,8 @@ # TODO: FQ NBSP ? # TODO: DEBUG +# TODO: timer JS +# TODO: BB & INFO indent package bsta_lib; @@ -175,19 +177,22 @@ sub failpage { print "Content-type: text/html; charset=UTF-8\n\n"; print ''."\n"; - print ''."\n"; - print ''."\n"; + print ' '."\n"; + print ' '."\n"; + print ' '."\n"; if ($title ne '') { - print ''.html_entity_encode_dec($title, 1).''."\n"; + print ' '.html_entity_encode_dec($title, 1).''."\n"; } - print ''."\n"; + print ' '."\n"; + print ' '."\n"; if ($title ne '') { - print '

'.html_entity_encode_dec($title, 1).'

'."\n"; + print '

'.html_entity_encode_dec($title, 1).'

'."\n"; } if ($message ne '') { - print '

'.html_entity_encode_dec($message, 1).'

'."\n"; + print '

'.html_entity_encode_dec($message, 1).'

'."\n"; } - print ''."\n"; + print ' '."\n"; + print ''."\n"; } sub fail_method { @@ -773,29 +778,29 @@ sub print_html_end { sub print_html_head_start { (my $fh) = @_; - print $fh ''."\n"; - print $fh ''."\n"; - print $fh ''."\n"; - print $fh ''."\n"; + print $fh ' '."\n"; + print $fh ' '."\n"; + print $fh ' '."\n"; + print $fh ' '."\n"; } sub print_html_head_end { (my $fh) = @_; - print $fh ''."\n"; + print $fh ' '."\n"; } sub print_html_body_start { (my $fh) = @_; - print $fh ''."\n"; - print $fh ''."\n"; - print $fh '
'."\n"; + print $fh ' '."\n"; + print $fh ' '."\n"; + print $fh '
'."\n"; } sub print_html_body_end { (my $fh) = @_; - print $fh '
'."\n"; - print $fh ''.html_entity_encode_dec(WEBSITE(),1).''."\n"; - print $fh ''."\n"; + print $fh '
'."\n"; + print $fh ' '.html_entity_encode_dec(WEBSITE(),1).''."\n"; + print $fh ' '."\n"; } sub print_html_data { @@ -1054,66 +1059,68 @@ sub print_viewer_page { print_html_start($fh); print_html_head_start($fh); - print $fh ''."\n"; - print $fh ''."\n"; + print $fh ' '."\n"; + print $fh ' '."\n"; if ($prev_available) { - print $fh ''."\n"; + print $fh ' '."\n"; } if ($next_available) { - print $fh ''."\n"; + print $fh ' '."\n"; if ($prefetch_next) { - print $fh ''."\n"; - print $fh ''."\n"; + print $fh ' '."\n"; + print $fh ' '."\n"; } } if ($show_timer) { - print $fh ''."\n"; + print $fh ' '."\n"; } print_html_head_end($fh); print_html_body_start($fh); - print $fh '
'."\n"; + print $fh '
'."\n"; - print $fh '
'."\n"; - print $fh '

'.$_title.'

'."\n"; - print $fh '
'."\n"; + print $fh '
'."\n"; + print $fh '

'.$_title.'

'."\n"; + print $fh '
'."\n"; - print $fh '
'."\n"; + print $fh '
'."\n"; + print $fh '
'."\n"; - print $fh ''.$frame.''."\n"; + print $fh ' '.$frame.''."\n"; - print $fh '
'."\n"; + print $fh '
'."\n"; + print $fh '
'."\n"; if ($text_mode == TEXT_MODE->{'info'}) { - print $fh '
'."\n"; + print $fh '
'."\n"; print_html_data($fh, $frame_data); - print $fh '
'."\n"; + print $fh '
'."\n"; } elsif ($text_mode == TEXT_MODE->{'bb'}) { - print $fh '
'."\n"; + print $fh '
'."\n"; print $fh '[quote][center][size=200]'.$_title.'[/size]
'."\n"; print $fh '[url='.$_viewer_full_url.'][img]'.$_frame_full_url.'[/img][/url][/center]
'."\n"; print $fh html_encode_line(bb_to_bbcode(eval_bb($frame_data->{'content'}))); print $fh '[/quote]'."\n"; - print $fh '
'."\n"; + print $fh '
'."\n"; } elsif ($frame_data->{'content'} ne '') { - print $fh '
'."\n"; + print $fh '
'."\n"; print $fh bb_to_html(eval_bb($frame_data->{'content'}))."\n"; - print $fh '
'."\n"; + print $fh '
'."\n"; } - print $fh '
'."\n"; + print $fh '
'."\n"; if ($show_timer) { - print $fh '['.$timer_h.''; - print $fh ':'.$timer_m.''; - print $fh ':'.$timer_s.']
'."\n"; + print $fh ' ['.$timer_h.''; + print $fh ':'.$timer_m.''; + print $fh ':'.$timer_s.']
'."\n"; } print $fh '>'; if ($show_command_link) { @@ -1128,9 +1135,10 @@ sub print_viewer_page { if ($show_command_link) { print $fh ''; } - print $fh "
\n
\n"; + print $fh "
\n"; + print $fh "
\n"; - print $fh '\n"; + print $fh "
\n"; + print $fh "
\n"; print_html_body_end($fh); print_html_end($fh);