Blame tpl/playerpage.tpl

3c1a85
{include:header.tpl}
3c1a85
{if:friend.id}
URL for the friend: {:host}{:prefix}/{:friend.id}
{endif}
3c1a85
{:me.name}, score: {:score}, turn: {:turn}
3c1a85
3c1a85

{:word}

d30ecd
<small>{:wordSource}</small>
3c1a85
3c1a85
3c1a85
{if:win}
3c1a85
Answers are equal. You win!
3c1a85
{endif}
3c1a85
{if:lose}
3c1a85
Answers are different. You lose...
3c1a85
{endif}
3c1a85
3c1a85
{if:waiting}
3c1a85
    
waiting for the friend
3c1a85
{else}{if:selected}
3c1a85
    <form action="{:prefix}/{:me.id}/ready" id="ready" method="POST"></form>
3c1a85
    <input autocomplete="off" name="word" placeholder="here you may suggest your word for the next turn" size="40" type="text" value="">
3c1a85
    <input name="submit" type="submit" value="next turn">
3c1a85
    
3c1a85
{endif}{endif}
3c1a85
3c1a85
my selection: {:me.selection}, friend's selection: {:friend.selection}
3c1a85
3c1a85
{loop:cards::card}
04af49
<form action="{:prefix}/{:me.id}/select/{:card.index}" class="card{if:card.my} myCard{endif}{if:card.friends} friendsCard{endif}" id="fi{:card.index}" method="POST"></form>
04af49
{if:me.selected}{else}<input class="bottom" type="submit" value="select">{endif}
3c1a85
3c1a85
{endloop}
3c1a85
3c1a85

3c1a85
3c1a85
04af49
<script></script>
04af49
    function processCard(e) {
04af49
        e.style.cursor = "pointer";
04af49
        e.onclick = function() { document.getElementById("f" + e.id).submit(); }
04af49
    }
04af49
    var l = document.getElementsByClassName("top");
04af49
    for(var i = 0; i < l.length; i++)
04af49
        if (l[i].tagName == "IMG") processCard(l[i]);
04af49
04af49
3c1a85
{include:footer.tpl}