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

Added a theme changing button in NavBar #85

Open
wants to merge 2 commits 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
180 changes: 112 additions & 68 deletions Contact.html
Original file line number Diff line number Diff line change
@@ -1,81 +1,125 @@
<!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">
<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>Contact us</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<script src="https://kit.fontawesome.com/27551d6060.js" crossorigin="anonymous"></script>
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="css/contact.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/nav.css">
</head>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi"
crossorigin="anonymous"
/>
<script
src="https://kit.fontawesome.com/27551d6060.js"
crossorigin="anonymous"
></script>
<link
href="http://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
/>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="css/contact.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/nav.css" />
</head>

<body>
<body>
<nav>
<div class="topnav" id="myTopnav">
<div class="logo"><img src="img/online-shop.jpg" alt="" />
<img src="/img/moon.png" alt="" id="darkmode-icon">
</div>
<div class="nvl">
<a class="nav-link" href="index.html">Home</a>
<a class="nav-link" href="#news">About</a>
<a class="nav-link" href="#contact">Services</a>
<a class="nav-link" href="Contact.html" class="active">Contact Us</a>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
<i class="fa fa-bars"></i>
</a>
<form class="srch" role="search">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-dark" type="submit"><img style="width: 26px;" src="img/search.png"
alt=""></button>
</form>
</div>
<div class="topnav" id="myTopnav">
<div class="logo">
<img src="img/online-shop.jpg" alt="" />
<img src="/img/moon.png" alt="" id="darkmode-icon" />
</div>
<div class="nvl">
<a class="nav-link" href="index.html">Home</a>
<a class="nav-link" href="#news">About</a>
<a class="nav-link" href="#contact">Services</a>
<a class="nav-link" href="Contact.html" class="active">Contact Us</a>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
<i class="fa fa-bars"></i>
</a>
<form class="srch" role="search">
<input
class="form-control me-2"
type="search"
placeholder="Search"
aria-label="Search"
/>
<!-- <button class="btn btn-outline-dark" type="submit">
<img style="width: 26px" src="img/search.png" alt="" />
</button> -->gti
</form>
<button id="themeToggleBtn" class="theme-toggle-btn">🌙</button>
<!-- Theme toggle button -->
</div>
</div>
</nav>

<main>
<div class="title">Contact US</div>
<div class="title-info">We'll get back to you soon!</div>
<center>
<div class="title">Contact US</div>
<div class="title-info">We'll get back to you soon!</div>
<center>
<form action="" method="" class="form">
<div class="input-group">
<!-- <label class="form-label" for="first-name">First name</label> -->
<input
class="form-control border border-dark rounded"
type="text"
name="first_name"
id="first-name"
placeholder="First name"
/>
</div>

<form action="" method="" class="form">
<div class="input-group ">
<!-- <label class="form-label" for="first-name">First name</label> -->
<input class=" form-control border border-dark rounded" type="text" name="first_name" id="first-name" placeholder="First name">
</div>

<div class="input-group">
<!-- <label for="last-name">Last name</label> -->
<input class="border form-control border-dark rounded" type="text" name="last_name" id="last-name" placeholder="Last Name">
</div>

<div class="input-group">
<!-- <label for="e-mail">E-mail</label> -->
<input class="border form-control border-dark rounded" type="email" name="e-mail" id="e-mail" placeholder="E-mail">
</div>

<div class="textarea-group">
<!-- <label for="message">Message</label> -->
<textarea class="border form-control border-dark rounded" name="message" id="message" rows="5" placeholder="Message"></textarea>
</div>

<div class="button-div">
<button type="submit">Send</button>
</div>
</form>
</center>
</main>
<script src="script.js"></script>
<div class="input-group">
<!-- <label for="last-name">Last name</label> -->
<input
class="border form-control border-dark rounded"
type="text"
name="last_name"
id="last-name"
placeholder="Last Name"
/>
</div>

</body>
<div class="input-group">
<!-- <label for="e-mail">E-mail</label> -->
<input
class="border form-control border-dark rounded"
type="email"
name="e-mail"
id="e-mail"
placeholder="E-mail"
/>
</div>

<div class="textarea-group">
<!-- <label for="message">Message</label> -->
<textarea
class="border form-control border-dark rounded"
name="message"
id="message"
rows="5"
placeholder="Message"
></textarea>
</div>

<div class="button-div">
<button type="submit">Send</button>
</div>
</form>
</center>
</main>
<script src="script.js"></script>
</body>
</html>
55 changes: 54 additions & 1 deletion css/nav.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@

/* Dark Mode */
body.dark-mode {
background-color: #212529;
color: white;
}

.topnav.dark-mode {
background-color: #212529;
}

.topnav a.dark-mode {
color: white;
}

.srch input.dark-mode {
background-color: #333;
color: white;
}

/* Light Mode */
body.light-mode {
background-color: #f1f1f1;
color: #000;
}

.topnav.light-mode {
background-color: #fff;
}

.topnav a.light-mode {
color: #000;
}

.srch input.light-mode {
background-color: white;
color: black;
}

/* Button styling */
.theme-toggle-btn {
background: none;
border: none;
cursor: pointer;
font-size: 18px;
color: #956f6fb6;
}

.theme-toggle-btn:hover {
color: white;
}


.topnav {
overflow: hidden;
background-color: #212529;
Expand All @@ -11,7 +64,7 @@
.topnav a {
float: left;
display: block;
color: #f2f2f2b6;
color: #956f6fb6;
text-align: center;
padding: 14px 16px;
text-decoration: none;
Expand Down
Loading