Spaces:
Running
Running
Promote version f534c67 to main
Browse filesPromoted commit f534c67165399bdac2da7111d84053d041425914 to main branch
- index.html +51 -53
- script.js +9 -15
- 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 |
-
<
|
| 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-
|
| 14 |
-
<div class="container py-
|
| 15 |
-
<h1 class="
|
| 16 |
|
| 17 |
-
<div class="
|
| 18 |
<!-- Paper Product Card -->
|
| 19 |
-
<div class="
|
| 20 |
-
<div class="
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
<i class="bi bi-x-lg"></i>
|
| 25 |
</button>
|
| 26 |
-
|
| 27 |
-
<i
|
| 28 |
-
<i
|
| 29 |
</div>
|
| 30 |
-
<h3 class="
|
| 31 |
-
<p class="text-
|
| 32 |
</div>
|
| 33 |
</div>
|
| 34 |
-
<div class="
|
| 35 |
-
|
| 36 |
</div>
|
| 37 |
-
<div class="
|
| 38 |
-
<div class="
|
| 39 |
-
<h2 class="
|
| 40 |
-
<span class="
|
| 41 |
</div>
|
| 42 |
|
| 43 |
-
<p class="
|
| 44 |
|
| 45 |
-
<div class="mb-
|
| 46 |
-
<div
|
| 47 |
-
<label class="
|
| 48 |
-
<input type="date" class="
|
| 49 |
</div>
|
| 50 |
-
<div
|
| 51 |
-
<label class="
|
| 52 |
-
<input type="number" class="
|
| 53 |
</div>
|
| 54 |
-
<div
|
| 55 |
-
<label class="
|
| 56 |
-
<input type="number" class="
|
| 57 |
</div>
|
| 58 |
-
<div
|
| 59 |
-
<label class="
|
| 60 |
-
<select class="
|
| 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="
|
| 69 |
<div>
|
| 70 |
-
<span class="
|
| 71 |
-
<span class="text-
|
| 72 |
</div>
|
| 73 |
-
<div class="text-
|
| 74 |
-
<i class="
|
| 75 |
-
<i class="
|
| 76 |
-
<i class="
|
| 77 |
-
<i class="
|
| 78 |
-
<i class="
|
| 79 |
</div>
|
| 80 |
</div>
|
| 81 |
|
| 82 |
-
<div class="
|
| 83 |
-
<button class="buy-btn
|
| 84 |
-
<i data-feather="shopping-cart" class="
|
| 85 |
Buy
|
| 86 |
</button>
|
| 87 |
-
<button class="sell-btn
|
| 88 |
-
<i data-feather="dollar-sign" class="
|
| 89 |
Sell
|
| 90 |
</button>
|
| 91 |
</div>
|
| 92 |
-
|
| 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('
|
| 39 |
-
errorIcon.classList.add('
|
| 40 |
} else {
|
| 41 |
-
successIcon.classList.add('
|
| 42 |
-
errorIcon.classList.remove('
|
| 43 |
}
|
| 44 |
|
| 45 |
// Show notification
|
| 46 |
-
notification.classList.remove('
|
| 47 |
// Add close button event
|
| 48 |
const closeBtn = card.querySelector('.close-notification');
|
| 49 |
closeBtn.addEventListener('click', () => {
|
| 50 |
-
notification.classList.add('
|
| 51 |
setTimeout(() => {
|
| 52 |
-
notification.classList.add('
|
| 53 |
-
notification.classList.remove('
|
| 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:
|
|
|
|
| 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;
|