index.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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">DarkFi {{ network }} Blocks</div>
  13. <nav class="nav">
  14. <a href="/" class="active">Explorer</a>
  15. <a href="/contracts">Contracts</a>
  16. <a href="/stats">Stats</a>
  17. <a href="https://dark.fi/book/">Docs</a>
  18. <a href="https://codeberg.org/darkrenaissance/darkfi/">Code</a>
  19. </nav>
  20. </div>
  21. </header>
  22. <main class="container section">
  23. <form action="/search" method="GET" class="input-group mb-lg" style="max-width: 600px;">
  24. <input type="search" name="q" class="input" placeholder="Search by block height, hash, or transaction...">
  25. <button type="submit" class="btn">Search</button>
  26. </form>
  27. <div class="stats-grid mb-lg">
  28. <div class="stat-card">
  29. <div class="label">Difficulty</div>
  30. <div class="value">{{ current_difficulty }}</div>
  31. </div>
  32. <div class="stat-card">
  33. <div class="label">Height</div>
  34. <div class="value">{{ current_height }}</div>
  35. </div>
  36. <div class="stat-card">
  37. <div class="label">Hashrate</div>
  38. <div class="value">{{ hashrate|default('n/a') }}</div>
  39. </div>
  40. <div class="stat-card">
  41. <div class="label">Emission</div>
  42. <div class="value">n/a</div>
  43. </div>
  44. </div>
  45. <!--
  46. <div class="table-section mb-lg">
  47. <div class="table-header">
  48. <h3>Transaction Pool</h3>
  49. <span class="badge">{{ mempool_txs_len }} Transactions</span>
  50. </div>
  51. <div class="table-scroll">
  52. <table>
  53. <thead>
  54. <tr>
  55. <th>Hash</th>
  56. <th>Timestamp</th>
  57. <th>Fee</th>
  58. <th>Size</th>
  59. </tr>
  60. </thead>
  61. <tbody>
  62. {% for tx in mempool_txs %}
  63. <tr>
  64. <td><a href="/tx/{{ tx.hash }}">{{ tx.hash }}</a></td>
  65. <td>{{ tx.timestamp }}</td>
  66. <td>{{ tx.fee }}</td>
  67. <td>{{ tx.size }} B</td>
  68. {% endfor %}
  69. </tbody>
  70. </table>
  71. </div>
  72. </div>
  73. -->
  74. <div class="table-section">
  75. <div class="table-header">
  76. <h3>Latest Blocks</h3>
  77. <a href="/blocks">View all →</a>
  78. </div>
  79. <div class="table-wrapper">
  80. <table>
  81. <thead>
  82. <tr>
  83. <th>Height</th>
  84. <th>Size</th>
  85. <th>Txs</th>
  86. <th>Timestamp</th>
  87. <th>PoW</th>
  88. <th>Block Hash</th>
  89. </tr>
  90. </thead>
  91. <tbody>
  92. {% for block in latest_blocks %}
  93. <tr>
  94. <td class="height"><a href="/block/{{ block.height }}">{{ block.height }}</a></td>
  95. <td>{{ block.size }}</td>
  96. <td>{{ block.n_txs }}</td>
  97. <td>{{ block.timestamp }}</td>
  98. <td>{{ block.powtype }}</td>
  99. <td><a href="/block/{{ block.height }}">{{ block.hash }}</a></td>
  100. </tr>
  101. {% endfor %}
  102. </tbody>
  103. </table>
  104. </div>
  105. </div>
  106. </main>
  107. <footer class="footer">
  108. <div class="container">
  109. <a href="https://dark.fi">Let there be Dark</a> · Code licensed under AGPL-3
  110. </div>
  111. </footer>
  112. </body>
  113. </html>