From: b Date: Sun, 2 Mar 2025 19:06:11 +0000 (+0000) Subject: show ong time; relocate generation time X-Git-Tag: v1.2.10 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=46e96472a9aaa5fdeb7246e80d7fbf8dd60fd045;p=ott%2Fbsta show ong time; relocate generation time --- diff --git a/bsta.css b/bsta.css index dd3277f..3ee3dc5 100644 --- a/bsta.css +++ b/bsta.css @@ -57,6 +57,18 @@ div.all text-align: center; } +div.when +{ + background-color: #46a3ff; + border-color: #000000; + color: #000000; + text-align: right; +} +div#generated +{ + font-size: 75% +} + div.ins { background-color: #ffffff; diff --git a/bsta_lib.1.pm b/bsta_lib.1.pm index 92566d5..0900f0b 100644 --- a/bsta_lib.1.pm +++ b/bsta_lib.1.pm @@ -698,31 +698,32 @@ sub print_html_body_start { sub print_html_body_end { (my $fh, my $hide_credits) = @_; - print $fh ' '."\n"; - unless ($hide_credits) { - print $fh '

'."\n"; - print $fh ' '.html_entity_encode_dec(STORY_CREDITS(),1).'
'."\n"; - print $fh ' '.html_entity_encode_dec(INTF_CREDITS(),1).'
'."\n"; - print $fh ' source code'."\n"; - print $fh '

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

'."\n"; - print $fh ' '.html_entity_encode_dec(WEBSITE(),1).''."\n"; - print $fh '

'."\n"; unless ($hide_credits) { my $gen_time = time(); my @time_tab = gmtime($gen_time); - print $fh '

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

'."\n"; print $fh sprintf ( - ' Page generated %04d.%02d.%02d %02d:%02d UTC.'."\n", + ' Page generated %04d.%02d.%02d %02d:%02d:%02d UTC.'."\n", $time_tab[5]+1900, $time_tab[4]+1, $time_tab[3], $time_tab[2], - $time_tab[1] + $time_tab[1], + $time_tab[0] ); + print $fh '
'."\n"; + } + print $fh ' '."\n"; + unless ($hide_credits) { + print $fh '

'."\n"; + print $fh ' '.html_entity_encode_dec(STORY_CREDITS(),1).'
'."\n"; + print $fh ' '.html_entity_encode_dec(INTF_CREDITS(),1).'
'."\n"; + print $fh ' source code'."\n"; print $fh '

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

'."\n"; + print $fh ' '.html_entity_encode_dec(WEBSITE(),1).''."\n"; + print $fh '

'."\n"; print $fh ' '."\n"; } @@ -946,6 +947,20 @@ sub print_viewer_page { $timer_s = 'EE'; } + my $show_ongtime = (($frame_data->{'ongtime'} ne '') && (!$launch)); + my $ongtime = ''; + if ($show_ongtime) { + my @ongtime_tab = gmtime($frame_data->{'ongtime'}); + $ongtime = sprintf ( + '%04d.%02d.%02d %02d:%02d', + $ongtime_tab[5]+1900, + $ongtime_tab[4]+1, + $ongtime_tab[3], + $ongtime_tab[2], + $ongtime_tab[1] + ); + } + my $words_posts = int($words_data->{'posts'}); my $words_link_text = 'Words'.(($words_posts > 0) ? "[$words_posts]" : ''); @@ -1394,7 +1409,16 @@ sub print_viewer_page { print $fh " \n"; + if ($show_ongtime) { + print $fh '
'."\n"; + print $fh ' '.$ongtime.''."\n"; + print $fh '
'."\n"; + } + if (($text_mode == TEXT_MODE->{'words'}) && $show_words) { + unless ($show_ongtime) { + print $fh '
'."\n"; + } print_comments($fh, $context, $settings, $words_data); } @@ -1483,7 +1507,6 @@ sub print_comments { $links .= ' '."\n"; } - print $fh '
'."\n"; print $fh '
'."\n"; print $fh '
'."\n";