wok rev 24117
Add sokojs
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 03 18:33:51 2021 +0000 (2021-10-03) |
parents | eb5fb6d1c4c0 |
children | addbced568eb |
files | sokojs/receipt sokojs/stuff/sokojs.u webgames/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/sokojs/receipt Sun Oct 03 18:33:51 2021 +0000 1.3 @@ -0,0 +1,38 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="sokojs" 1.7 +VERSION="2015" 1.8 +CATEGORY="games" 1.9 +SHORT_DESC="Sokoban clone in HTML / CSS / Javascript" 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +LICENSE="GPL2" 1.12 +TARBALL="$PACKAGE-$VERSION.zip" 1.13 +WEB_SITE="http://buze.michel.chez.com/Boxworld/src.htm" 1.14 +WGET_URL="http://buze.michel.chez.com/sokojs.zip" 1.15 + 1.16 +# Rules to configure and make the package. 1.17 +compile_rules() 1.18 +{ 1.19 + dos2unix *.htm *.txt 1.20 + sed -i '/sokojs.zip/d;/src.htm/d' level.htm 1.21 + sed -i 's|Online.* ) ||' sokojs.htm 1.22 + patch -p0 < $stuff/sokojs.u 1.23 +} 1.24 + 1.25 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.26 +genpkg_rules() 1.27 +{ 1.28 + mkdir -p $fs/var/www $fs/usr/share/applications $install/usr/share/doc 1.29 + cp -a $src $fs/var/www/sokojs 1.30 + mv $fs/var/www/sokojs/*.txt $install/usr/share/doc 1.31 + cat > $fs/usr/share/applications/Sokoban.desktop <<EOT 1.32 +[Desktop Entry] 1.33 +Type=Application 1.34 +Name=Sokoban 1.35 +Comment=Plateform game 1.36 +Exec=sh -c "url=http://127.0.0.1/sokojs/main.htm ; tazweb --notoolbar \\\$url || browser \\\$url" 1.37 +Icon=/var/www/sokojs/4.gif 1.38 +Terminal=false 1.39 +Categories=Game 1.40 +EOT 1.41 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/sokojs/stuff/sokojs.u Sun Oct 03 18:33:51 2021 +0000 2.3 @@ -0,0 +1,135 @@ 2.4 +--- main.htm 2.5 ++++ main.htm 2.6 +@@ -2,16 +2,66 @@ 2.7 + <!-- 2.8 + SokoJS - Sokoban Game for Javascript 2.9 + Copyright (C) Michel BUZE 2.10 +-e-mail : michbuze@club-internet.fr 2.11 +-website : http://michbuze.club.fr 2.12 ++e-mail : michel.buze@gmail.com 2.13 ++website : http://buze.michel.chez.com 2.14 + 2.15 +-Ce programme est un logiciel libre: vous pouvez le redistribuer 2.16 +-et/ou le modifier selon les termes de la "GNU General Public License", 2.17 +-version 2 ou (à votre choix) toute version ultérieure. 2.18 ++Ce programme est un logiciel libre: vous pouvez le redistribuer et/ou le modifier selon les termes de la "GNU General Public License", 2.19 ++version 2 ou (à votre choix) toute version ultérieure. 2.20 + Voir : http://www.gnu.org/licenses/gpl.html 2.21 + --> 2.22 + <html> 2.23 + <head> 2.24 ++<meta name="viewport" content="width=device-width, initial-scale=1"> 2.25 ++<style> 2.26 ++<!-- 2.27 ++img.r{ 2.28 ++width:30px; 2.29 ++height:30px; 2.30 ++} 2.31 ++ 2.32 ++@media screen and (max-width: 450px) { 2.33 ++img.r{ 2.34 ++width:29px; 2.35 ++height:29px; 2.36 ++}} 2.37 ++@media screen and (max-width: 435px) { 2.38 ++img.r{ 2.39 ++width:28px; 2.40 ++height:28px; 2.41 ++}} 2.42 ++@media screen and (max-width: 420px) { 2.43 ++img.r{ 2.44 ++width:27px; 2.45 ++height:27px; 2.46 ++}} 2.47 ++@media screen and (max-width: 405px) { 2.48 ++img.r{ 2.49 ++width:26px; 2.50 ++height:26px; 2.51 ++}} 2.52 ++@media screen and (max-width: 390px) { 2.53 ++img.r{ 2.54 ++width:25px; 2.55 ++height:25px; 2.56 ++}} 2.57 ++@media screen and (max-width: 375px) { 2.58 ++img.r{ 2.59 ++width:24px; 2.60 ++height:24px; 2.61 ++}} 2.62 ++@media screen and (max-width: 360px) { 2.63 ++img.r{ 2.64 ++width:23px; 2.65 ++height:23px; 2.66 ++}} 2.67 ++@media screen and (max-width: 345px) { 2.68 ++img.r{ 2.69 ++width:22px; 2.70 ++height:22px; 2.71 ++}} 2.72 ++ 2.73 ++--> 2.74 ++</style> 2.75 + <title></title> 2.76 + 2.77 + <script type="text/javascript"> 2.78 +@@ -200,10 +250,10 @@ 2.79 + if (level[x + Row * y] == dest) nbBoxin++ 2.80 + if (level[x + Row * y] == land || level[x + Row * y] == wall) 2.81 + document.write("<TD VALIGN=TOP>", 2.82 +- "<IMG align=middle width=\"30\" heigth=\"30\" border=0 src=\"", level[x + Row * y], ".gif\"<\/TD>") 2.83 ++ "<IMG align=middle class=r border=0 src=\"", level[x + Row * y], ".gif\"<\/TD>") 2.84 + else 2.85 + document.write("<TD VALIGN=TOP><A HREF=\"JavaScript:Move(", x + Row * y, ")\">", 2.86 +- "<IMG align=middle width=\"30\" heigth=\"30\" border=0 src=\"", level[x + Row * y], ".gif\"</A><\/TD>") 2.87 ++ "<IMG align=middle class=r border=0 src=\"", level[x + Row * y], ".gif\"</A><\/TD>") 2.88 + } 2.89 + document.write("<\/TR>") 2.90 + } 2.91 +@@ -211,21 +261,19 @@ 2.92 + manpos = parent.frames[0].document.forms[0].elements[Row*Col].value 2.93 + nbLevel = parent.frames[0].document.forms[0].elements[(Row*Col)+1].value 2.94 + 2.95 +- document.write("<td> <td><TABLE cellspacing=0 cellpadding=0><TD><CENTER>") 2.96 ++ document.write("</table><TABLE cellspacing=0 cellpadding=0 style='max-width:300px'><TD>") 2.97 + 2.98 + document.write("<FORM>", 2.99 + "<INPUT TYPE=button onClick=\"Javascript:ReloadLevel();\" value=\"Restart\">", 2.100 +- "<INPUT TYPE=button onClick=\"Javascript:UndoMove();\" value=\"Undo\"><p id=\"moves\" style=\"color:white\">0 moves</p></center><br>") 2.101 ++ "<INPUT TYPE=button onClick=\"Javascript:UndoMove();\" value=\"Undo\"><p id=\"moves\" style=\"color:white\">0 moves</p></center>") 2.102 + for (i = 0; i <= maxLevel; i++) { 2.103 +- if (i % 9 == 0) document.write("<br>") 2.104 +- document.write("<INPUT style='font-size:9px;border:0;padding:0;background-color:black;color:white' TYPE=\"button\" onClick=\"Javascript:GoLevel(", i, ");\" value=\"", (i<9?" ":"")+(i+1), "\">") 2.105 ++ document.write("<INPUT style='font-family:Courier New;font-size:14px;font-weight:bold;border:1;border-color:0;padding:0;margin:0px;background-color:#c0c0c0;color:#404040ù' TYPE=\"button\" onClick=\"Javascript:GoLevel(", i, ");\" value=\"", (i<9?" ":"")+(i+1), "\">") 2.106 + } 2.107 +- document.write("<\/FORM></table></table>") 2.108 ++ document.write("<\/FORM></table>") 2.109 + 2.110 + document.images[manpos].src = eval("manD.src") 2.111 + //--> 2.112 + </script> 2.113 + 2.114 +- 2.115 + </body> 2.116 + </html> 2.117 +\ No newline at end of file 2.118 +--- sokojs.htm 2.119 ++++ sokojs.htm 2.120 +@@ -24,15 +24,16 @@ 2.121 + <TITLE>Sokoban (C) Michel Buze</TITLE> 2.122 + <META HTTP-EQUIV="Keywords" CONTENT="boxworld,javascript,sokoban,jeu,jeux,game,buze,web"> 2.123 + <META NAME="Keywords" CONTENT="boxworld,javascript,sokoban,jeu,jeux,game,buze,web"> 2.124 ++<meta name="viewport" content="width=device-width, initial-scale=1"> 2.125 + </head> 2.126 + 2.127 +-<frameset border="0" cols="0,700,*"> 2.128 ++<frameset border="0" rows="0,700,*"> 2.129 + <frame src="level0.htm"> 2.130 + <frame src="0.gif"> 2.131 + <frame src="0.gif"> 2.132 + <noframes> 2.133 + <body> 2.134 +-Désolé, votre navigateur doit supporter les cadres (frames) 2.135 ++Désolé, votre navigateur doit supporter les cadres (frames) 2.136 + </body> 2.137 + </noframes> 2.138 + </frameset>
3.1 --- a/webgames/receipt Sat Oct 02 18:25:40 2021 +0000 3.2 +++ b/webgames/receipt Sun Oct 03 18:33:51 2021 +0000 3.3 @@ -36,8 +36,8 @@ 3.4 Icon=${icon:-applications-games} 3.5 EOT 3.6 done <<EOT 3.7 -https://sokoban.info/ Sokoban\ 3.8 - Plateform\ game|[fr]Jeu\ de\ plateforme applications-internet 3.9 +http://games.slitaz.org/sokojs/main.htm Sokoban\ 3.10 + Plateform\ game|[fr]Jeu\ de\ plateforme 3.11 http://chinese-checkers.net/ Chinese\ Checkers|[fr]Dames\ chinoises\ 3.12 Chinese\ Checkers|[fr]Dames\ chinoises applications-internet 3.13 http://games.slitaz.org/2048/index.html 2048