Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the navbar on all pages of website #286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
142 changes: 131 additions & 11 deletions public/choose-file.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<title>Choose Login Page</title>
<style>
* {
Expand Down Expand Up @@ -92,23 +94,141 @@
margin: auto;
padding: 10px;;
}


/* navbar styling */

.navbar {
display: flex;
flex-wrap: wrap;
background-color: rgba(0, 0, 0, 0.8);
justify-content: space-between;
position: fixed; /* Make navbar fixed to the top */
top: 0; /* Position at the top of the viewport */
width: 100%; /* Ensure it spans the full width */
z-index: 2000; /* Ensures it stays on top of other content */
/* background-color: #66B2FF; */
}

.navbar:hover{
display: inline-block;
box-shadow: 0px 0px 5px black;
}

#language{
position: fixed;
bottom: 4vh;
background-color: rgba(0, 0, 255, 0.718);


height: 50px;
padding: 10px;
left: 1vw;
}

.gtranslate_wrapper{
font-size: 20px;
font-weight: 500;
}

nav ul {
overflow: auto;
}

nav ul li {
list-style: none;
float: right;
margin: 10px 16px;
padding: 6px;
font-size: 22px;
/* color: white; */
cursor: pointer;
color: rgb(247, 246, 240); /* Black text color */
transition: color 0.3s, background-color 0.3s;
}

/* nav ul li a {
color: #333333;
text-decoration: none;
} */


#navbar li a{
display:flex;
align-items: center;
justify-content:center;
gap:7px;
font-family: "Space Grotesk", sans-serif;
}

#navbar li:hover{
color: #ff5100;
text-shadow: 2px 2px 2px black;
}
nav ul li:hover {
border-bottom: 1.7px solid white;
}

nav ul li a {
text-decoration: none; /* No underline */
color: inherit; /* Inherit color from parent */
}

nav ul li:first-child {
margin: 10px 28px 10px 10px;
border: 2px solid white;
padding: 6px 22px;
border-radius: 12px;
}

nav ul li:first-child:hover {
border: 2px solid transparent;
background-clip: content-box;
border-radius: 12px;
border-image: linear-gradient(
-225deg,
#231557 0%,
#44107a 29%,
#ff1361 100%,
#fef850 100%
);
border-image-slice: 1;
}

</style>
</head>

<body>


<div style="position: absolute; bottom: 30px; left: 30px;" class="gtranslate_wrapper"></div>
<script>
window.gtranslateSettings = {
default_language: "en",
detect_browser_language: true,
wrapper_selector: ".gtranslate_wrapper",
font_size: 100,
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer ></script>
<img src="images/moon.webp" id="icon">
<div class="navbar">
<div class="logo"></div>
<div class="main">
<nav>
<ul id="navbar">
<li title="Login"><a href="choose-file.html"><i class='bx bxs-user-circle' ></i>Login</a></li>
<li title="Register" style="border-bottom: 2px solid white;border-radius: 9px;"><a href="choose-signup-file.html"><i class='bx bx-log-in-circle' ></i>Register</a></li>
<li title="Contact Us"><a href="./contact-us.html"><i class='bx bxs-contact' ></i>Contact Us</a></li>
<li title="Our Services"><a href="./index.html"><i class='bx bx-bar-chart-square'></i>Services</a></li>
<li title="About Us"><a href="./index.html"><i class='bx bx-vertical-bottom'></i>About</a></li>
<li title="Main Page"><a href="./index.html"><i class='bx bx-home' ></i>Home</a></li>

<li id="language">
<div class="gtranslate_wrapper"></div>
<script>
window.gtranslateSettings = {
default_language: "en",
detect_browser_language: true,
wrapper_selector: ".gtranslate_wrapper",
font_size: 100,
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer></script>
</li>
</ul>
</nav>
</div>
</div>

<div class="container">
<h2>Select Who You Are</h2>
Expand Down
143 changes: 132 additions & 11 deletions public/choose-signup-file.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Choose Signup Page</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<style>
* {
box-sizing: border-box;
Expand Down Expand Up @@ -93,21 +95,140 @@
margin: auto;
padding: 10px;;
}


/* navbar styling */

.navbar {
display: flex;
flex-wrap: wrap;
background-color: rgba(0, 0, 0, 0.8);
justify-content: space-between;
position: fixed; /* Make navbar fixed to the top */
top: 0; /* Position at the top of the viewport */
width: 100%; /* Ensure it spans the full width */
z-index: 2000; /* Ensures it stays on top of other content */
/* background-color: #66B2FF; */
}

.navbar:hover{
display: inline-block;
box-shadow: 0px 0px 5px black;
}

#language{
position: fixed;
bottom: 4vh;
background-color: rgba(0, 0, 255, 0.718);


height: 50px;
padding: 10px;
left: 1vw;
}

.gtranslate_wrapper{
font-size: 20px;
font-weight: 500;
}

nav ul {
overflow: auto;
}

nav ul li {
list-style: none;
float: right;
margin: 10px 16px;
padding: 6px;
font-size: 22px;
/* color: white; */
cursor: pointer;
color: rgb(247, 246, 240); /* Black text color */
transition: color 0.3s, background-color 0.3s;
}

/* nav ul li a {
color: #333333;
text-decoration: none;
} */


#navbar li a{
display:flex;
align-items: center;
justify-content:center;
gap:7px;
font-family: "Space Grotesk", sans-serif;
}

