Skip to content

Commit

Permalink
Removed headlines and added logic so the menu-bar knows which page it…
Browse files Browse the repository at this point in the history
… is on.
  • Loading branch information
bjorvik committed Feb 1, 2022
1 parent d05fbed commit be710ea
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 9 deletions.
1 change: 0 additions & 1 deletion html/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</head>
<body>
<article>
<h1>About Immerse</h1>
<section>
<h2> What Immerse does</h2>
<h3> Tomorrows game developers</h3>
Expand Down
1 change: 0 additions & 1 deletion html/apply.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<body>
<article>
<h1>Apply</h1>
<section style="margin: auto; padding: 10px;">
<h3>Apply to immerse</h3>
<br>
Expand Down
1 change: 0 additions & 1 deletion html/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
</head>
<body>
<article>
<h1>Contact</h1>
<div class="row" >
<div class="newsList-col">
<section class="newsList">
Expand Down
1 change: 0 additions & 1 deletion html/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
</head>

<body>
<h1>Events</h1>
<!--The javascript fills the div-->
<div id="container"></div>
<script src="../scripts/events.js"></script>
Expand Down
1 change: 0 additions & 1 deletion html/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<link rel="stylesheet" href="../style/events_news.css">
</head>
<body>
<h1>News </h1>
<!--The news.js script fills the div-->
<div id="container"></div>
<script src="../scripts/news.js"></script>
Expand Down
1 change: 0 additions & 1 deletion html/showcase.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</head>
<body>
<article>
<h1>Showcase</h1>
<section>
<h2>Immerse's projects</h2>
<p>Here are some of what members of Immerse have made. if you want to make something similar
Expand Down
1 change: 0 additions & 1 deletion html/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<body>
<article>
<h1>Sponsors</h1>
<section>
<img src="../img/sit.png" alt="SIT Logo">
<h3>Sponsored by:</h3>
Expand Down
14 changes: 14 additions & 0 deletions scripts/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,23 @@ const list = [
{text: "Contact", link: "contact.html", icon: "C"},
];

var thisPage = window.location.pathname.split("/").pop();

for(let n=0; n < list.length; n++) {
let linkMenu = document.createElement("a");
linkMenu.innerHTML = list[n].text;
linkMenu.href = list[n].link;



if(list[n].link === thisPage) {
linkMenu.id = "this";
console.log(thisPage);
console.log(list[n].link);
}
else {
linkMenu.id = "notThis";
}

articleMenu.appendChild(linkMenu);
}
10 changes: 8 additions & 2 deletions style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,22 @@ article:last-of-type {
width: 300px;
margin: auto;
}
#topbar a {
color: #f2f2f2;
#topbar a{
padding: 14px 20px;
text-decoration: none;
font-size: 17px;
top: 10px;
}
#this {
color: var(--main-color-light);
}
#notThis {
color: white;
}
#topbar a:hover{
color: var(--main-color-light);
}

#links {
display: flex;
justify-content: center;
Expand Down

0 comments on commit be710ea

Please sign in to comment.