forked from kloud47/YourFleet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.htm
115 lines (106 loc) · 2.4 KB
/
main.htm
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
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
}
.container {
display: flex;
width: 300px;
height: 200px;
border: 1px solid black;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 1fr);
gap: 10px;
padding: 10px;
background-color: white;
margin: 50px auto;
position: relative;
}
.cross-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 1%;
transform: translateY(50%);
right: 300px;
cursor: pointer;
font-size: 24px;
color: black;
}
.cross {
font-size: 24px;
color: black;
}
.button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.button:hover {
background-color: #3e8e41;
}
.popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
z-index: 100;
}
.close {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
}
.popup-content {
margin-top: 20px;
}
</style>
</head>
<body>
<h2>box</h2>
<div class="container">
<button class="button" onclick="openPopup('hub')">Hub</button>
<button class="button" onclick="openPopup('postOffice')">Post Office</button>
<button class="button" onclick="openPopup('deliveryPartner')">Delivery Partner</button>
<button class="button" onclick="openPopup('customer')">Customer</button>
</div>
<div class="cross-container">
<div class="cross">×</div>
</div>
<div id="popup" class="popup">
<span class="close" onclick="closePopup()">×</span>
<h2 id="popupTitle"></h2>
<div class="popup-content">
<p id="popupContent"></p>
</div>
</div>
<script>
function openPopup(id) {
document.getElementById("popup").style.display = "block";
document.getElementById("popupTitle").innerHTML = id.toUpperCase();
document.getElementById("popupContent").innerHTML = "This is the content for " + id + ".";
}
function closePopup() {
document.getElementById("popup").style.display = "none";
}
</script>
</body>
</html>