]> bicyclesonthemoon.info Git - ott/bsta/commitdiff
show ong time; relocate generation time v1.2.10
authorb <rowerynaksiezycu@gmail.com>
Sun, 2 Mar 2025 19:06:11 +0000 (19:06 +0000)
committerb <rowerynaksiezycu@gmail.com>
Sun, 2 Mar 2025 19:06:11 +0000 (19:06 +0000)
bsta.css
bsta_lib.1.pm

index dd3277f92e8dff813667b0b05ce95c4c34fcc197..3ee3dc54997ddd914f9da84ed063987f643783a3 100644 (file)
--- 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;
index 92566d505818df9709d6caa16fcc6030b93398d3..0900f0b37bd4635e459ced00efd766e7d38fc9f1 100644 (file)
@@ -698,31 +698,32 @@ sub print_html_body_start {
 
 sub print_html_body_end {
        (my $fh, my $hide_credits) = @_;
-       print $fh '  </div>'."\n";
-       unless ($hide_credits) {
-               print $fh '  <p>'."\n";
-               print $fh '   '.html_entity_encode_dec(STORY_CREDITS(),1).'<br>'."\n";
-               print $fh '   '.html_entity_encode_dec(INTF_CREDITS(),1).'<br>'."\n";
-               print $fh '   <a href="'.html_entity_encode_dec(SOURCE_URL(),1).'" class="cz">source code</a>'."\n";
-               print $fh '  </p>'."\n";
-       }
-       print $fh '  <p>'."\n";
-       print $fh '   <a href="/" class="cz">'.html_entity_encode_dec(WEBSITE(),1).'</a>'."\n";
-       print $fh '  </p>'."\n";
        unless ($hide_credits) {
                my $gen_time = time();
                my @time_tab = gmtime($gen_time);
-               print $fh '  <p>'."\n";
+               print $fh '   <div class="when" id="generated" >'."\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 '   </div>'."\n";
+       }
+       print $fh '  </div>'."\n";
+       unless ($hide_credits) {
+               print $fh '  <p>'."\n";
+               print $fh '   '.html_entity_encode_dec(STORY_CREDITS(),1).'<br>'."\n";
+               print $fh '   '.html_entity_encode_dec(INTF_CREDITS(),1).'<br>'."\n";
+               print $fh '   <a href="'.html_entity_encode_dec(SOURCE_URL(),1).'" class="cz">source code</a>'."\n";
                print $fh '  </p>'."\n";
        }
+       print $fh '  <p>'."\n";
+       print $fh '   <a href="/" class="cz">'.html_entity_encode_dec(WEBSITE(),1).'</a>'."\n";
+       print $fh '  </p>'."\n";
        print $fh ' </body>'."\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 "   </div>\n";
        
+       if ($show_ongtime) {
+               print $fh '    <div class="space when" id="ongtime">'."\n";
+               print $fh '   <b>'.$ongtime.'</b>'."\n";
+               print $fh '   </div>'."\n";
+       }
+       
        if (($text_mode == TEXT_MODE->{'words'}) && $show_words) {
+               unless ($show_ongtime) {
+                       print $fh '   <div class="space"></div>'."\n";
+               }
                print_comments($fh, $context, $settings, $words_data);
        }
        
@@ -1483,7 +1507,6 @@ sub print_comments {
                $links .= '    </div>'."\n";
        }
        
-       print $fh '   <div class="space"></div>'."\n";
        print $fh '   <div id="insw" class="ins">'."\n";
        
        print $fh '    <div class="title" id="wordstitle">'."\n";