result.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>银行卡OCR结果展示</title>
  6. <style>
  7. html, body {
  8. width: 100%;
  9. padding: 0;
  10. margin: 0;
  11. }
  12. .img-line {
  13. width: 100%;
  14. box-sizing: border-box;
  15. display: flex;
  16. justify-content: space-around;
  17. margin-top: 50px;
  18. }
  19. img {
  20. width: 500px;
  21. height: auto;
  22. box-sizing: border-box;
  23. padding: 5px;
  24. border: 1px solid #000;
  25. }
  26. img.icon {
  27. width: 100px !important;
  28. height: 100px !important;
  29. border: none;
  30. background-color: black;
  31. }
  32. .data-table {
  33. width: 100%;
  34. justify-content: center;
  35. box-sizing: border-box;
  36. margin: 50px 0;
  37. padding: 0 20px;
  38. }
  39. table {
  40. width: 100%;
  41. border: none;
  42. background-color: aqua;
  43. }
  44. .col-key {
  45. width: 20%;
  46. }
  47. .col-value {
  48. width: 80%;
  49. }
  50. td, th {
  51. background-color: white;
  52. }
  53. .center {
  54. text-align: center;
  55. }
  56. </style>
  57. </head>
  58. <body>
  59. <div class="img-line">
  60. <a target="_blank" href="/{{ raw }}">
  61. <img src="/{{ raw }}" alt="raw">
  62. </a>
  63. <a target="_blank" href="/static/bank/{{ data["icon"] }}.png">
  64. <img class="icon" src="/static/bank/{{ data["icon"] }}.png" alt="icon">
  65. </a>
  66. </div>
  67. <div class="data-table">
  68. <table>
  69. <thead>
  70. <tr>
  71. <th class="col-key">JSON键</th>
  72. <th class="col-value">数据值</th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. {% for key, value in data.items() %}
  77. <tr>
  78. <td class="center">{{ key }}</td>
  79. <td>{{ value|safe }}</td>
  80. </tr>
  81. {% endfor %}
  82. </tbody>
  83. </table>
  84. </div>
  85. </body>
  86. </html>