chess clock template
parent
fc521ed72c
commit
e40dd84d6e
|
@ -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>
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue