From: arun Date: Fri, 24 Nov 2006 09:31:48 +0000 (+0000) Subject: some small bugfixes, added better layout X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=b419a0604f118ce8697e236384e5110086e733b4;ds=inline some small bugfixes, added better layout --- diff --git a/index.php b/index.php index 4e890fa..3a7ecad 100644 --- a/index.php +++ b/index.php @@ -314,18 +314,18 @@ function card_value($card) function display_card($card) { if( $card/2 - (int)($card/2) == 0.5) - echo "\"".card_to_name($card)."\"\n"; + echo "\"".card_to_name($card)."\"\n"; else - echo "\"".card_to_name($card-1)."\"\n"; + echo "\"".card_to_name($card-1)."\"\n"; return; } function display_link_card($card,$me) { if( $card/2 - (int)($card/2) == 0.5) - echo "\"".card_to_name($card)."\"\n"; + echo "\"".card_to_name($card)."\"\n"; else - echo "\"".card_to_name($card-1)."\"\n"; + echo "\"".card_to_name($card-1)."\"\n"; return; } @@ -810,13 +810,14 @@ if(sizeof($lines)<2) /* show history */ foreach($history as $play) { - echo "
\n"; - $trick = explode(":",$play); $last=-2; /* found old trick, display it */ - echo "
\n"; + if(sizeof($trick)==5) + echo "
\n"; + else + echo "
\n"; for($i=0;$i",$card); if(strlen($tmp[2])>0) - echo "
"; + echo "
"; else - echo "
"; - echo $player[$hash[$tmp[0]]]["name"]." played
"; + echo "
"; + echo $player[$hash[$tmp[0]]]["name"]."
"; display_card($tmp[1]); /* check for comment */ if(strlen($tmp[2])>0) @@ -837,7 +838,7 @@ if(sizeof($lines)<2) echo "
\n"; } } - echo "
\n"; + echo "
\n"; } /* figure out who needs to play next */ @@ -888,7 +889,7 @@ if(sizeof($lines)<2) save_status(); echo "
"; - echo " you played
"; + echo " you played
"; display_card($card); echo "
\n"; @@ -1005,7 +1006,7 @@ who won? echo "
\n"; } /* end check for winner */ - echo "
"; + echo "
"; /* do we still have cards? display them */ if(strlen(trim($player[$me]["cards"]))>0 ) { @@ -1016,7 +1017,7 @@ who won? echo "

\n"; /* is it our turn? */ - if($hash[$next]==$me && !isset($_REQUEST["card"])) + if($hash[$next]==$me && !isset($_REQUEST["card"]) && !isset($_REQUEST["win"])) { echo "ITS YOUR TURN
\n"; echo "your cards are:
\n"; diff --git a/pics/stable0.png b/pics/stable0.png new file mode 100644 index 0000000..c18a662 Binary files /dev/null and b/pics/stable0.png differ diff --git a/pics/stable1.png b/pics/stable1.png new file mode 100644 index 0000000..78e5ed6 Binary files /dev/null and b/pics/stable1.png differ diff --git a/pics/stable2.png b/pics/stable2.png new file mode 100644 index 0000000..ce8698a Binary files /dev/null and b/pics/stable2.png differ diff --git a/pics/stable3.png b/pics/stable3.png new file mode 100644 index 0000000..e27fdc8 Binary files /dev/null and b/pics/stable3.png differ diff --git a/pics/table.svg b/pics/table.svg new file mode 100644 index 0000000..ce11853 --- /dev/null +++ b/pics/table.svg @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/pics/table0.png b/pics/table0.png new file mode 100644 index 0000000..aa91bd8 Binary files /dev/null and b/pics/table0.png differ diff --git a/pics/table1.png b/pics/table1.png new file mode 100644 index 0000000..7ea8684 Binary files /dev/null and b/pics/table1.png differ diff --git a/pics/table2.png b/pics/table2.png new file mode 100644 index 0000000..383f49d Binary files /dev/null and b/pics/table2.png differ diff --git a/pics/table3.png b/pics/table3.png new file mode 100644 index 0000000..76f3cdf Binary files /dev/null and b/pics/table3.png differ diff --git a/standard.css b/standard.css index ff055c8..bb1117a 100644 --- a/standard.css +++ b/standard.css @@ -1,10 +1,109 @@ -.trick + + +.trick +{ + position:relative; +// border: 1px solid green; + height:500px; + width:500px; + clear:both; +} + +img { - //border: 1px solid green; - clear:both; + height:80px; } -.trick div div +.oldtrick +{ + position:relative; +// border: 1px solid green; + height:280px; + width: 280px; + float:left; +} + +.oldtrick img +{ + height:50px; +} + +.oldtrick div.table +{ + position:absolute; + height:180px;; + width:180px; + left:50px; + top:50px; + // border:1px solid black; +} +.trick div.table +{ + position:absolute; + + height:340px;; + width:340px; + left:80px; + top:80px; + // border:1px solid black; +} + +div.card0 +{ + position:absolute; + top:50px; + left: 0px; +} +div.card1 +{ + position:absolute; + top:0px; + left:70px +} +div.card2 +{ + position:absolute; + top:50px; + right:0px; + text-align:right; +} +div.card3 +{ + position:absolute; + + bottom:0px; + left:70px; +} + +.trick div.card0 +{ + position:absolute; + top:110px; + left: 0px; +} +.trick div.card1 +{ + position:absolute; + top:0px; + left:140px +} +.trick div.card2 +{ + position:absolute; + top:110px; + right:0px; + text-align:right; +} +.trick div.card3 +{ + position:absolute; + + bottom:0px; + left:140px; +} + + +.table div div { position: absolute; width: 65px; @@ -12,13 +111,13 @@ display: none; } -.trick div +.table div { float:left; margin-bottom:10px; } -.trick div:hover div +.table div:hover div { display:block; } @@ -26,4 +125,39 @@ .comment { background-color:green; -} \ No newline at end of file +} + +.background0 +{ + background:url(pics/stable0.png) no-repeat 60px 60px; +} +.background1 +{ + background:url(pics/stable1.png) no-repeat 60px 60px; +} +.background2 +{ + background:url(pics/stable2.png) no-repeat 60px 60px; +} +.background3 +{ + background:url(pics/stable3.png) no-repeat 60px 60px; +} +div.back0 +{ + background:url(pics/table0.png) no-repeat 100px 100px; +} +div.back1 +{ + background:url(pics/table1.png) no-repeat 100px 100px; +} +div.back2 +{ + background:url(pics/table2.png) no-repeat 100px 100px; +} +div.back3 +{ + background:url(pics/table3.png) no-repeat 100px 100px; +} + +