search.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="referrer" content="never">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>首页 - MikuInvidious</title>
  8. <!-- MDUI CSS -->
  9. <link
  10. rel="stylesheet"
  11. href="https://cdn.jsdelivr.net/npm/mdui@1.0.1/dist/css/mdui.min.css"
  12. integrity="sha384-cLRrMq39HOZdvE0j6yBojO4+1PrHfB7a9l5qLcmRm/fiWXYY+CndJPmyu5FV/9Tw"
  13. crossorigin="anonymous"
  14. />
  15. <!-- MDUI JavaScript -->
  16. <script
  17. src="https://cdn.jsdelivr.net/npm/mdui@1.0.1/dist/js/mdui.min.js"
  18. integrity="sha384-gCMZcshYKOGRX9r6wbDrvF+TcCCswSHFucUzUPwka+Gr+uHgjlYvkABr95TCOz3A"
  19. crossorigin="anonymous"
  20. ></script>
  21. <link rel="stylesheet" href="/static/css/search.css" />
  22. </head>
  23. <body class="mdui-theme-primary-pink mdui-theme-layout-dark">
  24. {% include 'toolbar.html' %}
  25. <div class="mdui-container mdui-typo">
  26. <h2>有关「{{ kw }}」的搜索结果。第 {{ result['page'] }} 页,共 {{ result['numPages'] }} 页。</h2>
  27. <div>
  28. {% if result['page']-1 != 0 %}
  29. <a href="/search/{{ kw }}:{{ result['page'] -1 }}">
  30. <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme mdui-valign">
  31. 上一页
  32. </button>
  33. </a>
  34. {% endif %}
  35. {% if result['page']+1 <= result['numPages'] %}
  36. <a href="/search/{{ kw }}:{{ result['page'] +1 }}">
  37. <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme mdui-valign">
  38. 下一页
  39. </button>
  40. </a>
  41. {% endif %}
  42. </div>
  43. <div class="mdui-row-xl-8 mdui-row-lg-6 mdui-row-md-4 mdui-col-sm-2" style="padding-top: 2em; width: 100%;">
  44. {% for vid in result['result'] %}
  45. <div class="mdui-col vidcol">
  46. <div class="mdui-card preview-card">
  47. <div class="mdui-card-media">
  48. <img class="preview-pic" src="{{ vid['pic']|picproxy }}"/>
  49. <div class="mdui-card-media-covered mdui-card-media-covered-transparent">
  50. <div class="mdui-card-primary">
  51. <div class="mdui-card-primary-subtitle">UP:{{ vid['author'] }}</div>
  52. <div class="mdui-card-primary-subtitle">播放:{{ vid['play'] }}</div>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="mdui-card-actions">
  57. <a href="/video/{{ vid['bvid'] }}">{{ vid['title']|safe }}</a>
  58. </div>
  59. </div>
  60. </div>
  61. {% endfor %}
  62. </div>
  63. <div class="mdui-float-right" style="padding-bottom: 2em;">
  64. {% if result['page']-1 != 0 %}
  65. <a href="/search/{{ kw }}:{{ result['page'] -1 }}">
  66. <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme mdui-valign">
  67. 上一页
  68. </button>
  69. </a>
  70. {% endif %}
  71. {% if result['page']+1 <= result['numPages'] %}
  72. <a href="/search/{{ kw }}:{{ result['page'] +1 }}">
  73. <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme mdui-valign">
  74. 下一页
  75. </button>
  76. </a>
  77. {% endif %}
  78. </div>
  79. </div>
  80. {% include 'footer.html' %}
  81. </body>
  82. </html>