wergrom commited on
Commit
4596659
·
verified ·
1 Parent(s): 31cb8c6

Promote version f534c67 to main

Browse files

Promoted commit f534c67165399bdac2da7111d84053d041425914 to main branch

Files changed (3) hide show
  1. index.html +51 -53
  2. script.js +9 -15
  3. style.css +2 -10
index.html CHANGED
@@ -5,59 +5,57 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>PaperTrade Pulse</title>
7
  <link rel="stylesheet" href="style.css">
8
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
9
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
  <script src="https://unpkg.com/feather-icons"></script>
12
  </head>
13
- <body class="bg-light min-vh-100">
14
- <div class="container py-5">
15
- <h1 class="display-4 fw-bold text-center mb-5 text-dark">PaperTrade Pulse 🎴</h1>
16
 
17
- <div class="row g-4">
18
  <!-- Paper Product Card -->
19
- <div class="col-md-6 col-lg-4">
20
- <div class="paper-card card h-100 shadow-sm position-relative overflow-hidden">
21
- <div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center z-3 notification d-none">
22
- <div class="bg-white rounded shadow-lg p-4 w-75 text-center position-relative">
23
- <button class="close-notification position-absolute top-0 end-0 m-2 text-secondary">
24
- <i class="bi bi-x-lg"></i>
25
  </button>
26
- <div class="icon-container mb-3">
27
- <i class="bi bi-check-circle-fill text-success fs-1 mx-auto d-none success-icon"></i>
28
- <i class="bi bi-x-circle-fill text-danger fs-1 mx-auto d-none error-icon"></i>
29
  </div>
30
- <h3 class="h4 fw-semibold mb-2 notification-title">Success!</h3>
31
- <p class="text-muted notification-message">Your transaction was completed successfully.</p>
32
  </div>
33
  </div>
34
- <div class="card-img-top bg-primary bg-gradient d-flex align-items-center justify-content-center" style="height: 150px;">
35
- <i data-feather="file-text" class="text-white" width="80" height="80"></i>
36
  </div>
37
- <div class="card-body">
38
- <div class="d-flex justify-content-between align-items-start mb-2">
39
- <h2 class="h5 fw-bold card-title">Premium A4 Paper</h2>
40
- <span class="badge bg-primary">In Stock</span>
41
  </div>
42
 
43
- <p class="card-text text-muted mb-3">High quality 80gsm paper with smooth texture for professional printing.</p>
44
 
45
- <div class="mb-3">
46
- <div class="mb-3">
47
- <label class="form-label">Order Date</label>
48
- <input type="date" class="form-control order-date">
49
  </div>
50
- <div class="mb-3">
51
- <label class="form-label">Shares</label>
52
- <input type="number" class="form-control shares" placeholder="Enter quantity">
53
  </div>
54
- <div class="mb-3">
55
- <label class="form-label">Amount</label>
56
- <input type="number" class="form-control amount" placeholder="Enter amount">
57
  </div>
58
- <div class="mb-3">
59
- <label class="form-label">Account</label>
60
- <select class="form-select account">
61
  <option value="">Select account</option>
62
  <option value="personal">Personal</option>
63
  <option value="business">Business</option>
@@ -65,39 +63,39 @@
65
  </div>
66
  </div>
67
 
68
- <div class="d-flex justify-content-between align-items-center mb-3">
69
  <div>
70
- <span class="h4 fw-bold">$12.99</span>
71
- <span class="text-muted small ms-1">/ ream</span>
72
  </div>
73
- <div class="text-warning">
74
- <i class="bi bi-star-fill"></i>
75
- <i class="bi bi-star-fill"></i>
76
- <i class="bi bi-star-fill"></i>
77
- <i class="bi bi-star-fill"></i>
78
- <i class="bi bi-star"></i>
79
  </div>
80
  </div>
81
 
82
- <div class="d-grid gap-2 d-md-flex">
83
- <button class="buy-btn btn btn-primary flex-grow-1">
84
- <i data-feather="shopping-cart" class="feather me-2" width="16" height="16"></i>
85
  Buy
86
  </button>
87
- <button class="sell-btn btn btn-purple flex-grow-1">
88
- <i data-feather="dollar-sign" class="feather me-2" width="16" height="16"></i>
89
  Sell
90
  </button>
91
  </div>
92
- </div>
93
  </div>
94
  </div>
95
  </div>