#navbar li:hover{
color: #ff5100;
text-shadow: 2px 2px 2px black;
}
nav ul li:hover {
border-bottom: 1.7px solid white;
}

nav ul li a {
text-decoration: none; /* No underline */
color: inherit; /* Inherit color from parent */
}

nav ul li:first-child {
margin: 10px 28px 10px 10px;
border: 2px solid white;
padding: 6px 22px;
border-radius: 12px;
}

nav ul li:first-child:hover {
border: 2px solid transparent;
background-clip: content-box;
border-radius: 12px;
border-image: linear-gradient(
-225deg,
#231557 0%,
#44107a 29%,
#ff1361 100%,
#fef850 100%
);
border-image-slice: 1;
}

</style>
</head>

<body>
<div style="position: absolute; bottom: 30px; left: 30px;" class="gtranslate_wrapper"></div>
<script>
window.gtranslateSettings = {
default_language: "en",
detect_browser_language: true,
wrapper_selector: ".gtranslate_wrapper",
font_size: 100,
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer ></script>

<div class="navbar">
<div class="logo"></div>
<div class="main">
<nav>
<ul id="navbar">
<li title="Login"><a href="choose-file.html"><i class='bx bxs-user-circle' ></i>Login</a></li>
<li title="Register" style="border-bottom: 2px solid white;border-radius: 9px;"><a href="choose-signup-file.html"><i class='bx bx-log-in-circle' ></i>Register</a></li>
<li title="Contact Us"><a href="./contact-us.html"><i class='bx bxs-contact' ></i>Contact Us</a></li>
<li title="Our Services"><a href="./index.html"><i class='bx bx-bar-chart-square'></i>Services</a></li>
<li title="About Us"><a href="./index.html"><i class='bx bx-vertical-bottom'></i>About</a></li>
<li title="Main Page"><a href="./index.html"><i class='bx bx-home' ></i>Home</a></li>

<li id="language">
<div class="gtranslate_wrapper"></div>
<script>
window.gtranslateSettings = {
default_language: "en",
detect_browser_language: true,
wrapper_selector: ".gtranslate_wrapper",
font_size: 100,
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer></script>
</li>
</ul>
</nav>
</div>
</div>

<img src="images/moon.webp" id="icon">

<div class="container">
Expand Down
33 changes: 33 additions & 0 deletions public/contact-us.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us</title>
<link rel="stylesheet" href="./css/contact-us.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<style>
/* Style for the message area */
#messageArea {
Expand All @@ -31,6 +33,37 @@
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer ></script>
<div class="navbar">
<div class="logo"></div>
<div class="main">
<nav>
<ul id="navbar">
<li title="Login"><a href="choose-file.html"><i class='bx bxs-user-circle' ></i>Login</a></li>
<li title="Register" style="border-bottom: 2px solid white;border-radius: 9px;"><a href="choose-signup-file.html"><i class='bx bx-log-in-circle' ></i>Register</a></li>
<li title="Contact Us"><a href="./contact-us.html"><i class='bx bxs-contact' ></i>Contact Us</a></li>
<li title="Our Services"><a href="./index.html"><i class='bx bx-bar-chart-square'></i>Services</a></li>
<li title="About Us"><a href="./index.html"><i class='bx bx-vertical-bottom'></i>About</a></li>
<li title="Main Page"><a href="./index.html"><i class='bx bx-home' ></i>Home</a></li>


</ul>
</nav>
</div>
</div>

<script>
// Adding background color to the header on scroll
window.onscroll = function () {
var navbar = document.querySelector(".navbar");
if (window.scrollY > 50) {
navbar.style.backgroundColor = "rgba(0, 0, 0, 0.8)"; // Dark background on scroll
navbar.querySelectorAll("a").forEach(a => a.style.color = "white"); // Change link color
} else {
navbar.style.backgroundColor = "transparent"; // Revert back to transparent background
navbar.querySelectorAll("a").forEach(a => a.style.color = "white"); // Revert link color
}
};
</script>
<img src="images/moon.webp" id="icon">
<div class="maindiv">
<div class="imgdiv">
Expand Down
Loading