OSDN Git Service

Show players who have accessed in the last 30 minutes with
authorbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Sat, 3 May 2008 07:11:55 +0000 (07:11 +0000)
committerbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Sat, 3 May 2008 07:11:55 +0000 (07:11 +0000)
different colors.

changelog
mk_html

index 234791d..1021d36 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,9 @@
+2008-05-03 Daigo Moriwaki <daigo at debian dot org>
+
+       * [mk_html]
+       - Show players who have accessed in the last 30 minutes with 
+         different colors.
+
 2008-04-22 Daigo Moriwaki <daigo at debian dot org>
 
        * [mk_html]
diff --git a/mk_html b/mk_html
index 0d9423f..bc4a5bf 100755 (executable)
--- a/mk_html
+++ b/mk_html
@@ -118,9 +118,10 @@ def main
     
     player_decoration = "default"
 
-    case (Time.now - last_modified)/(60*60*24)
-    when (0..1) then player_decoration = "today"
-    when (0..7) then player_decoration = "this_week"
+    case (Time.now - last_modified)/60 # minutes
+    when (0..30)        then player_decoration = "current"
+    when (0..(1*60*24)) then player_decoration = "today"
+    when (0..(7*60*24)) then player_decoration = "this_week"
     end
     
     case key
@@ -204,8 +205,9 @@ __END__
     .rate, .ngames, .win_rate {text-align: right;}
     .last_modified {text-align: center;}
     .gps, .yowai_gps {background-color: lightgreen;}
-    .today     {background-color: #FFD700;}
-    .this_week {background-color: #FFDAB9;}
+    .current   {background-color: #FFFF00;}
+    .today     {background-color: #FFFF77;}
+    .this_week {background-color: #FFFFAA;}
 
     #bd {text-align: center;}
     #ft {text-align: right;}