index.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>DarkFi Blocks - Block Explorer</title>
  7. <link rel="stylesheet" href="/static/layout.css">
  8. </head>
  9. <body>
  10. <header class="header">
  11. <div class="container flex justify-between items-center">
  12. <div class="logo"><span>Dark</span>Fi {{ network }} Blocks</div>
  13. <nav class="nav">
  14. <a href="/" class="active">Explorer</a>
  15. <a href="#">Stats</a>
  16. <a href="https://dark.fi/book/">Docs</a>
  17. <a href="https://codeberg.org/darkrenaissance/darkfi/">Code</a>
  18. </nav>
  19. </div>
  20. </header>
  21. <main class="container section">
  22. <div class="input-group mb-lg" style="max-width: 600px;">
  23. <input type="search" class="input" placeholder="Search by block height, hash, or transaction...">
  24. <button type="submit" class="btn">Search</button>
  25. </div>
  26. <div class="stats-grid mb-lg">
  27. <div class="stat-card">
  28. <div class="label">Difficulty</div>
  29. <div class="value">{{ current_difficulty }}</div>
  30. </div>
  31. <div class="stat-card">
  32. <div class="label">Height</div>
  33. <div class="value">{{ current_height }}</div>
  34. </div>
  35. <div class="stat-card">
  36. <div class="label">Hashrate</div>
  37. <div class="value">n/a</div>
  38. </div>
  39. <div class="stat-card">
  40. <div class="label">Emission</div>
  41. <div class="value">n/a</div>
  42. </div>
  43. </div>
  44. <!--
  45. <div class="table-section mb-lg">
  46. <div class="table-header">
  47. <h3>Transaction Pool</h3>
  48. <span class="badge">{{ mempool_txs_len }} Transactions</span>
  49. </div>
  50. <div class="table-scroll">
  51. <table>
  52. <thead>
  53. <tr>
  54. <th>Hash</th>
  55. <th>Timestamp</th>
  56. <th>Fee</th>
  57. <th>Size</th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. {% for tx in mempool_txs %}
  62. <tr>
  63. <td><a href="/tx/{{ tx.hash }}">{{ tx.hash }}</a></td>
  64. <td>{{ tx.timestamp }}</td>
  65. <td>{{ tx.fee }}</td>
  66. <td>{{ tx.size }} B</td>
  67. {% endfor %}
  68. </tbody>
  69. </table>
  70. </div>
  71. </div>
  72. -->
  73. <div class="table-section">
  74. <div class="table-header">
  75. <h3>Latest Blocks</h3>
  76. <a href="#">View all →</a>
  77. </div>
  78. <div class="table-wrapper">
  79. <table>
  80. <thead>
  81. <tr>
  82. <th>Height</th>
  83. <th>Size</th>
  84. <th>Txs</th>
  85. <th>Timestamp</th>
  86. <th>PoW</th>
  87. <th>Block Hash</th>
  88. </tr>
  89. </thead>
  90. <tbody>
  91. {% for block in latest_blocks %}
  92. <tr>
  93. <td class="height"><a href="/block/{{ block.height }}">{{ block.height }}</a></td>
  94. <td>{{ block.size }}</td>
  95. <td>{{ block.n_txs }}</td>
  96. <td>{{ block.timestamp }}</td>
  97. <th>{{ block.powtype }}</td>
  98. <td><a href="/block/{{ block.height }}">{{ block.hash }}</a></td>
  99. </tr>
  100. {% endfor %}
  101. </tbody>
  102. </table>
  103. </div>
  104. </div>
  105. </main>
  106. <footer class="footer">
  107. <div class="container">
  108. <a href="https://dark.fi">Let there be Dark</a>
  109. </div>
  110. </footer>
  111. </body>
  112. </html>