Skip to content

Commit

Permalink
Tests mostly work
Browse files Browse the repository at this point in the history
  • Loading branch information
nathaniel-fargo committed Apr 11, 2019
1 parent 6148d8c commit 631499b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
8 changes: 0 additions & 8 deletions css/master.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/* Font Awesome */
@import url("https://use.fontawesome.com/releases/v5.8.1/css/all.css");


html, body {
margin: 0;
padding: 0;
Expand Down Expand Up @@ -43,10 +42,3 @@ a, a:visited, a:hover,
height: 30px;
width: 30px;
}
.unity-background {
background: url("/assets/images/unity.jpg");
background-position: center;
background-repeat: no-repeat;
align-self: center;

}
20 changes: 11 additions & 9 deletions html-templates/navcontents.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<div class="container">
<a class="navbar-brand pl-2" href="/">
<img src="/assets/images/brandlogo.png" width="30" height="30" class="d-none d-sm-inline-block align-top mr-1" id="brandIcon">
Paradox Programming
</a>
<!-- Navbar -->
<nav class="navbar fixed-top navbar-expand-sm navbar-dark bg-coolblue">
<div class="container">
<a class="navbar-brand pl-2" href="/">
<img src="/assets/images/brandlogo.png" width="30" height="30" class="d-none d-sm-inline-block align-top mr-1" id="brandIcon">
Paradox Programming
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<li class="nav-item" id="home">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<li class="nav-item" id="about">
<a class="nav-link" href="/p/about">About</a>
</li>
<li class="nav-item dropdown">
<li class="nav-item dropdown" id="games">
<a class="nav-link dropdown-toggle" href="/p/games" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Games</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="/p/games/unity">Unity Games</a>
<a class="dropdown-item" href="/p/games/javascript">Javascript Games</a>
</div>
</li>
<li class="nav-item">
<li class="nav-item" id="youtube">
<a class="nav-link" href="/p/youtube">Youtube</a>
</li>
</ul>
Expand Down
12 changes: 9 additions & 3 deletions js/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ function loadScript(url, callback) {

// Fire the loading
body.appendChild(script);
}
};
function doneLoading(){
var $nav = $('nav');
$nav.load("/html-templates/navcontents.html");
var $nav = $('#navbar');
$nav.load("/html-templates/navcontents.html");
if(active){
console.log($("#"+active));
var $active = $("#"+active).addClass("active");
$active.addClass("active");
$active.children()
}
};
function loadBootstrap(){
loadScript("/assets/libraries/bootstrap/js/bootstrap.min.js",doneLoading);
Expand Down
4 changes: 2 additions & 2 deletions tests/jstest.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<link rel="stylesheet" href="/css/master.css">
</head>
<body>
<nav></nav>
<h1>JS Load-in test</h1>
<div id="navbar"></div>

<script>
var active = "home";
</script>
Expand Down

0 comments on commit 631499b

Please sign in to comment.