96
 
97
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
98
  <script src="script.js"></script>
99
  <script>
100
  feather.replace();
101
  </script>
 
102
  </body>
103
  </html>
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>PaperTrade Pulse</title>
7
  <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
 
9
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
  <script src="https://unpkg.com/feather-icons"></script>
11
  </head>
12
+ <body class="bg-gray-100 min-h-screen">
13
+ <div class="container mx-auto py-12 px-4">
14
+ <h1 class="text-4xl font-bold text-center mb-12 text-gray-800">PaperTrade Pulse 🎴</h1>
15
 
16
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
17
  <!-- Paper Product Card -->
18
+ <div class="paper-card bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 hover:shadow-xl relative">
19
+ <div class="absolute inset-0 flex items-center justify-center z-10 notification hidden">
20
+ <div class="bg-white rounded-lg shadow-2xl p-6 max-w-sm w-full text-center relative">
21
+ <button class="close-notification absolute top-2 right-2 text-gray-400 hover:text-gray-600">
22
+ <i data-feather="x" class="w-5 h-5"></i>
 
23
  </button>
24
+ <div class="icon-container mb-4">
25
+ <i data-feather="check-circle" class="text-green-500 w-12 h-12 mx-auto hidden success-icon"></i>
26
+ <i data-feather="x-circle" class="text-red-500 w-12 h-12 mx-auto hidden error-icon"></i>
27
  </div>
28
+ <h3 class="text-xl font-semibold mb-2 notification-title">Success!</h3>
29
+ <p class="text-gray-600 notification-message">Your transaction was completed successfully.</p>
30
  </div>
31
  </div>
32
+ <div class="h-32 bg-gradient-to-r from-blue-400 to-purple-500 flex items-center justify-center">
33
+ <i data-feather="file-text" class="text-white w-20 h-20"></i>
34
  </div>
35
+ <div class="p-6">
36
+ <div class="flex justify-between items-start mb-2">
37
+ <h2 class="text-xl font-bold text-gray-800">Premium A4 Paper</h2>
38
+ <span class="bg-blue-100 text-blue-800 text-xs font-semibold px-2.5 py-0.5 rounded">In Stock</span>
39
  </div>
40
 
41
+ <p class="text-gray-600 mb-4">High quality 80gsm paper with smooth texture for professional printing.</p>
42
 
43
+ <div class="space-y-3 mb-4">
44
+ <div>
45
+ <label class="block text-sm font-medium text-gray-700 mb-1">Order Date</label>
46
+ <input type="date" class="order-date w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
47
  </div>
48
+ <div>
49
+ <label class="block text-sm font-medium text-gray-700 mb-1">Shares</label>
50
+ <input type="number" class="shares w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter quantity">
51
  </div>
52
+ <div>
53
+ <label class="block text-sm font-medium text-gray-700 mb-1">Amount</label>
54
+ <input type="number" class="amount w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter amount">
55
  </div>
56
+ <div>
57
+ <label class="block text-sm font-medium text-gray-700 mb-1">Account</label>
58
+ <select class="account w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
59
  <option value="">Select account</option>
60
  <option value="personal">Personal</option>
61
  <option value="business">Business</option>
 
63
  </div>
64
  </div>
65
 
66
+ <div class="flex items-center justify-between mb-4">
67
  <div>
68
+ <span class="text-2xl font-bold text-gray-900">$12.99</span>
69
+ <span class="text-sm text-gray-500 ml-1">/ ream</span>
70
  </div>
71
+ <div class="text-yellow-400 flex">
72
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
73
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
74
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
75
+ <i data-feather="star" class="w-4 h-4 fill-current"></i>
76
+ <i data-feather="star" class="w-4 h-4"></i>
77
  </div>
78
  </div>
79
 
80
+ <div class="flex space-x-3">
81
+ <button class="buy-btn flex-1 bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg transition-colors duration-300 flex items-center justify-center">
82
+ <i data-feather="shopping-cart" class="w-4 h-4 mr-2"></i>
83
  Buy
84
  </button>
85
+ <button class="sell-btn flex-1 bg-purple-600 hover:bg-purple-700 text-white py-2 px-4 rounded-lg transition-colors duration-300 flex items-center justify-center">
86
+ <i data-feather="dollar-sign" class="w-4 h-4 mr-2"></i>
87
  Sell
88
  </button>
89
  </div>
