search_article.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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}}&t=article&sort=rank">[综合排序]</a>
  17. <a href="/search?q={{q}}&t=article&sort=click">[最多点击]</a>
  18. <a href="/search?q={{q}}&t=article&sort=pubdate">[最新发布]</a>
  19. <a href="/search?q={{q}}&t=article&sort=attention">[最多喜欢]</a>
  20. <a href="/search?q={{q}}&t=article&sort=scores">[最多评论]</a>
  21. </div>
  22. <div class="pure-g h-box v-box">
  23. <div class="pure-u-1 pure-u-lg-1-5">
  24. {% if sinfo['page'] > 1 %}
  25. <a href="/search?q={{q}}&i={{sinfo['page']-1}}&t=article&sort={{sort}}">上一页</a>
  26. {% endif %}
  27. </div>
  28. <div class="pure-u-1 pure-u-lg-3-5"></div>
  29. <div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
  30. {% if sinfo['numPages'] > sinfo['page'] %}
  31. <a href="/search?q={{q}}&i={{sinfo['page']+1}}&t=article&sort={{sort}}">下一页</a>
  32. {% endif %}
  33. </div>
  34. </div>
  35. {% if sinfo['numResults'] == 0 %}
  36. <div class="h-box no-results-error">
  37. <div>
  38. 没有搜索到相关文章
  39. </div>
  40. </div>
  41. {% else %}
  42. <div class="pure-g">
  43. {% for ar in rs %}
  44. <div class="pure-u-1 pure-u-md-1-4">
  45. <div class="h-box">
  46. <a style="width:100%" href="/read/cv{{ ar['id'] }}">
  47. <div class="thumbnail">
  48. <img width="320" height="180" loading="lazy" tabindex="-1" class="thumbnail" src="{{ "{}@320w".format(ar['image_urls'][0])|pic }}" alt="">
  49. </div>
  50. <p dir="auto">
  51. {{ ar['title']|safe }}
  52. </p>
  53. </a>
  54. <div class="video-card-row flexible">
  55. <div class="flex-left"><a href="/space/{{ ar['mid'] }}">
  56. <p class="channel-name" dir="auto">{{ ar['author'] }}</p>
  57. </div>
  58. </div>
  59. <div class="video-card-row flexible">
  60. <div class="flex-left">
  61. <p class="video-data" dir="auto">{{ ar['pub_time']|date }}</p>
  62. </div>
  63. <div class="flex-right">
  64. <p class="video-data" dir="auto">{{ ar['view']|intsep }} 次阅读</p>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. {% endfor %}
  70. </div>
  71. {% endif %}
  72. {% endblock %}