created nav.js, a script that generates the nav bar

This commit is contained in:
alisolarflare 2017-06-29 20:47:03 -04:00
parent 5dc639fae7
commit 9c71759d1e
7 changed files with 38 additions and 48 deletions

View file

@ -3,17 +3,12 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Chromagaming Civilization Screen</title> <title>Chromagaming Civilization Screen</title>
<script src="./resources/frameworks/jquery-3.2.1.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="resources/global/style.css"> <link rel="stylesheet" href="resources/global/style.css">
<script src="./resources/nav.js"></script>
</head> </head>
<body> <body>
<nav> <nav></nav>
<a href="./index.html">Main</a>
<a href="./sandbox.html">Sandbox</a>
<a href="./map.html">Map</a>
<a href="./rules.html">Rules</a>
<a href="./questions.html">Questions</a>
<a href="./spawn.html">Spawn</a>
</nav>
<h1>The Civilization Screen</h1> <h1>The Civilization Screen</h1>
<p>Welcome to the civilization screen.</p> <p>Welcome to the civilization screen.</p>
</body> </body>

View file

@ -7,6 +7,7 @@
<title>Civilization Map</title> <title>Civilization Map</title>
<script src="./resources/frameworks/jquery-3.2.1.min.js" type="text/javascript"></script> <script src="./resources/frameworks/jquery-3.2.1.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="resources/game/css/style.css"> <link rel="stylesheet" href="resources/game/css/style.css">
<script src="./resources/nav.js"></script>
<!-- Leaflet Interactive Map --> <!-- Leaflet Interactive Map -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" <link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css"
@ -18,14 +19,7 @@
crossorigin=""></script> crossorigin=""></script>
</head> </head>
<body> <body>
<nav> <nav></nav>
<a href="./index.html">Main</a>
<a href="./sandbox.html">Sandbox</a>
<a href="./map.html">Map</a>
<a href="./rules.html">Rules</a>
<a href="./questions.html">Questions</a>
<a href="./spawn.html">Spawn</a>
</nav>
<img src="resources/game/images/biome_map_full_10.png" alt="" id="biome_map"> <img src="resources/game/images/biome_map_full_10.png" alt="" id="biome_map">
</body> </body>

View file

@ -7,16 +7,10 @@
<link href='https://fonts.googleapis.com/css?family=Balthazar' rel='stylesheet'> <link href='https://fonts.googleapis.com/css?family=Balthazar' rel='stylesheet'>
<link rel="stylesheet" href="resources/questions/style.css"> <link rel="stylesheet" href="resources/questions/style.css">
<script type="text/javascript" src="resources/questions/scenarios.js"></script> <script type="text/javascript" src="resources/questions/scenarios.js"></script>
<script src="./resources/nav.js"></script>
</head> </head>
<body> <body>
<nav> <nav></nav>
<a href="./index.html">Main</a>
<a href="./sandbox.html">Sandbox</a>
<a href="./map.html">Map</a>
<a href="./rules.html">Rules</a>
<a href="./questions.html">Questions</a>
<a href="./spawn.html">Spawn</a>
</nav>
<h1 id="who" class="tab">Who</h1> <h1 id="who" class="tab">Who</h1>
<h1 class="welcome">Welcome to Chromagaming!</h1> <h1 class="welcome">Welcome to Chromagaming!</h1>

24
resources/nav.js Normal file
View file

@ -0,0 +1,24 @@
window.onload = function(){
$("nav")
.append($("<a></a>")
.append("Main")
.attr("href", "./index.html"))
.append($("<a></a>")
.append("Sandbox")
.attr("href", "./sandbox.html"))
.append($("<a></a>")
.append("Map")
.attr("href", "./map.html"))
.append($("<a></a>")
.append("Rules")
.attr("href", "./rules.html"))
.append($("<a></a>")
.append("Questions")
.attr("href", "./questions.html"))
.append($("<a></a>")
.append("Spawn")
.attr("href", "./spawn.html"));
}

View file

@ -3,17 +3,12 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Rules</title> <title>Rules</title>
<script src="./resources/frameworks/jquery-3.2.1.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="resources/global/style.css"> <link rel="stylesheet" href="resources/global/style.css">
<script src="./resources/nav.js"></script>
</head> </head>
<body> <body>
<nav> <nav></nav>
<a href="./index.html">Main</a>
<a href="./sandbox.html">Sandbox</a>
<a href="./map.html">Map</a>
<a href="./rules.html">Rules</a>
<a href="./questions.html">Questions</a>
<a href="./spawn.html">Spawn</a>
</nav>
<h1>The Rules</h1> <h1>The Rules</h1>
<p>Every server has its rules, these are the laws of our land.</p> <p>Every server has its rules, these are the laws of our land.</p>

View file

@ -6,16 +6,10 @@
<script src="./resources/frameworks/jquery-3.2.1.min.js" type="text/javascript"></script> <script src="./resources/frameworks/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="./resources/sandbox/sandbox.js" type="text/javascript"></script> <script src="./resources/sandbox/sandbox.js" type="text/javascript"></script>
<link rel="stylesheet" href="resources/global/style.css"> <link rel="stylesheet" href="resources/global/style.css">
<script src="./resources/nav.js"></script>
</head> </head>
<body> <body>
<nav> <nav></nav>
<a href="./index.html">Main</a>
<a href="./sandbox.html">Sandbox</a>
<a href="./map.html">Map</a>
<a href="./rules.html">Rules</a>
<a href="./questions.html">Questions</a>
<a href="./spawn.html">Spawn</a>
</nav>
<h1>Developer's Sandbox</h1> <h1>Developer's Sandbox</h1>

View file

@ -6,20 +6,14 @@
<script src="./resources/frameworks/jquery-3.2.1.min.js" type="text/javascript"></script> <script src="./resources/frameworks/jquery-3.2.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="./resources/spawn/progress-table.js"></script> <script type="text/javascript" src="./resources/spawn/progress-table.js"></script>
<link rel="stylesheet" href="./resources/spawn/spawn.css"> <link rel="stylesheet" href="./resources/spawn/spawn.css">
<script src="./resources/nav.js"></script>
</head> </head>
<body> <body>
<h1>Spawn Progress Tracker</h1> <h1>Spawn Progress Tracker</h1>
<p style="color:red">NOTE: THIS TRACKER IS UNFINISHED AN WILL NOT SAVE DATA, USE AT OWN RISK</p> <p style="color:red">NOTE: THIS TRACKER IS UNFINISHED AN WILL NOT SAVE DATA, USE AT OWN RISK</p>
<nav> <nav></nav>
<a href="./index.html">Main</a>
<a href="./sandbox.html">Sandbox</a>
<a href="./map.html">Map</a>
<a href="./rules.html">Rules</a>
<a href="./questions.html">Questions</a>
<a href="./spawn.html">Spawn</a>
</nav>
<table id="progress-table"> <table id="progress-table">
<tr> <tr>