smarter search action

master
Aevann 2024-10-19 14:00:46 +03:00
parent 55a5b4ad0f
commit ac2bf008e9
1 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@
{% if not request.path.startswith('/search/') %}
<div class="flex-grow-1 d-fl {% if not v %}pad{% endif %}">
<form class="form-inline search d-mob-none flex-nowrap mx-0 mx-lg-auto mb-0" {% if err or v and v.is_underage %}style="margin-right:40rem!important"{% endif %} action="{% if request.path.startswith('/search') %}{{request.path}}{% else %}/search/posts/{% endif %}" method="get">
<form class="form-inline search d-mob-none flex-nowrap mx-0 mx-lg-auto mb-0" {% if err or v and v.is_underage %}style="margin-right:40rem!important"{% endif %} action="/search/{% if p or request.path.endswith('/comments') %}comments{% else %}posts{% endif %}" method="get">
<input autocomplete="off" class="form-control w-100" type="search" placeholder="{{search_placeholder}}" name="q" value="{{request.values.get('q', '')}}">
<span class="input-group-append">
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem">
@ -420,7 +420,7 @@
<ul style="overflow:auto" class="navbar-nav ml-auto d-flex d-md-none mt-3">
<li class="nav-item pb-3">
<form id="searchform" class="form-inline search flex-nowrap mx-1 mx-lg-auto mb-0" action="/search/posts" method="get">
<form id="searchform" class="form-inline search flex-nowrap mx-1 mx-lg-auto mb-0" action="/search/{% if p or request.path.endswith('/comments') %}comments{% else %}posts{% endif %}" method="get">
<input autocomplete="off" class="form-control form-control-sm w-100" type="search" placeholder="{{search_placeholder}}" name="q">
<span class="input-group-append">
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem">