search.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {% extends 'themes/wayback/base.html' %}
  2. {% block head %}
  3. <title>搜索 - MikuInvidious</title>
  4. <meta name="referrer" content="never">
  5. <link rel="stylesheet" href="/static/themes/wayback/css/search.css">
  6. {% endblock %}
  7. {% block content %}
  8. <div class="h-box">
  9. 搜索类别:
  10. <a href="/search?q={{q}}&t=video">[视频]</a>
  11. <a href="/search?q={{q}}&t=article">[专栏]</a>
  12. <a href="/search?q={{q}}&t=user">[UP主]</a>
  13. </div>
  14. <div class="h-box">
  15. 排序方式:
  16. <a href="/search?q={{q}}&sort=rank">[综合排序]</a>
  17. <a href="/search?q={{q}}&sort=click">[最多点击]</a>
  18. <a href="/search?q={{q}}&sort=pubdate">[最新发布]</a>
  19. <a href="/search?q={{q}}&sort=dm">[最多弹幕]</a>
  20. <a href="/search?q={{q}}&sort=stow">[最多收藏]</a>
  21. <a href="/search?q={{q}}&sort=scores">[最多评论]</a>
  22. </div>
  23. <div class="pure-g h-box v-box">
  24. <div class="pure-u-1 pure-u-lg-1-5">
  25. {% if sinfo['page'] > 1 %}
  26. <a href="/search?q={{q}}&i={{sinfo['page']-1}}&sort={{sort}}">上一页</a>
  27. {% endif %}
  28. </div>
  29. <div class="pure-u-1 pure-u-lg-3-5"></div>
  30. <div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
  31. {% if sinfo['numPages'] > sinfo['page'] %}
  32. <a href="/search?q={{q}}&i={{sinfo['page']+1}}&sort={{sort}}">下一页</a>
  33. {% endif %}
  34. </div>
  35. </div>
  36. {% if sinfo['numResults'] == 0 %}
  37. <div class="h-box no-results-error">
  38. <div>
  39. 没有搜索到相关视频
  40. </div>
  41. </div>
  42. {% else %}
  43. <div class="pure-g">
  44. {% for v in rs %}
  45. <div class="pure-u-1 pure-u-md-1-4">
  46. <div class="h-box">
  47. <a style="width:100%" href="/video/{{ v['bvid'] }}">
  48. <div class="thumbnail">
  49. <img width="320" height="180" loading="lazy" tabindex="-1" class="thumbnail" src="{{ "{}@320w".format(v['pic'])|pic }}" alt="">
  50. <p class="length">{{ v['duration'] }}</p>
  51. </div>
  52. <p dir="auto">
  53. {{ v['title']|safe }}
  54. </p>
  55. </a>
  56. <div class="video-card-row flexible">
  57. <div class="flex-left"><a href="/space/{{ v['mid'] }}">
  58. <p class="channel-name" dir="auto">{{ v['author'] }}</p>
  59. </a></div>
  60. <div class="flex-right">
  61. <div class="icon-buttons">
  62. <a title="在哔哩哔哩上观看" href="https://www.bilibili.com/video/{{ v['bvid'] }}">
  63. <i class="icon ion-logo-youtube"></i>
  64. </a>
  65. <a title="音频模式" href="/video/{{ v['bvid'] }}?listen=1">
  66. <i class="icon ion-md-headset"></i>
  67. </a>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="video-card-row flexible">
  72. <div class="flex-left">
  73. <p class="video-data" dir="auto">{{ v['pubdate']|date }}</p>
  74. </div>
  75. <div class="flex-right">
  76. <p class="video-data" dir="auto">{{ v['play']|intsep }} 次播放</p>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. {% endfor %}
  82. </div>
  83. {% endif %}
  84. {% endblock %}