Parcourir la source

Add new color: 'hi_rankc' for highlighted ranks, and use rankc and hi_rankc
in activetimes

Morten Brix Pedersen il y a 25 ans
Parent
commit
350cbb2de0
3 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 2 1
      docs/CONFIG-README
  2. 1 0
      modules/Pisg.pm
  3. 1 1
      modules/Pisg/HTMLGenerator.pm

+ 2 - 1
docs/CONFIG-README

@@ -189,7 +189,8 @@ link                Color of links
 vlink               Color of visited links
 hlink               Color of hovered links
 headline            Border color of headlines
-rankc               Colors of 'ranks' (1,2,3,4)
+rankc               Colors of 'ranks' (1,2,3,4) and active times
+hi_rankc            Highlighted ranks
 
 pic_height          Hardcode user picture sizes on stats page. This is when
                     user has a pic, and you want to make it smaller.

+ 1 - 0
modules/Pisg.pm

@@ -135,6 +135,7 @@ sub get_default_config_settings
         hlink => "#0b407a",
         headline => "#000000",
         rankc => "#CCCCCC",
+        hi_rankc => "#AAAAAA",
 
         pic_width => '',
         pic_height => '',

+ 1 - 1
modules/Pisg/HTMLGenerator.pm

@@ -329,7 +329,7 @@ sub _activetimes
     _html("</tr><tr>");
 
     for ($b = 0; $b < 24; $b++) {
-        if ($now[2] == $b) { $tbgcolor = "\#AAAAAA"; } else { $tbgcolor = "\#CCCCCC"; }
+        if ($now[2] == $b) { $tbgcolor = $self->{cfg}->{hi_rankc}; } else { $tbgcolor = $self->{cfg}->{rankc}; }
         _html("<td bgcolor=\"$tbgcolor\" align=\"center\" class=\"small\">$b</td>");
 }