瀏覽代碼

prettier level listing, with thumbnails

Erinn 8 年之前
父節點
當前提交
3737cf91c3
共有 19 個文件被更改,包括 25 次插入8 次删除
  1. 6 4
      header.inc.php
  2. 二進制
      includes/thumbs/0.png
  3. 二進制
      includes/thumbs/1.png
  4. 二進制
      includes/thumbs/10.png
  5. 二進制
      includes/thumbs/11.png
  6. 二進制
      includes/thumbs/12.png
  7. 二進制
      includes/thumbs/13.png
  8. 二進制
      includes/thumbs/2.png
  9. 二進制
      includes/thumbs/3.png
  10. 二進制
      includes/thumbs/4.png
  11. 二進制
      includes/thumbs/5.png
  12. 二進制
      includes/thumbs/6.png
  13. 二進制
      includes/thumbs/7.png
  14. 二進制
      includes/thumbs/8.png
  15. 二進制
      includes/thumbs/9.png
  16. 二進制
      includes/thumbs/check.png
  17. 1 0
      index.php
  18. 16 4
      listing.inc.php
  19. 2 0
      register.php

+ 6 - 4
header.inc.php

@@ -15,22 +15,24 @@
 
 	<link href="css/jquery-ui.min.css" rel="stylesheet">
 	<style type="text/css">
+	* { font-family:Arial, Helvetica, sans-serif; }
+
 	html {
-		height:100%;
 		margin:0;
+		min-height:100%;
 	}
 
 	body {
 		background:#DDD;
 		background:linear-gradient(#DDD, #FFF);
 		margin:0;
-		height:100%;
+		min-height:100%;
 	}
 
 	#content {
 		background-color:#FFF;
 		width:800px;
-		height:90%;
+		min-height:90%;
 		margin-left:auto;
 		margin-right:auto;
 		padding:30px;
@@ -43,5 +45,5 @@
 <body>
 <div id="content">
 
-<h1>CS4G Netsim</h1>
+<h1>Netsim</h1>
 

二進制
includes/thumbs/0.png


二進制
includes/thumbs/1.png


二進制
includes/thumbs/10.png


二進制
includes/thumbs/11.png


二進制
includes/thumbs/12.png


二進制
includes/thumbs/13.png


二進制
includes/thumbs/2.png


二進制
includes/thumbs/3.png


二進制
includes/thumbs/4.png


二進制
includes/thumbs/5.png


二進制
includes/thumbs/6.png


二進制
includes/thumbs/7.png


二進制
includes/thumbs/8.png


二進制
includes/thumbs/9.png


二進制
includes/thumbs/check.png


+ 1 - 0
index.php

@@ -29,6 +29,7 @@ if (LOGGEDIN && !isset($_GET['level'])) {
 
 	<link href="css/jquery-ui.min.css" rel="stylesheet">
 	<style type="text/css">
+		* { font-family:Arial, Helvetica, sans-serif; }
 		body { margin: 0; overflow:hidden; }
 	</style>
 </head>

+ 16 - 4
listing.inc.php

@@ -2,18 +2,30 @@
 
 <div style="float:right;"><input type="button" value="Log out" onclick="location.href='./?logout'"></div>
 
+<p>Welcome to Netsim!  If this is your first time playing, we recommend you start from the first level below, and work your way forward.<p>
+
 <?php
 
 $res = $db->query("SELECT * FROM category ORDER BY orderby");
 
 while ($row = $res->fetchArray()) {
-	echo "<h3>".$row['name']."</h3>\n";
+	echo "<h3 style=\"clear:both;;\">".$row['name']."</h3>\n";
 	$res2 = $db->query("SELECT * FROM level WHERE category_id = ".$row['id']." ORDER BY orderby");
 	while ($row2 = $res2->fetchArray()) {
-		echo "[";
-		echo levelComplete($row2['id']) ? "X" : "&nbsp;";
-		echo "] <a href=\"./?level=".$row2['id']."\">".$row2['name']."</a><br>\n";
+		$complete = levelComplete($row2['id']);
+		echo "<div style=\"float:left;position:relative;border-radius:0 0 10px 10px;border:solid 1px #AAA;margin:10px;padding:5px\">";
+		echo "<a href=\"./?level=".$row2['id']."\">\n";
+		echo "\t<img".($complete ? " style=\"opacity:0.3\"" : "")." src=\"includes/thumbs/".(file_exists("includes/thumbs/".$row2['id'].".png") ? $row2['id'] : 0).".png\">\n";
+		if ($complete) echo "\t<img src=\"includes/thumbs/check.png\" style=\"position:absolute;top:80px;left:70px;\">\n";
+		echo "</a><br>\n";
+		echo "<a href=\"./?levels=".$row2['id']."\" style=\"color:#000;text-decoration:none;\">".$row2['name']."</a>\n";
+		echo "</div>\n";
+		//echo "[";
+		//echo levelComplete($row2['id']) ? "X" : "&nbsp;";
+		//echo "] <a href=\"./?level=".$row2['id']."\">".$row2['name']."</a><br>\n";
 	}
+
+	echo "<div style=\"clear:both;margin-bottom:30px;\"></div>";
 }
 
 function levelComplete($l) {

+ 2 - 0
register.php

@@ -43,6 +43,8 @@ include 'header.inc.php';
 	<p><input type="submit" value="Register"></p>
 </form>
 
+<div style="height:150px;"></div>
+
 <script type="text/javascript">$('.reg_username').focus();</script>
 
 <?php include 'footer.inc.php'; ?>