Conversion_Kitchen_Code/kitchen_counter/institutional/templates/StudentRegistration/institutionalnavbar.html

323 lines
9.0 KiB
HTML
Raw Normal View History

2024-04-27 09:33:09 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Navigation bar</title>
<link rel="stylesheet" href="style.css">
</head>
<style>
#navi-but1 {
background-color: rgba(255, 241, 241, 0.4);
padding: 2px 5px;
padding-bottom: 0px;
border: transparent;
border-radius: 11px;
float: right;
left: 80% !important;
position: absolute;
z-index: 99999999999999999999999999;
}
.navi-But {
display: inline-block;
cursor: pointer;
}
.navi-But span {
display: block;
width: 30px;
height: 3px;
margin-bottom: 5px;
background-color: black;
transition: transform 0.3s, opacity 0.3s;
}
.active span:nth-child(1) {
transform: rotate(45deg) translate(6px, 6px);
}
.active span:nth-child(2) {
opacity: 0;
}
.active span:nth-child(3) {
transform: rotate(-45deg) translate(6px, -6px);
}
#navi-list1 {
/* background-color:#ffff; */
}
#navi-Ul1 {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content:center;
justify-content:center;
background-color: #ffff;
border-radius: 5px;
padding: 7px 20px;
}
#navi-li1,
#navi-li2,
#navi-li3,
#navi-li4,
#navi-li5 {
margin: 0px 3px;
}
.navi-li {
list-style: none;
}
#navi-li__button1,
#navi-li__button2,
#navi-li__button3,
#navi-li__button4,
#navi-li__button5,
#navi-li__button6 {
text-transform: uppercase;
font-size: 14px;
font-style: normal;
text-decoration: none;
width: auto;
margin: 0px 40px;
padding: 4px 14px 4px 14px;
border: transparent;
border-radius: 8px;
height: 34px;
}
#navi-li__button1:hover {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
}
#navi-li__button2:hover {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
}
#navi-li__button3:hover {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
}
#navi-li__button4:hover {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
}
#navi-li__button5:hover {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2), 0 2px 10px 0 rgba(0, 0, 0, .1);
}
/* utility classes */
.no-wrap {
white-space: nowrap;
font-weight:450 !important;
}
/* media query */
@media screen and (max-width:860px) {
#navi-Ul1 {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
}
#navi-list1 {
background-color: #ffff;
position: absolute;
right: 8%;
z-index: 99999 !important;
padding-top:34px;
}
#navi-list1 {
display: none;
/* hide the content by default */
}
}
@media screen and (max-width:315px) {
#navi-li__button1,
#navi-li__button2,
#navi-li__button3,
#navi-li__button4,
#navi-li__button5{
text-transform: uppercase;
font-size: 8px;
font-weight: 400;
margin: 1px 0px;
padding: 1px 8px;
border: transparent;
border-radius: 4px;
font-family: "Roboto", sans-serif;
}
#navi-li1,
#navi-li2,
#navi-li3,
#navi-li4,
#navi-li5 {
margin: 0px 0px;
}
#navi-list1 {
/* background-color: #ffff; */
position: fixed;
left: -3%;
}
}
@media screen and (min-width:860px) {
#navi-but1 {
display: none;
}
}
@media (min-width: 860) {
#navi-list1 {
display: block;
}
}
svg:not(:root) {
overflow: hidden;
height: 24px;
padding: 2px 2px;
}
</style>
<body>
<nav id="navigation1" class="navigation" >
<div id="navi-but1" class="navi-But">
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>
</div>
<div id="navi-list1" class="navi-List">
<ul id="navi-Ul1" class="navi-Ul">
<li id="navi-li1" class="navi-li">
<a href="/institute/InstituteRegistration">
<button id="navi-li__button6" class="navi-li__button">
<span class="no-wrap">
Institution
</span>
</button>
</a>
</li>
<li id="navi-li1" class="navi-li">
<a href="/institute/AffliliatedStudentReg">
<button id="navi-li__button1" class="navi-li__button">
<span class="no-wrap">
Student
</span>
</button>
</a>
</li>
</ul>
</div>
</nav>
<script>
const hamburgerIcon = document.getElementById('navi-But1');
hamburgerIcon.addEventListener('click', function () {
hamburgerIcon.classList.toggle('active');
});
</script>
<script>
var toggleButton = document.getElementById("navi-but1");
var content = document.getElementById("navi-list1");
toggleButton.addEventListener("click", function () {
if (content.style.display === "none") {
content.style.display = "block"; // show the content
} else {
content.style.display = "none"; // hide the content
}
});
</script>
<script>
const navpose = document.getElementById('navi-list1');
// Function to handle resize event
function handleResize() {
// Check the current window dimensions
const windowWidth = window.innerWidth;
const windowHeight = window.innerHeight;
// Change the color of the box based on the window dimensions
if (windowWidth >= 860) {
navpose.style.display = 'block';
}
else {
navpose.style.display = 'none';
}
}
// Add resize event listener
window.addEventListener('resize', handleResize);
</script>
<script>
// Get the button element by its ID
var buttonElement = document.getElementById('navi-li__button6');
// Get the computed style of the button to obtain its background color
var buttonBackgroundColor = window.getComputedStyle(buttonElement).backgroundColor;
// Check the background color and enable/disable the button accordingly
if (buttonBackgroundColor === 'rgb(154, 154, 154)') { // #9A9A9A in RGB
buttonElement.disabled = true;
} else if (buttonBackgroundColor === 'rgb(51, 176, 202)') { // #33B0CA in RGB
buttonElement.disabled = false;
}
// Note: Make sure to replace 'navi-li__button6' with the actual ID of your button element.
</script>
<script>
// Get the button element by its ID
var buttonElement = document.getElementById('navi-li__button1');
// Get the computed style of the button to obtain its background color
var buttonBackgroundColor = window.getComputedStyle(buttonElement).backgroundColor;
// Check the background color and enable/disable the button accordingly
if (buttonBackgroundColor === 'rgb(154, 154, 154)') { // #9A9A9A in RGB
buttonElement.disabled = true;
} else if (buttonBackgroundColor === 'rgb(51, 176, 202)') { // #33B0CA in RGB
buttonElement.disabled = false;
}
// Note: Make sure to replace 'navi-li__button1' with the actual ID of your button element.
</script>
</body>
</html>