Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
directory "www" is added and cgi was complete
- Loading branch information
Showing
5 changed files
with
192 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
h1, h2 { | ||
text-align: center; | ||
} | ||
|
||
p { | ||
width: 600px; | ||
margin: 1em auto; | ||
} | ||
|
||
#maze { | ||
margin: auto; | ||
position: relative; | ||
height: 300px; | ||
width: 500px; | ||
} | ||
|
||
#start, #end { | ||
position: absolute; | ||
top: 205px; | ||
height: 30px; | ||
width: 30px; | ||
border: 1px solid black; | ||
padding: 5px; | ||
|
||
font-family: "Helvetica", "Arial", sans-serif; | ||
font-size: 25pt; | ||
text-align: center; | ||
} | ||
|
||
#maze #start { | ||
background-color: #88ff88; | ||
left: 0; | ||
} | ||
|
||
#maze #end { | ||
background-color: #8888ff; | ||
right: 0; | ||
} | ||
|
||
div.boundary { | ||
background-color: #eeeeee; | ||
border: 1px solid black; | ||
} | ||
|
||
div.boundary.example { | ||
margin: auto; | ||
width: 100px; | ||
height: 25px; | ||
} | ||
|
||
div.youlose { | ||
background-color: #ff8888; | ||
} | ||
|
||
/* | ||
Hack hack hack; these are CSS "sibling selectors" for selecting | ||
neighboring elements. Necessary to avoid giving ids to the boundary divs | ||
*/ | ||
/* | ||
You don't need to download or edit this file. | ||
*/ | ||
|
||
|
||
#maze div.boundary { | ||
position: absolute; | ||
|
||
top: 0; | ||
left: 0; | ||
height: 200px; | ||
width: 150px; | ||
z-index: 1; | ||
} | ||
|
||
#maze div.boundary + div.boundary { | ||
border-left: none; | ||
border-right: none; | ||
z-index: 2; | ||
|
||
left: 151px; | ||
height: 50px; | ||
width: 198px; | ||
} | ||
|
||
#maze div.boundary + div.boundary + div.boundary { | ||
border-left: 1px black solid; | ||
border-right: 1px black solid; | ||
z-index: 1; | ||
|
||
left: 348px; | ||
height: 200px; | ||
width: 150px; | ||
} | ||
|
||
#maze div.boundary + div.boundary + div.boundary + div.boundary { | ||
border: 1px black solid; | ||
|
||
top: 250px; | ||
left: 0; | ||
height: 48px; | ||
width: 498px; | ||
} | ||
|
||
#maze div.boundary + div.boundary + div.boundary + div.boundary + div.boundary { | ||
border-bottom: none; | ||
|
||
top: 100px; | ||
left: 200px; | ||
height: 150px; | ||
width: 98px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
|
||
<!-- | ||
You don't need to download or edit this file. | ||
--> | ||
|
||
<head> | ||
<title>Maze!</title> | ||
<link href="maze.css" type="text/css" rel="stylesheet" /> | ||
|
||
<script type="text/javascript"> | ||
function change(){ | ||
if (start==1) { | ||
setcolor("#ff8888"); | ||
end=start; | ||
} | ||
|
||
} | ||
function result() { | ||
if(start==1) { | ||
if (end==1) { | ||
|
||
alert("you lose"); | ||
} | ||
else { | ||
alert("you win"); | ||
} | ||
} | ||
start=0; | ||
end=0; | ||
document.getElementById("start").style.backgroundColor="#88ff88"; | ||
setcolor("#eeeeee"); | ||
} | ||
function setcolor(color) { | ||
for (var i=1;i<6;i++) { | ||
document.getElementById("boundary"+i).style.backgroundColor=color; | ||
} | ||
|
||
} | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<h1>The Amazing Mouse Maze!</h1> | ||
<h2 id="status">Move your mouse over the "S" to begin.</h2> | ||
<script type="text/javascript"> | ||
start=0; | ||
end=0; | ||
</script> | ||
<!-- This part of the page represents the maze --> | ||
<div id="maze"> | ||
|
||
<div id="start" onmouseover="start=1;this.style.backgroundColor='yellow';">S</div> | ||
<div class="boundary" id="boundary1" onmouseover="change();"></div> | ||
<div class="boundary" id="boundary2" onmouseover="change();"></div> | ||
<div class="boundary" id="boundary3" onmouseover="change();"></div> | ||
<div class="boundary" id="boundary4" onmouseover="change();"></div> | ||
<div class="boundary" id="boundary5" onmouseover="change();"></div> | ||
<div id="end" onmouseover="result()">E</div> | ||
</div> | ||
|
||
<p> | ||
The object of this game is to guide the mouse cursor through the start area and get to the end area. Be sure to avoid the walls: | ||
</p> | ||
|
||
<div class="boundary example"></div> | ||
|
||
<p> | ||
Good luck! | ||
</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from sys import argv | ||
|
||
print 'HTTP/1.1 200 OK' | ||
print 'Content-Type: text/html' | ||
print '' | ||
print argv |