90
+ </div>
91
  </div>
92
  </div>
93
  </div>
94
 
 
95
  <script src="script.js"></script>
96
  <script>
97
  feather.replace();
98
  </script>
99
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
100
  </body>
101
  </html>
script.js CHANGED
@@ -1,11 +1,4 @@
1
-
2
  document.addEventListener('DOMContentLoaded', function() {
3
- // Initialize tooltips
4
- const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
5
- tooltipTriggerList.map(function (tooltipTriggerEl) {
6
- return new bootstrap.Tooltip(tooltipTriggerEl);
7
- });
8
-
9
  const buyButtons = document.querySelectorAll('.buy-btn');
10
  const sellButtons = document.querySelectorAll('.sell-btn');
11
 
@@ -22,6 +15,7 @@ document.addEventListener('DOMContentLoaded', function() {
22
  showNotification(card, 'error', 'Sell Request Failed', 'Minimum sell quantity not met. Please try again.');
23
  });
24
  });
 
25
  function showNotification(card, type, title, message) {
26
  const notification = card.querySelector('.notification');
27
  const successIcon = card.querySelector('.success-icon');
@@ -35,22 +29,22 @@ document.addEventListener('DOMContentLoaded', function() {
35
 
36
  // Show appropriate icon
37
  if (type === 'success') {
38
- successIcon.classList.remove('d-none');
39
- errorIcon.classList.add('d-none');
40
  } else {
41
- successIcon.classList.add('d-none');
42
- errorIcon.classList.remove('d-none');
43
  }
44
 
45
  // Show notification
46
- notification.classList.remove('d-none');
47
  // Add close button event
48
  const closeBtn = card.querySelector('.close-notification');
49
  closeBtn.addEventListener('click', () => {
50
- notification.classList.add('fade-out');
51
  setTimeout(() => {
52
- notification.classList.add('d-none');
53
- notification.classList.remove('fade-out');
54
  }, 300);
55
  });
56
  }
 
 
1
  document.addEventListener('DOMContentLoaded', function() {
 
 
 
 
 
 
2
  const buyButtons = document.querySelectorAll('.buy-btn');
3
  const sellButtons = document.querySelectorAll('.sell-btn');
4
 
 
15
  showNotification(card, 'error', 'Sell Request Failed', 'Minimum sell quantity not met. Please try again.');
16
  });
17
  });
18
+
19
  function showNotification(card, type, title, message) {
20
  const notification = card.querySelector('.notification');
21
  const successIcon = card.querySelector('.success-icon');
 
29
 
30
  // Show appropriate icon
31
  if (type === 'success') {
32
+ successIcon.classList.remove('hidden');
33
+ errorIcon.classList.add('hidden');
34
  } else {
35
+ successIcon.classList.add('hidden');
36
+ errorIcon.classList.remove('hidden');
37
  }
38
 
39
  // Show notification
40
+ notification.classList.remove('hidden');
41
  // Add close button event
42
  const closeBtn = card.querySelector('.close-notification');
43
  closeBtn.addEventListener('click', () => {
44
+ notification.classList.add('hide');
45
  setTimeout(() => {
46
+ notification.classList.add('hidden');
47
+ notification.classList.remove('hide');
48
  }, 300);
49
  });
50
  }
style.css CHANGED
@@ -1,22 +1,14 @@
1
 
2
  .paper-card {
3
  position: relative;
4
- transition: all 0.3s ease;
 
5
  min-height: 650px;
6
  }
7
  .paper-card:hover {
8
  transform: translateY(-5px);
9
- box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
10
  }
11
 
12
- .btn-purple {
13
- background-color: #6f42c1;
14
- color: white;
15
- }
16
- .btn-purple:hover {
17
- background-color: #5a32a3;
18
- color: white;
19
- }
20
  .notification {
21
  background-color: rgba(0, 0, 0, 0.7);
22
  animation: fadeIn 0.3s ease forwards;
 
1
 
2
  .paper-card {
3
  position: relative;
4
+ transition: transform 0.3s ease;
5
+ height: auto;
6
  min-height: 650px;
7
  }
8
  .paper-card:hover {
9
  transform: translateY(-5px);
 
10
  }
11
 
 
 
 
 
 
 
 
 
12
  .notification {
13
  background-color: rgba(0, 0, 0, 0.7);
14
  animation: fadeIn 0.3s ease forwards;