blocks.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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>All Blocks - DarkFi 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="/">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. <div class="table-section">
  24. <div class="table-header">
  25. <h3>All Blocks</h3>
  26. <span class="badge">{{ total }} Total</span>
  27. </div>
  28. <div class="table-wrapper">
  29. <table>
  30. <thead>
  31. <tr>
  32. <th>Height</th>
  33. <th>Size</th>
  34. <th>Txs</th>
  35. <th>Timestamp</th>
  36. <th>PoW</th>
  37. <th>Block Hash</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. {% for block in blocks %}
  42. <tr>
  43. <td class="height"><a href="/block/{{ block.height|int }}">{{ block.height|int }}</a></td>
  44. <td>{{ block.size|int }}</td>
  45. <td>{{ block.n_txs|int }}</td>
  46. <td>{{ block.timestamp }}</td>
  47. <td>{{ block.powtype }}</td>
  48. <td><a href="/block/{{ block.height|int }}">{{ block.hash }}</a></td>
  49. </tr>
  50. {% endfor %}
  51. </tbody>
  52. </table>
  53. </div>
  54. <div class="pagination">
  55. {% if has_prev %}
  56. <a href="/blocks?page=1" class="btn btn-sm">&laquo; First</a>
  57. <a href="/blocks?page={{ page - 1 }}" class="btn btn-sm">&lsaquo; Prev</a>
  58. {% else %}
  59. <span class="btn btn-sm disabled">&laquo; First</span>
  60. <span class="btn btn-sm disabled">&lsaquo; Prev</span>
  61. {% endif %}
  62. <span class="pagination-info">Page {{ page }} of {{ total_pages }}</span>
  63. {% if has_next %}
  64. <a href="/blocks?page={{ page + 1 }}" class="btn btn-sm">Next &rsaquo;</a>
  65. <a href="/blocks?page={{ total_pages }}" class="btn btn-sm">Last &raquo;</a>
  66. {% else %}
  67. <span class="btn btn-sm disabled">Next &rsaquo;</span>
  68. <span class="btn btn-sm disabled">Last &raquo;</span>
  69. {% endif %}
  70. </div>
  71. </div>
  72. </main>
  73. <footer class="footer">
  74. <div class="container">
  75. <a href="https://dark.fi">Let there be Dark</a>
  76. </div>
  77. </footer>
  78. </body>
  79. </html>