chess clock template

pull/1/merge
Thibault Duplessis 2012-05-27 13:43:42 +02:00
parent fc521ed72c
commit e40dd84d6e
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,13 @@
@(clock: chess.Clock, color: chess.Color, position: String)(implicit ctx: Context)
clock for @color
@import scala.math.floor
@defining(clock.remainingTime(color)) { time =>
<div class="clock
clock_@position
clock_@color
@{ (time == 0).fold("outoftime", "") }"
data-time="@time">
@{ """%02d:%02d""".format(floor(time / 60d).toInt, (time % 60).toInt) }
</div>
}

View File

@ -2,7 +2,7 @@
.tipsy { padding: 5px; font-size: 10px; position: absolute; z-index: 100000; text-shadow: none; }
.tipsy-inner { padding: 5px 8px 4px 8px; background-color: black; color: white; max-width: 200px; text-align: center; }
.tipsy-inner { border-radius: 3px; -moz-border-radius:3px; -webkit-border-radius:3px; }
.tipsy-arrow { position: absolute; background: url('../vendor/tipsy/images/tipsy.gif') no-repeat top left; width: 9px; height: 5px; }
.tipsy-arrow { position: absolute; background: url('../javascripts/vendor/tipsy/images/tipsy.gif') no-repeat top left; width: 9px; height: 5px; }
.tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -4px; }
.tipsy-nw .tipsy-arrow { top: 0; left: 10px; }
.tipsy-ne .tipsy-arrow { top: 0; right: 10px; }