-
-
Notifications
You must be signed in to change notification settings - Fork 432
/
creditCard.html
153 lines (140 loc) · 5.57 KB
/
creditCard.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
150
151
152
153
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Credit Card Comparison Tool</title>
<link rel="shortcut icon" href="/assets/images/favicon2.webp" type="image/png" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
<link rel="stylesheet" href="./assets/css/creditCard.css">
<style>
.circle {
position: absolute;
width: 25px;
height: 25px;
border-radius: 50%;
pointer-events: none;
background: radial-gradient(circle, rgba(73, 232, 247, 0.466), rgba(141, 38, 172, 0.5));
transition: transform 0.1s, left 0.1s, top 0.1s;
}
.circle-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 9999;
}
</style>
</head>
<body>
<body>
<div class="circle-container">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
const coords = { x: 0, y: 0 };
const circles = document.querySelectorAll(".circle");
circles.forEach(function (circle) {
circle.x = 0;
circle.y = 0;
});
window.addEventListener("mousemove", function (e) {
coords.x = e.pageX;
coords.y = e.pageY - window.scrollY; // Adjust for vertical scroll position
});
function animateCircles() {
let x = coords.x;
let y = coords.y;
circles.forEach(function (circle, index) {
circle.style.left = `${x - 12}px`;
circle.style.top = `${y - 12}px`;
circle.style.transform = `scale(${(circles.length - index) / circles.length})`;
const nextCircle = circles[index + 1] || circles[0];
circle.x = x;
circle.y = y;
x += (nextCircle.x - x) * 0.3;
y += (nextCircle.y - y) * 0.3;
});
requestAnimationFrame(animateCircles);
}
animateCircles();
});
</script>
</body>
<div class="cc-app">
<header class="cc-header">
<h1><i class="fas fa-credit-card"></i> Credit Card Comparison Tool</h1>
</header>
<main class="cc-main">
<aside class="cc-sidebar">
<div class="cc-filters">
<h2><i class="fas fa-filter"></i> Filters</h2>
<div class="cc-filter-item">
<label for="cashback">Min Cashback (%)</label>
<input type="range" id="cashback" min="0" max="5" step="0.5" value="0">
<span id="cashback-value">0%</span>
</div>
<div class="cc-filter-item">
<label for="annual-fee">Max Annual Fee (₹)</label>
<input type="range" id="annual-fee" min="0" max="5000" step="100" value="5000">
<span id="annual-fee-value">₹5000</span>
</div>
<div class="cc-filter-item">
<label for="credit-score">Credit Score</label>
<select id="credit-score">
<option value="all">All</option>
<option value="excellent">Excellent</option>
<option value="good">Good</option>
<option value="fair">Fair</option>
</select>
</div>
</div>
</aside>
<div class="cc-content">
<div id="cc-list" class="cc-list">
<!-- Credit cards will be dynamically inserted here -->
</div>
<div id="cc-comparison" class="cc-comparison">
<h2><i class="fas fa-table"></i> Side-by-Side Comparison</h2>
<div id="comparison-container" class="comparison-container">
<!-- Comparison cards will be dynamically inserted here -->
</div>
</div>
</div>
</main>
</div>
<script src="./assets/js/credit.js"></script>
</body>
</html>