Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@
<ul class="nav-links">
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>



<!-- Dropdown on navbar -->
<li class="dropdown">
<button id="dropdownButton" class="dropbtn">Organization</button>
<div id="dropdownMenu" class="dropdown-content">
<a href="/how-we-work">How we work?</a>
<a href="/projects">Projects</a>
<a href="/team">Team</a>
<a href="/code-of-conduct">Code of Conduct</a>
</div>
</li>


<li><a href="https://recodehive.github.io/awesome-github-profiles/pages/blog.html">Learn</a></li>
<li><a href="/organization">Organization</a></li>
<li><a href="/faq">FAQ</a></li>
Expand Down
14 changes: 14 additions & 0 deletions Website/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,20 @@ async function fetchSubdirectoryCounts() {
});
}

const dropdownButton = document.getElementById('dropdownButton');
const dropdownMenu = document.getElementById('dropdownMenu');

dropdownButton.addEventListener('click', function(event) {
dropdownMenu.classList.toggle('show');
event.stopPropagation(); // Prevent click event from bubbling up
});

window.addEventListener('click', function(event) {
if (!dropdownButton.contains(event.target)) {
dropdownMenu.classList.remove('show');
}
});

const chatbotButton = document.getElementById('chatbot-button');
const chatbot = document.getElementById('chatbot');
const closeChatbot = document.getElementById('close-chatbot');
Expand Down
43 changes: 43 additions & 0 deletions Website/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,49 @@ header {
text-decoration: underline;
}

.dropdown {
float: left;
overflow: hidden;
}

.dropbtn {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;
cursor: pointer;
}

.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}

.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
display: block;
}

.show {
display: block;
}

main {
padding: 20px;
flex: 1;
Expand Down
Loading