mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
add search results RSS feed support
This commit is contained in:
parent
b9111213b2
commit
3a14f29b38
16 changed files with 84 additions and 13 deletions
|
|
@ -2,14 +2,25 @@
|
|||
{% block title %}{% if query %}{{ query }} - {{ 'Search' | trans }} - {% endif %}{{ name }}{% endblock %}
|
||||
{% block main_content %}
|
||||
<div class="text-right">
|
||||
<h2>{{ 'Recent uploads' | trans }}</h2>
|
||||
<sub>
|
||||
<a class="text-color-night margin-x-4-px" href="{{ path('rss_torrents_recent') }}" title="RSS">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</sub>
|
||||
{% if query %}
|
||||
<h2>{{ 'Search results' | trans }}</h2>
|
||||
<sub>
|
||||
<a class="text-color-night margin-x-4-px" href="{{ path('rss_torrents_recent', { query : query | url_encode(true) }) }}" title="RSS">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</sub>
|
||||
{% else %}
|
||||
<h2>{{ 'Recent uploads' | trans }}</h2>
|
||||
<sub>
|
||||
<a class="text-color-night margin-x-4-px" href="{{ path('rss_torrents_recent') }}" title="RSS">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</sub>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if torrents %}
|
||||
{% for torrent in torrents %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue