Spaces:
Running
Running
а можешь на bootstrap сделать?
Browse files- index.html +53 -51
- script.js +15 -9
- style.css +10 -2
index.html
CHANGED
|
@@ -5,57 +5,59 @@
|
|
| 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 |
<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-
|
| 13 |
-
<div class="container
|
| 14 |
-
<h1 class="
|
| 15 |
|
| 16 |
-
<div class="
|
| 17 |
<!-- Paper Product Card -->
|
| 18 |
-
<div class="
|
| 19 |
-
<div class="
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
| 23 |
</button>
|
| 24 |
-
<div class="icon-container mb-
|
| 25 |
-
<i
|
| 26 |
-
<i
|
| 27 |
</div>
|
| 28 |
-
<h3 class="
|
| 29 |
-
<p class="text-
|
| 30 |
</div>
|
| 31 |
</div>
|
| 32 |
-
<div class="
|
| 33 |
-
<i data-feather="file-text" class="text-white
|
| 34 |
</div>
|
| 35 |
-
<div class="
|
| 36 |
-
<div class="flex justify-between items-start mb-2">
|
| 37 |
-
<h2 class="
|
| 38 |
-
<span class="bg-
|
| 39 |
</div>
|
| 40 |
|
| 41 |
-
<p class="text-
|
| 42 |
|
| 43 |
-
<div class="
|
| 44 |
-
<div>
|
| 45 |
-
<label class="
|
| 46 |
-
<input type="date" class="order-date
|
| 47 |
</div>
|
| 48 |
-
<div>
|
| 49 |
-
<label class="
|
| 50 |
-
<input type="number" class="
|
| 51 |
</div>
|
| 52 |
-
<div>
|
| 53 |
-
<label class="
|
| 54 |
-
<input type="number" class="
|
| 55 |
</div>
|
| 56 |
-
<div>
|
| 57 |
-
<label class="
|
| 58 |
-
<select class="
|
| 59 |
<option value="">Select account</option>
|
| 60 |
<option value="personal">Personal</option>
|
| 61 |
<option value="business">Business</option>
|
|
@@ -63,39 +65,39 @@
|
|
| 63 |
</div>
|
| 64 |
</div>
|
| 65 |
|
| 66 |
-
<div class="flex items-center
|
| 67 |
<div>
|
| 68 |
-
<span class="
|
| 69 |
-
<span class="text-
|
| 70 |
</div>
|
| 71 |
-
<div class="text-
|
| 72 |
-
<i
|
| 73 |
-
<i
|
| 74 |
-
<i
|
| 75 |
-
<i
|
| 76 |
-
<i
|
| 77 |
</div>
|
| 78 |
</div>
|
| 79 |
|
| 80 |
-
<div class="
|
| 81 |
-
<button class="buy-btn
|
| 82 |
-
<i data-feather="shopping-cart" class="
|
| 83 |
Buy
|
| 84 |
</button>
|
| 85 |
-
<button class="sell-btn
|
| 86 |
-
<i data-feather="dollar-sign" class="
|
| 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>
|
|
|
|
| 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 |
</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>
|
script.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
|
|
| 1 |
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
const buyButtons = document.querySelectorAll('.buy-btn');
|
| 3 |
const sellButtons = document.querySelectorAll('.sell-btn');
|
| 4 |
|
|
@@ -15,7 +22,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 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,22 +35,22 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 29 |
|
| 30 |
// Show appropriate icon
|
| 31 |
if (type === 'success') {
|
| 32 |
-
successIcon.classList.remove('
|
| 33 |
-
errorIcon.classList.add('
|
| 34 |
} else {
|
| 35 |
-
successIcon.classList.add('
|
| 36 |
-
errorIcon.classList.remove('
|
| 37 |
}
|
| 38 |
|
| 39 |
// Show notification
|
| 40 |
-
notification.classList.remove('
|
| 41 |
// Add close button event
|
| 42 |
const closeBtn = card.querySelector('.close-notification');
|
| 43 |
closeBtn.addEventListener('click', () => {
|
| 44 |
-
notification.classList.add('
|
| 45 |
setTimeout(() => {
|
| 46 |
-
notification.classList.add('
|
| 47 |
-
notification.classList.remove('
|
| 48 |
}, 300);
|
| 49 |
});
|
| 50 |
}
|
|
|
|
| 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 |
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 |
|
| 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 |
}
|
style.css
CHANGED
|
@@ -1,14 +1,22 @@
|
|
| 1 |
|
| 2 |
.paper-card {
|
| 3 |
position: relative;
|
| 4 |
-
transition:
|
| 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;
|
|
|
|
| 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;
|