X-Git-Url: http://git.sourceforge.jp/view?p=shogi-server%2Fshogi-server.git;a=blobdiff_plain;f=mk_html;h=52a2f76b165cc7795ff8ca1c51dc6aa51552256d;hp=bc4a5bf7a74d05a9b8e7a1e5e2dbd534c2c8e5e4;hb=74d7cf8228f995bb8f9f0d3d722fa8f3d340f8bd;hpb=75b4607297cb7d637f3d6c03091f2584736bed33 diff --git a/mk_html b/mk_html index bc4a5bf..52a2f76 100755 --- a/mk_html +++ b/mk_html @@ -42,7 +42,14 @@ require 'erb' include ERB::Util def show_date(time) - time.strftime("%Y-%m-%d") + if (Time.now - time < 30*60) + return "on line" + elsif (Time.now - time < 24*60*60) + return time.strftime("%Y-%m-%d") + # return "%d hours ago" % [(Time.now - time)/3600] + else + return time.strftime("%Y-%m-%d") + end end def usage @@ -205,8 +212,8 @@ __END__ .rate, .ngames, .win_rate {text-align: right;} .last_modified {text-align: center;} .gps, .yowai_gps {background-color: lightgreen;} - .current {background-color: #FFFF00;} - .today {background-color: #FFFF77;} + .current {background-color: #FFD700;} + .today {background-color: #FFFF00;} .this_week {background-color: #FFFFAA;} #bd {text-align: center;}