wok view sokojs/stuff/sokojs.u @ rev 24133

Up tazinst (115)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 23 15:17:56 2021 +0000 (2021-10-23)
parents
children
line source
1 --- main.htm
2 +++ main.htm
3 @@ -2,16 +2,66 @@
4 <!--
5 SokoJS - Sokoban Game for Javascript
6 Copyright (C) Michel BUZE
7 -e-mail : michbuze@club-internet.fr
8 -website : http://michbuze.club.fr
9 +e-mail : michel.buze@gmail.com
10 +website : http://buze.michel.chez.com
12 -Ce programme est un logiciel libre: vous pouvez le redistribuer
13 -et/ou le modifier selon les termes de la "GNU General Public License",
14 -version 2 ou (à votre choix) toute version ultérieure.
15 +Ce programme est un logiciel libre: vous pouvez le redistribuer et/ou le modifier selon les termes de la "GNU General Public License",
16 +version 2 ou (à votre choix) toute version ultérieure.
17 Voir : http://www.gnu.org/licenses/gpl.html
18 -->
19 <html>
20 <head>
21 +<meta name="viewport" content="width=device-width, initial-scale=1">
22 +<style>
23 +<!--
24 +img.r{
25 +width:30px;
26 +height:30px;
27 +}
28 +
29 +@media screen and (max-width: 450px) {
30 +img.r{
31 +width:29px;
32 +height:29px;
33 +}}
34 +@media screen and (max-width: 435px) {
35 +img.r{
36 +width:28px;
37 +height:28px;
38 +}}
39 +@media screen and (max-width: 420px) {
40 +img.r{
41 +width:27px;
42 +height:27px;
43 +}}
44 +@media screen and (max-width: 405px) {
45 +img.r{
46 +width:26px;
47 +height:26px;
48 +}}
49 +@media screen and (max-width: 390px) {
50 +img.r{
51 +width:25px;
52 +height:25px;
53 +}}
54 +@media screen and (max-width: 375px) {
55 +img.r{
56 +width:24px;
57 +height:24px;
58 +}}
59 +@media screen and (max-width: 360px) {
60 +img.r{
61 +width:23px;
62 +height:23px;
63 +}}
64 +@media screen and (max-width: 345px) {
65 +img.r{
66 +width:22px;
67 +height:22px;
68 +}}
69 +
70 +-->
71 +</style>
72 <title></title>
74 <script type="text/javascript">
75 @@ -200,10 +250,10 @@
76 if (level[x + Row * y] == dest) nbBoxin++
77 if (level[x + Row * y] == land || level[x + Row * y] == wall)
78 document.write("<TD VALIGN=TOP>",
79 - "<IMG align=middle width=\"30\" heigth=\"30\" border=0 src=\"", level[x + Row * y], ".gif\"<\/TD>")
80 + "<IMG align=middle class=r border=0 src=\"", level[x + Row * y], ".gif\"<\/TD>")
81 else
82 document.write("<TD VALIGN=TOP><A HREF=\"JavaScript:Move(", x + Row * y, ")\">",
83 - "<IMG align=middle width=\"30\" heigth=\"30\" border=0 src=\"", level[x + Row * y], ".gif\"</A><\/TD>")
84 + "<IMG align=middle class=r border=0 src=\"", level[x + Row * y], ".gif\"</A><\/TD>")
85 }
86 document.write("<\/TR>")
87 }
88 @@ -211,21 +261,19 @@
89 manpos = parent.frames[0].document.forms[0].elements[Row*Col].value
90 nbLevel = parent.frames[0].document.forms[0].elements[(Row*Col)+1].value
92 - document.write("<td>&nbsp;<td><TABLE cellspacing=0 cellpadding=0><TD><CENTER>")
93 + document.write("</table><TABLE cellspacing=0 cellpadding=0 style='max-width:300px'><TD>")
95 document.write("<FORM>",
96 "<INPUT TYPE=button onClick=\"Javascript:ReloadLevel();\" value=\"Restart\">",
97 - "<INPUT TYPE=button onClick=\"Javascript:UndoMove();\" value=\"Undo\"><p id=\"moves\" style=\"color:white\">0 moves</p></center><br>")
98 + "<INPUT TYPE=button onClick=\"Javascript:UndoMove();\" value=\"Undo\"><p id=\"moves\" style=\"color:white\">0 moves</p></center>")
99 for (i = 0; i <= maxLevel; i++) {
100 - if (i % 9 == 0) document.write("<br>")
101 - 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?"&nbsp;&nbsp;":"")+(i+1), "\">")
102 + 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?"&nbsp;":"")+(i+1), "\">")
103 }
104 - document.write("<\/FORM></table></table>")
105 + document.write("<\/FORM></table>")
107 document.images[manpos].src = eval("manD.src")
108 //-->
109 </script>
111 -
112 </body>
113 </html>
114 \ No newline at end of file
115 --- sokojs.htm
116 +++ sokojs.htm
117 @@ -24,15 +24,16 @@
118 <TITLE>Sokoban (C) Michel Buze</TITLE>
119 <META HTTP-EQUIV="Keywords" CONTENT="boxworld,javascript,sokoban,jeu,jeux,game,buze,web">
120 <META NAME="Keywords" CONTENT="boxworld,javascript,sokoban,jeu,jeux,game,buze,web">
121 +<meta name="viewport" content="width=device-width, initial-scale=1">
122 </head>
124 -<frameset border="0" cols="0,700,*">
125 +<frameset border="0" rows="0,700,*">
126 <frame src="level0.htm">
127 <frame src="0.gif">
128 <frame src="0.gif">
129 <noframes>
130 <body>
131 -Désolé, votre navigateur doit supporter les cadres (frames)
132 +Désolé, votre navigateur doit supporter les cadres (frames)
133 </body>
134 </noframes>
135 </frameset>