aboutsummaryrefslogtreecommitdiffstats
path: root/index.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'index.xhtml')
-rw-r--r--index.xhtml122
1 files changed, 63 insertions, 59 deletions
diff --git a/index.xhtml b/index.xhtml
index 5e2f18d..c67ee28 100644
--- a/index.xhtml
+++ b/index.xhtml
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="css/bootstrap.min.css"?>
<?xml-stylesheet type="text/css" href="css/craftmine.css"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
- <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="author" content="Alexandre Renoux,Pierre-Emmanuel Novac"/>
@@ -19,94 +17,100 @@
<script type="text/javascript" charset="utf-8" src="js/savegame.js"></script>
<script type="text/javascript" charset="utf-8" src="js/perso.js"></script>
</head>
-<body onload="init()" onhashchange="changeTab()">
+<body onload="init()">
<div class="container-fluid">
-<div class="row">
<h1>CraftMine</h1>
-</div>
-<div class="row">
- <span id="perso">HP : <span id="hp">5</span>/ LV : <span id="lv">1</span>/ exp : <span id="xp">0</span></span>
-</div>
-<div class="row">
- <div class="col-md-4">
+
+ <div class="col-md-3">
<div class="row">
- <div class="col-md-10">
- <span id="gold">0</span>
- <span id="mine">0</span>
- <p>Miners : <span id="miners">0</span></p>
- <span id="guild"></span>
- <form class="form-horizontal" method="post" action="craftmine.php">
- <button class="btn btn-default" type="button" name="withdraw" onclick="withdrawMine()">Withdraw</button>
- <button class="btn btn-default" type="button" name="HireMiner" onclick="hireMiner()">Hire one miner</button>
- </form>
- </div>
+ <span id="perso">HP : <span id="hp">5</span>/ LV : <span id="lv">1</span>/ exp : <span id="xp">0</span></span>
</div>
- <div id="error-box" class="row" style="margin-top:1em;display:none">
- <div class="col-md-10">
- <div class="alert alert-danger">
- <ul>
- </ul>
+ <div class="row">
+ <div class="col-md-12">
+ <div class="panel panel-success">
+ <div class="panel-heading">
+ <h3 class="panel-title">Stats</h3>
+ </div>
+ <div class="panel-body">
+ <ul class="list-group">
+ <li class="list-group-item">Mine<span id="mine" class="label label-success">14</span></li>
+ <li class="list-group-item">Gold<span id="gold" class="label label-success">14</span></li>
+ <li class="list-group-item">Miners<span id="miners" class="label label-success">14</span></li>
+ </ul>
+
+ <div class="list-group">
+ <button class="list-group-item btn" type="button" name="withdraw" onclick="withdrawMine()">Withdraw</button>
+ <button class="list-group-item btn" type="button" name="HireMiner" onclick="hireMiner()">Hire one miner</button>
+ </div>
+ </div>
</div>
</div>
</div>
- <div id="info-box" class="row" style="margin-top:1em;display:none">
- <div class="col-md-10">
- <div class="alert alert-success">
- <ul>
- </ul>
- </div>
+ <div id="error-box" class="row" style="display:none">
+ <div class="alert alert-danger">
+ <ul>
+ </ul>
+ </div>
+ </div>
+ <div id="info-box" class="row" style="display:none">
+ <div class="alert alert-success">
+ <ul>
+ </ul>
</div>
</div>
</div>
- <div class="col-md-8">
- <div class="row">
+ <div class="col-md-9">
<div id="tabs-panel" class="tabbable">
<ul class="nav nav-tabs">
- <li role="presentation"><a href="#tab1" data-toggle="tab">Build</a></li>
- <li role="presentation"><a href="#tab2" data-toggle="tab">Shop</a></li>
- <li role="presentation"><a href="#tab3" data-toggle="tab">Inventory</a></li>
- <li role="presentation"><a href="#tab4" data-toggle="tab">Dungeon</a></li>
- <li role="presentation" class="pull-right"><a href="#tab5" data-toggle="tab" onclick="listSaves()">Save</a></li>
+ <li><a href="#tab1">Build</a></li>
+ <li><a href="#tab2">Shop</a></li>
+ <li><a href="#tab3">Inventory</a></li>
+ <li><a href="#tab4">Dungeon</a></li>
+ <li class="pull-right"><a href="#tab5" onclick="listSaves()">Save</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="tab1">
- <h4>Select a building to build:</h4>
+ <h3>Select a building to build:</h3>
<ul class="list-inline">
- <li><button class="btn btn-default" type="button" onclick="createGuild()">Miner's guild</button></li>
- <li><button class="btn btn-default" type="button" onclick="buildShop()">Shop</button></li>
- <li><button class="btn btn-default" type="button" onclick="buildDungeon()">Dungeon</button></li>
+ <li><button class="btn btn-success" type="button" onclick="createGuild()">Miner's guild</button></li>
+ <li><button class="btn btn-success" type="button" onclick="buildShop()">Shop</button></li>
+ <li><button class="btn btn-success" type="button" onclick="buildDungeon()">Dungeon</button></li>
</ul>
</div>
<div class="tab-pane" id="tab2">
- <h4>There's no shop in this city.</h4>
+ <h3>There's no shop in this city.</h3>
</div>
<div class="tab-pane" id="tab3">
- <h4>Your inventory is empty.</h4>
+ <h3>Your inventory is empty.</h3>
</div>
<div class="tab-pane" id="tab4">
- <h4>Look at how poor you are! You can't access the dungeon, it is only for the elite.</h4>
+ <h3>Look at how poor you are! You can't access the dungeon, it is only for the elite.</h3>
</div>
<div class="tab-pane" id="tab5">
- <h4>Saved games:</h4>
- <div class="form" id="listsaves">
+ <h3>Saved games:</h3>
+ <form class="form-horizontal">
+ <div id="listsaves">
</div>
- <ul class="list-inline">
- <li><button class="btn btn-default" type="button" onclick="loadSave()">Load</button></li>
- <li><button class="btn btn-default" type="button" onclick="saveGame()">Save game</button></li>
- <li><button class="btn btn-default" type="button" onclick="downGame()">Download current game</button></li>
- <li><button class="btn btn-default" type="button" onclick="downloadSave()">Download</button></li>
- <li><input type="file" id="selectedFile" style="display: none;" accept=".save.xml" onchange="uploadSave()" />
- <button class="btn btn-default" type="button" onclick="document.getElementById('selectedFile').click()">Upload</button></li>
- <li><button class="btn btn-default" type="button" onclick="deleteSave()">Delete</button></li>
- </ul>
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <div class="btn-group">
+ <button class="btn btn-success" type="button" onclick="loadSave()">Load</button>
+ <button class="btn btn-success" type="button" onclick="saveGame()">Save game</button>
+ <button class="btn btn-success" type="button" onclick="downGame()">Download current game</button>
+ <button class="btn btn-success" type="button" onclick="downloadSave()">Download</button>
+ <input type="file" id="selectedFile" style="display: none;" accept=".save.xml" onchange="uploadSave()" />
+ <button class="btn btn-success" type="button" onclick="document.getElementById('selectedFile').click()">Upload</button>
+ <button class="btn btn-success" type="button" onclick="deleteSave()">Delete</button>
+ </div>
+ </div>
+ </div>
+ </form>
</div>
</div>
</div>
</div>
- </div>
-</div>
</div>
</body>
</html>