diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-07-23 21:18:08 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-08-20 13:56:22 +0200 |
commit | 5b665a840bd3193c9be7b21fbe6f66e119e92d74 (patch) | |
tree | db77f95672db121ee608b9ddcd57a2f7434ce5b4 /views | |
parent | cb73d0710b0eb84d4f788ff9b1d36ed0b02bf970 (diff) | |
download | server-5b665a840bd3193c9be7b21fbe6f66e119e92d74.tar.gz |
New time control.
Diffstat (limited to 'views')
-rw-r--r-- | views/create.pug | 24 | ||||
-rw-r--r-- | views/head.pug | 8 |
2 files changed, 9 insertions, 23 deletions
diff --git a/views/create.pug b/views/create.pug index 912156c..d45903e 100644 --- a/views/create.pug +++ b/views/create.pug @@ -49,25 +49,11 @@ html input(type="text" autocomplete="off" name="notice" size=45 placeholder="What are you looking for?") p Pace: - br - label - input(type="radio" name="pace" value="0" checked) - | Any - - br - label - input(type="radio" name="pace" value="1") - | #{EMOJI_LIVE} Live - - br - label - input(type="radio" name="pace" value="2") - | #{EMOJI_FAST} Fast <i>– many moves per day</i> - - br - label - input(type="radio" name="pace" value="3") - | #{EMOJI_SLOW} Slow <i>– one move per day</i> + each text, pace in PACE_TEXT + br + label + input(type="radio" name="pace" value=pace checked=pace===0) + | #{PACE_ICON[pace]} #{text} p label diff --git a/views/head.pug b/views/head.pug index e4ff857..00e0ada 100644 --- a/views/head.pug +++ b/views/head.pug @@ -62,10 +62,10 @@ mixin gamelist(list,hide_title=0) else if (item.status === 3) className += " archived" if (item.is_unread) chat_icon = "\u{1f4dd}" if (item.is_private) pace_icon += EMOJI_PRIVATE - if (item.is_match) pace_icon += EMOJI_MATCH - else if (item.pace === 1) pace_icon += EMOJI_LIVE, pace_text = "Live!" - else if (item.pace === 2) pace_icon += EMOJI_FAST, pace_text = "Fast - many moves per day" - else if (item.pace === 3) pace_icon += EMOJI_SLOW, pace_text = "Slow - one move per day" + if (item.is_match) + pace_icon += EMOJI_MATCH + else if (item.pace > 0) + pace_icon += PACE_ICON[item.pace], pace_text = PACE_TEXT[item.pace] div(class=className) div.game_head |