-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidget.html
More file actions
114 lines (99 loc) · 2.46 KB
/
widget.html
File metadata and controls
114 lines (99 loc) · 2.46 KB
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
<!DOCTYPE html>
<head>
<title>Leads Summary</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
font-family: 'Poppins', sans-serif;
background: linear-gradient(to bottom right, #f5f0ff, #e0d3f7, #c9b6f2);
background-attachment: fixed;
display: flex;
flex-direction: column;
align-items: center;
padding: 40px 20px;
color: #333;
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-8px); }
}
h1 {
font-size: 36px;
color: #4b0082;
margin-bottom: 30px;
font-weight: 700;
}
.widgets {
display: flex;
flex-direction: column;
gap: 20px;
width: 100%;
max-width: 400px;
}
.widget {
background: linear-gradient(135deg, #d3bffb, #b084f7);
border-radius: 20px;
box-shadow: 0 8px 20px rgba(138, 43, 226, 0.2);
padding: 25px;
text-align: center;
color: #4b0082;
transition: transform 0.3s, box-shadow 0.3s;
border: 1px solid #d9c2fa;
}
.widget:hover {
transform: translateY(-6px);
box-shadow: 0 12px 30px rgba(138, 43, 226, 0.3);
}
.widget h2 {
font-size: 40px;
margin-bottom: 10px;
font-weight: 600;
}
.widget p {
font-size: 18px;
font-weight: 500;
color: #5e2ca5;
}
</style>
</head>
<body>
<h1>Leads Summary</h1>
<div class="widgets">
<div class="widget" id="totalLeads">
<h2>0</h2>
<p>Total Leads</p>
</div>
<div class="widget" id="newLeads">
<h2>0</h2>
<p>New Leads</p>
</div>
<div class="widget" id="upcomingFollowups">
<h2>0</h2>
<p>Upcoming Follow-ups</p>
</div>
<div class="widget" id="overdueFollowups">
<h2>0</h2>
<p>Overdue Follow-ups</p>
</div>
</div>
<script>
function loadWidgets() {
fetch('widget.php')
.then(response => response.json())
.then(data => {
document.querySelector('#totalLeads h2').textContent = data.totalLeads;
document.querySelector('#newLeads h2').textContent = data.newLeads;
document.querySelector('#upcomingFollowups h2').textContent = data.upcomingFollowups;
document.querySelector('#overdueFollowups h2').textContent = data.overdueFollowups;
})
.catch(error => console.error('Error fetching widget data:', error));
}
loadWidgets();
</script>
</body>
</html>