Просмотр исходного кода

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

Morten Brix Pedersen 25 лет назад
Родитель
Сommit
350cbb2de0
3 измененных файлов с 4 добавлено и 2 удалено
  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
 vlink               Color of visited links
 hlink               Color of hovered links
 hlink               Color of hovered links
 headline            Border color of headlines
 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
 pic_height          Hardcode user picture sizes on stats page. This is when
                     user has a pic, and you want to make it smaller.
                     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",
         hlink => "#0b407a",
         headline => "#000000",
         headline => "#000000",
         rankc => "#CCCCCC",
         rankc => "#CCCCCC",
+        hi_rankc => "#AAAAAA",
 
 
         pic_width => '',
         pic_width => '',
         pic_height => '',
         pic_height => '',

+ 1 - 1
modules/Pisg/HTMLGenerator.pm

@@ -329,7 +329,7 @@ sub _activetimes
     _html("</tr><tr>");
     _html("</tr><tr>");
 
 
     for ($b = 0; $b < 24; $b++) {
     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>");
         _html("<td bgcolor=\"$tbgcolor\" align=\"center\" class=\"small\">$b</td>");
 }
 }