RP_Search/app/templates/header.html
Virág Gábor 80b26a39c6 upload
2024-11-06 11:01:28 +01:00

89 lines
3.9 KiB
HTML
Executable file

<div class="header-div">
<div id="search_header">
<a id="search_logo" href="{{ home_url }}" tabindex="0">
{{ logo|safe }}
</a>
</div>
<form class="search-form header" id="search-form" method="{{ 'get' if config.get_only else 'post' }}" role="search" action="search">
<div class="header-search">
<div class="autocomplete">
{% if config.preferences %}
<input type="hidden" name="preferences" value="{{ config.preferences }}" />
{% endif %}
<input
id="search-bar"
class="mobile-search-bar"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
spellcheck="false"
name="q"
type="text"
value="{{ clean_query(query) }}"
dir="auto"
/>
<input id="search-reset" type="reset" value="x">
<input name="tbm" value="{{ search_type }}" style="display: none">
<input name="country" value="{{ config.country }}" style="display: none;">
<input type="submit" id="search-submit" style="display: none;">
</div>
</div>
</form>
<div class="header-tab-div">
<div class="mobile-header header-tab">
{% for tab_id, tab_content in tabs.items() %}
{% if tab_content['selected'] %}
<a><button class="header-button selected-header-button">{{ tab_content['name'] }}</button></a>
{% else %}
<a href="{{ tab_content['href'] }}"><button class="header-button">{{ tab_content['name'] }}</button></a>
{% endif %}
{% endfor %}
<label for="adv-search-toggle" id="adv-search-label" class="adv-search"></label>
<input id="adv-search-toggle" type="checkbox">
<div class="header-tab-div-end"></div>
</div>
</div>
</div>
<div class="result-collapsible" id="adv-search-div">
<div class="result-config">
<label for="config-country">{{ translation['config-country'] }}: </label>
<select name="country" id="result-country">
{% for country in countries %}
<option value="{{ country.value }}"
{% if (
config.country != '' and config.country in country.value
) or (
config.country == '' and country.value == '')
%}
selected
{% endif %}>
{{ country.name }}
</option>
{% endfor %}
</select>
<br /><br />
<label for="config-time-period">{{ translation['config-time-period'] }}: </label>
<select name="tbs" id="result-time-period">
{% for time_period in time_periods %}
<option value="{{ time_period.value }}"
{% if (
config.tbs != '' and config.tbs in time_period.value
) or (
config.tbs == '' and time_period.value == '')
%}
selected
{% endif %}>
{{ translation[time_period.value] }}
</option>
{% endfor %}
</select>
</div>
</div>
<script type="text/javascript" src="{{ cb_url('header.js') }}"></script>