Only show redirects on error page if query is available

The redirects portion of the error page is only needed in scenarios
where the instance is rate limited, in which case the user's query is
provided to the error template. If this isn't provided, it should just
display the error and allow the user to redirect to the home page.

Fixes #1122
main
Ben Busby 2024-03-06 10:14:52 -07:00
parent af60509a8d
commit ef54f00212
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 83 additions and 82 deletions

View File

@ -19,87 +19,88 @@
{{ error_message }} {{ error_message }}
</p> </p>
<hr> <hr>
<p> {% if query and translation %}
<h4><a class="link" href="https://farside.link">{{ translation['continue-search'] }}</a></h4> <p>
<ul> <h4><a class="link" href="https://farside.link">{{ translation['continue-search'] }}</a></h4>
<li> <ul>
<a href="https://github.com/benbusby/whoogle-search">Whoogle</a> <li>
<ul> <a href="https://github.com/benbusby/whoogle-search">Whoogle</a>
<li> <ul>
<a class="link-color" href="{{farside}}/whoogle/search?q={{query}}{{params}}"> <li>
{{farside}}/whoogle/search?q={{query}} <a class="link-color" href="{{farside}}/whoogle/search?q={{query}}{{params}}">
</a> {{farside}}/whoogle/search?q={{query}}
</li> </a>
</ul> </li>
</li> </ul>
<li> </li>
<a href="https://github.com/searxng/searxng">SearXNG</a> <li>
<ul> <a href="https://github.com/searxng/searxng">SearXNG</a>
<li> <ul>
<a class="link-color" href="{{farside}}/searxng/search?q={{query}}"> <li>
{{farside}}/searxng/search?q={{query}} <a class="link-color" href="{{farside}}/searxng/search?q={{query}}">
</a> {{farside}}/searxng/search?q={{query}}
</li> </a>
</ul> </li>
</li> </ul>
</ul> </li>
<hr> </ul>
<h4>Other options:</h4> <hr>
<ul> <h4>Other options:</h4>
<li> <ul>
<a href="https://kagi.com">Kagi</a> <li>
<ul> <a href="https://kagi.com">Kagi</a>
<li>Recommended by Whoogle maintainer</li> <ul>
<li>Requires account</li> <li>Requires account</li>
<li> <li>
<a class="link-color" href="https://kagi.com/search?q={{query}}"> <a class="link-color" href="https://kagi.com/search?q={{query}}">
kagi.com/search?q={{query}} kagi.com/search?q={{query}}
</a> </a>
</li> </li>
</ul> </ul>
</li> </li>
<li> <li>
<a href="https://duckduckgo.com">DuckDuckGo</a> <a href="https://duckduckgo.com">DuckDuckGo</a>
<ul> <ul>
<li> <li>
<a class="link-color" href="https://duckduckgo.com/search?q={{query}}"> <a class="link-color" href="https://duckduckgo.com/search?q={{query}}">
duckduckgo.com/search?q={{query}} duckduckgo.com/search?q={{query}}
</a> </a>
</li> </li>
</ul> </ul>
</li> </li>
<li> <li>
<a href="https://search.brave.com">Brave Search</a> <a href="https://search.brave.com">Brave Search</a>
<ul> <ul>
<li> <li>
<a class="link-color" href="https://search.brave.com/search?q={{query}}"> <a class="link-color" href="https://search.brave.com/search?q={{query}}">
search.brave.com/search?q={{query}} search.brave.com/search?q={{query}}
</a> </a>
</li> </li>
</ul> </ul>
</li> </li>
<li> <li>
<a href="https://ecosia.com">Ecosia</a> <a href="https://ecosia.com">Ecosia</a>
<ul> <ul>
<li> <li>
<a class="link-color" href="https://ecosia.com/search?q={{query}}"> <a class="link-color" href="https://ecosia.com/search?q={{query}}">
ecosia.com/search?q={{query}} ecosia.com/search?q={{query}}
</a> </a>
</li> </li>
</ul> </ul>
</li> </li>
<li> <li>
<a href="https://google.com">Google</a> <a href="https://google.com">Google</a>
<ul> <ul>
<li> <li>
<a class="link-color" href="https://google.com/search?q={{query}}"> <a class="link-color" href="https://google.com/search?q={{query}}">
google.com/search?q={{query}} google.com/search?q={{query}}
</a> </a>
</li> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
<hr> <hr>
</p> </p>
{% endif %}
<a class="link" href="home">Return Home</a> <a class="link" href="home">Return Home</a>
</div> </div>