-
Notifications
You must be signed in to change notification settings - Fork 214
/
header.html
149 lines (149 loc) · 3.72 KB
/
header.html
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<html>
<head>
<title>
Ticket Marketplace
</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet"/>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
background-color: #333;
color: white;
transition: background-color 0.3s, color 0.3s;
}
.navbar {
background-color: #333;
overflow: hidden;
display: flex;
align-items: center;
padding: 10px 20px;
}
.navbar img {
height: 40px;
width: 40px;
border-radius: 50%;
}
.navbar .title {
color: #00d1b2;
font-size: 18px; /* Decreased font size */
font-weight: bold;
margin-left: 10px;
flex-grow: 1;
}
.navbar a {
color: white;
text-decoration: none;
padding: 10px 15px;
display: inline-block;
font-size: 14px; /* Decreased font size */
border-radius: 5px;
transition: background-color 0.3s ease, transform 0.3s ease;
position: relative;
}
.navbar a::after {
content: '';
display: block;
width: 0;
height: 2px;
background: white;
transition: width 0.3s;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
.navbar a:hover::after {
width: 100%;
}
.navbar a:hover {
background-color: #575757;
transform: scale(1.1);
}
.navbar .icon {
margin-right: 5px;
}
.navbar .theme-icon {
margin-left: auto;
font-size: 20px; /* Decreased font size */
color: #f1c40f;
cursor: pointer;
}
.light-mode {
background-color: white;
color: black;
}
.light-mode .navbar {
background-color: #f1f1f1;
}
.light-mode .navbar a {
color: black;
}
.light-mode .navbar a::after {
background: black;
}
.light-mode .navbar .theme-icon {
color: #333;
}
</style>
</head>
<body>
<div class="navbar">
<img alt="Logo image" height="40" src="https://ticket-booking-blue.vercel.app/images/4.jpeg" width="40"/>
<div class="title">
Ticket Marketplace
</div>
<a href="#">
<i class="fas fa-home icon">
</i>
Home
</a>
<a href="#">
<i class="fas fa-users icon">
</i>
Contributors
</a>
<a href="#">
<i class="fas fa-ticket-alt icon">
</i>
Buy Ticket
</a>
<a href="#">
<i class="fas fa-tag icon">
</i>
Sell
</a>
<a href="#">
<i class="fas fa-envelope icon">
</i>
Contact
</a>
<a href="#">
<i class="fas fa-info-circle icon">
</i>
About
</a>
<a href="#">
<i class="fas fa-sign-in-alt icon">
</i>
Login
</a>
<i class="fas fa-moon theme-icon" id="theme-icon" onclick="toggleTheme()">
</i>
</div>
<script>
function toggleTheme() {
const body = document.body;
const themeIcon = document.getElementById('theme-icon');
body.classList.toggle('light-mode');
if (body.classList.contains('light-mode')) {
themeIcon.classList.remove('fa-moon');
themeIcon.classList.add('fa-sun');
} else {
themeIcon.classList.remove('fa-sun');
themeIcon.classList.add('fa-moon');
}
}
</script>
</body>
</html>