Skip to content

Commit

Permalink
added functionality to idea
Browse files Browse the repository at this point in the history
  • Loading branch information
infinitel8p committed Nov 14, 2023
1 parent c80a774 commit a0fc86c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions server/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ <h1>v.0.0.1</h1>

<div class="content">
<div class="ideas">
<div class="idea">
<div class="idea" href="https://github.com/infinitel8p/Security-Cam">
<p>Updates</p>
<h1>Check the GitHub repository</h1>
<p>Suggest new features and report bugs!</p>
</div>

<div class="idea">
<div class="idea" href="http://dev.infinitel8p.com/Security-Cam/">
<p>GET STARTED</p>
<h1>Check the documentation</h1>
<p>Read the documentation to find out how things work!</p>
Expand Down
13 changes: 4 additions & 9 deletions server/public/js/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
document.addEventListener('DOMContentLoaded', () => {
const navItems = document.querySelectorAll('.nav-item');

navItems.forEach(item => {
let currentHref = window.location.href;

Expand All @@ -14,14 +13,10 @@ document.addEventListener('DOMContentLoaded', () => {
});
});

const side_bar_btns = document.querySelectorAll("#sidebar-btn");

side_bar_btns.forEach((elem) => {
elem.addEventListener("click", () => {
for (let index = 0; index < side_bar_btns.length; index++) {
side_bar_btns[index].classList.remove("active");
}
elem.classList.add("active");
const idea_btns = document.querySelectorAll(".idea");
idea_btns.forEach((btn) => {
btn.addEventListener("click", () => {
window.open(btn.getAttribute("href"), "_blank");
});
});

Expand Down

0 comments on commit a0fc86c

Please sign in to comment.