-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
120 lines (100 loc) · 4.09 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
require_once('config.php');
$url = $_ENV['BASE_URL'];
$brandName = $_ENV['BRAND_NAME'];
?>
<!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">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<style>
.navbar-nav {
margin-left: auto;
}
.dropdown-content {
padding: 10px;
background-color: whitesmoke;
display: none;
}
.dropdown-content li {
list-style: none;
padding: 10px;
border-bottom: 3px solid red;
}
.dropdown-content li a {
text-decoration: none;
color: black;
}
.withdrop:hover .dropdown-content {
position: absolute;
display: block;
}
.withdrop .dropdown-content li:hover {
background-color: gainsboro;
width: 100%;
}
.withdrop .dropdown-content li a:hover {
color: blue;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark px-4 py-2">
<div class="container-fluid">
<a class="navbar-brand" href="<?php echo $url; ?>/index.php"><?php echo $brandName; ?></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon" id="menucicon" onclick="hidebtn()"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="<?php echo $url; ?>/index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo $url; ?>/shopnow.php">Shop Now</a>
</li>
<li class="nav-item withdrop" id="dropadmin">
<a class="nav-link" href="#">Admin</a>
<ul class="dropdown-content">
<li><a href="<?php echo $url; ?>/admin/1admindashboard.php">Dashboard</a></li>
<li><a href="<?php echo $url; ?>/admin/1adminlogin.php">Login</a></li>
<li><a href="<?php echo $url; ?>/admin/1adminlogout.php">Logout</a></li>
</ul>
</li>
<li class="nav-item withdrop">
<a class="nav-link" href="#">Customer</a>
<ul class="dropdown-content">
<li><a href="<?php echo $url; ?>/customer/2customerdashboard.php">Dashboard</a></li>
<li><a href="<?php echo $url; ?>/customer/2customerlogin.php">Login</a></li>
<li><a href="<?php echo $url; ?>/customer/2customerlogout.php">Logout</a></li>
</ul>
</li>
<li class="nav-item withdrop">
<a class="nav-link" href="#">Supplier Panel</a>
<ul class="dropdown-content">
<li><a href="<?php echo $url; ?>/supplier/supplier_dashboard.php">Dashboard</a></li>
<li><a href="<?php echo $url; ?>/supplier/supplier_login.php">Login</a></li>
<li><a href="<?php echo $url; ?>/supplier/supplier_logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<script>
function hidebtn() {
const navItem = document.getElementById('navbarNav')
if (navItem.style.display === 'none' || navItem.style.display === '') {
navItem.style.display = 'block';
} else {
navItem.style.display = 'none';
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+" crossorigin="anonymous"></script>
</body>
</html>