Spaces:
Running
Running
Download trading.html from halil339/redefined-trading: direct link, hf CLI and curl.
- Browser
- Download file 16.6 kB
-
https://huggingface.co/spaces/halil339/redefined-trading/resolve/main/trading.html
- Command line
-
hf download hf://spaces/halil339/redefined-trading/trading.html
-
curl -L -o trading.html https://huggingface.co/spaces/halil339/redefined-trading/resolve/main/trading.html
16.6 kB
| <html lang="ar" dir="rtl"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>منصة التداول - Redefined Trading</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap" rel="stylesheet"> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#EF4444', // red-500 | |
| }, | |
| fontFamily: { | |
| 'tajawal': ['Tajawal', 'sans-serif'] | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <style> | |
| body { | |
| font-family: 'Tajawal', sans-serif; | |
| } | |
| .trading-interface { | |
| height: calc(100vh - 80px); | |
| } | |
| .chart-container { | |
| height: 70%; | |
| } | |
| .order-book { | |
| height: 30%; | |
| } | |
| .price-up { | |
| color: #10B981; | |
| } | |
| .price-down { | |
| color: #EF4444; | |
| } | |
| .active-market { | |
| background-color: #FEE2E2; | |
| border-right: 4px solid #EF4444; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 text-gray-900"> | |
| <!-- Header --> | |
| <header class="bg-white shadow-sm sticky top-0 z-50"> | |
| <div class="container mx-auto px-4"> | |
| <div class="flex justify-between items-center py-4"> | |
| <div class="flex items-center space-x-2"> | |
| <div class="w-10 h-10 rounded-full bg-red-500 flex items-center justify-center"> | |
| <span class="text-white font-bold">RT</span> | |
| </div> | |
| <span class="text-xl font-bold text-gray-900">Redefined Trading</span> | |
| </div> | |
| <nav class="hidden md:flex space-x-8"> | |
| <a href="index.html" class="text-gray-700 hover:text-red-500 font-medium">الرئيسية</a> | |
| <a href="#" class="text-red-500 font-medium">منصة التداول</a> | |
| <a href="#" class="text-gray-700 hover:text-red-500 font-medium">الأسواق</a> | |
| <a href="#" class="text-gray-700 hover:text-red-500 font-medium">المنتجات</a> | |
| <a href="#" class="text-gray-700 hover:text-red-500 font-medium">التحليلات</a> | |
| <a href="#" class="text-gray-700 hover:text-red-500 font-medium">الدعم</a> | |
| </nav> | |
| <div class="flex items-center space-x-4"> | |
| <button class="hidden md:block text-gray-700 hover:text-red-500 font-medium">حسابي</button> | |
| <button class="bg-red-500 hover:bg-red-600 text-white px-6 py-2 rounded-lg font-medium transition duration-300">إيداع الأموال</button> | |
| <button class="md:hidden text-gray-700"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /> | |
| </svg> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Trading Interface --> | |
| <div class="trading-interface container mx-auto px-4 py-6"> | |
| <div class="flex flex-col lg:flex-row gap-6 h-full"> | |
| <!-- Market List Sidebar --> | |
| <div class="w-full lg:w-1/4 bg-white rounded-xl shadow-md p-4"> | |
| <h2 class="text-xl font-bold mb-4">الأزواج المتاحة</h2> | |
| <div class="space-y-2 max-h-[calc(100vh-200px)] overflow-y-auto"> | |
| <div class="flex justify-between items-center p-3 rounded-lg active-market cursor-pointer"> | |
| <div> | |
| <p class="font-bold">EUR/USD</p> | |
| <p class="text-sm text-gray-500">Евро/دولار أمريكي</p> | |
| </div> | |
| <div class="text-right"> | |
| <p class="font-bold">1.1234</p> | |
| <p class="text-sm price-up">+0.25%</p> | |
| </div> | |
| </div> | |
| <div class="flex justify-between items-center p-3 rounded-lg hover:bg-gray-50 cursor-pointer"> | |
| <div> | |
| <p class="font-bold">GBP/USD</p> | |
| <p class="text-sm text-gray-500">جنيه إسترليني/دولار أمريكي</p> | |
| </div> | |
| <div class="text-right"> | |
| <p class="font-bold">1.3456</p> | |
| <p class="text-sm price-up">+0.12%</p> | |
| </div> | |
| </div> | |
| <div class="flex justify-between items-center p-3 rounded-lg hover:bg-gray-50 cursor-pointer"> | |
| <div> | |
| <p class="font-bold">USD/JPY</p> | |
| <p class="text-sm text-gray-500">دولار أمريكي/ين ياباني</p> | |
| </div> | |
| <div class="text-right"> | |
| <p class="font-bold">145.67</p> | |
| <p class="text-sm price-down">-0.08%</p> | |
| </div> | |
| </div> | |
| <div class="flex justify-between items-center p-3 rounded-lg hover:bg-gray-50 cursor-pointer"> | |
| <div> | |
| <p class="font-bold">BTC/USD</p> | |
| <p class="text-sm text-gray-500">بيتكوين/دولار أمريكي</p> | |
| </div> | |
| <div class="text-right"> | |
| <p class="font-bold">42,350</p> | |
| <p class="text-sm price-down">-1.2%</p> | |
| </div> | |
| </div> | |
| <div class="flex justify-between items-center p-3 rounded-lg hover:bg-gray-50 cursor-pointer"> | |
| <div> | |
| <p class="font-bold">ETH/USD</p> | |
| <p class="text-sm text-gray-500">إيثيريوم/دولار أمريكي</p> | |
| </div> | |
| <div class="text-right"> | |
| <p class="font-bold">2,350</p> | |
| <p class="text-sm price-up">+2.3%</p> | |
| </div> | |
| </div> | |
| <div class="flex justify-between items-center p-3 rounded-lg hover:bg-gray-50 cursor-pointer"> | |
| <div> | |
| <p class="font-bold">XAU/USD</p> | |
| <p class="text-sm text-gray-500">ذهب/دولار أمريكي</p> | |
| </div> | |
| <div class="text-right"> | |
| <p class="font-bold">1,856.20</p> | |
| <p class="text-sm price-up">+0.8%</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Chart Area --> | |
| <div class="w-full lg:w-3/4 flex flex-col"> | |
| <div class="bg-white rounded-xl shadow-md p-4 mb-6"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <div> | |
| <h2 class="text-xl font-bold">EUR/USD</h2> | |
| <p class="text-gray-500">Евро مقابل الدولار الأمريكي</p> | |
| </div> | |
| <div class="flex space-x-2"> | |
| <button class="px-3 py-1 bg-gray-100 rounded-lg text-sm">5د</button> | |
| <button class="px-3 py-1 bg-gray-100 rounded-lg text-sm">15د</button> | |
| <button class="px-3 py-1 bg-red-500 text-white rounded-lg text-sm">1س</button> | |
| <button class="px-3 py-1 bg-gray-100 rounded-lg text-sm">4س</button> | |
| <button class="px-3 py-1 bg-gray-100 rounded-lg text-sm">1ي</button> | |
| </div> | |
| </div> | |
| <div class="chart-container"> | |
| <canvas id="priceChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Order Form and Book --> | |
| <div class="flex flex-col md:flex-row gap-6"> | |
| <!-- Order Form --> | |
| <div class="w-full md:w-1/2 bg-white rounded-xl shadow-md p-4"> | |
| <h3 class="text-lg font-bold mb-4">نموذج الطلب</h3> | |
| <div class="space-y-4"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">الكمية</label> | |
| <input type="number" value="1" class="w-full p-3 border border-gray-300 rounded-lg"> | |
| </div> | |
| <div class="grid grid-cols-2 gap-4"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">سعر الشراء</label> | |
| <input type="text" value="1.1235" class="w-full p-3 border border-gray-300 rounded-lg bg-red-50 text-red-500 font-bold"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">سعر البيع</label> | |
| <input type="text" value="1.1233" class="w-full p-3 border border-gray-300 rounded-lg bg-green-50 text-green-500 font-bold"> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-2 gap-4"> | |
| <button class="bg-red-500 hover:bg-red-600 text-white py-3 rounded-lg font-bold">بيع</button> | |
| <button class="bg-green-500 hover:bg-green-600 text-white py-3 rounded-lg font-bold">شراء</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Order Book --> | |
| <div class="w-full md:w-1/2 bg-white rounded-xl shadow-md p-4 order-book"> | |
| <h3 class="text-lg font-bold mb-4">سجل الطلبات</h3> | |
| <div class="flex"> | |
| <div class="w-1/2 pr-2"> | |
| <h4 class="font-bold text-red-500 mb-2">البيع</h4> | |
| <div class="space-y-1"> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1236</span> | |
| <span class="text-gray-500">25</span> | |
| </div> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1235</span> | |
| <span class="text-gray-500">42</span> | |
| </div> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1234</span> | |
| <span class="text-gray-500">18</span> | |
| </div> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1233</span> | |
| <span class="text-gray-500">35</span> | |
| </div> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1232</span> | |
| <span class="text-gray-500">29</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="w-1/2 pl-2"> | |
| <h4 class="font-bold text-green-500 mb-2">الشراء</h4> | |
| <div class="space-y-1"> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1231</span> | |
| <span class="text-gray-500">22</span> | |
| </div> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1230</span> | |
| <span class="text-gray-500">37</span> | |
| </div> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1229</span> | |
| <span class="text-gray-500">15</span> | |
| </div> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1228</span> | |
| <span class="text-gray-500">28</span> | |
| </div> | |
| <div class="flex justify-between text-sm"> | |
| <span>1.1227</span> | |
| <span class="text-gray-500">41</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize chart | |
| const ctx = document.getElementById('priceChart').getContext('2d'); | |
| // Generate sample data for the chart | |
| const labels = []; | |
| const data = []; | |
| let currentValue = 1.1230; | |
| for (let i = 30; i >= 0; i--) { | |
| const time = new Date(); | |
| time.setMinutes(time.getMinutes() - i); | |
| labels.push(time.getHours() + ':' + (time.getMinutes() < 10 ? '0' : '') + time.getMinutes()); | |
| // Random walk for price simulation | |
| currentValue += (Math.random() - 0.5) * 0.001; | |
| data.push(currentValue); | |
| } | |
| const priceChart = new Chart(ctx, { | |
| type: 'line', | |
| data: { | |
| labels: labels, | |
| datasets: [{ | |
| label: 'EUR/USD', | |
| data: data, | |
| borderColor: '#EF4444', | |
| backgroundColor: 'rgba(239, 68, 68, 0.1)', | |
| borderWidth: 2, | |
| pointRadius: 0, | |
| fill: true, | |
| tension: 0.4 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| display: false | |
| } | |
| }, | |
| scales: { | |
| x: { | |
| grid: { | |
| display: false | |
| } | |
| }, | |
| y: { | |
| position: 'right' | |
| } | |
| } | |
| } | |
| }); | |
| // Simulate real-time price updates | |
| setInterval(() => { | |
| const now = new Date(); | |
| const timeLabel = now.getHours() + ':' + (now.getMinutes() < 10 ? '0' : '') + now.getMinutes(); | |
| // Update last value | |
| const lastValue = data[data.length - 1]; | |
| const newValue = lastValue + (Math.random() - 0.5) * 0.001; | |
| // Add new data point | |
| labels.push(timeLabel); | |
| data.push(newValue); | |
| // Remove first data point | |
| labels.shift(); | |
| data.shift(); | |
| // Update chart | |
| priceChart.update(); | |
| }, 5000); | |
| </script> | |
| </body> | |
| </html> |