51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
{% extends "base" %}
|
|
{% import "macros" as macros %}
|
|
|
|
{% block title %}
|
|
Search
|
|
{% endblock title %}
|
|
|
|
{% block head %}
|
|
<script>
|
|
window.onload = function(evt) {
|
|
var form = document.getElementById('form');
|
|
form.addEventListener('submit', function () {
|
|
for (var input of form.getElementsByTagName('input')) {
|
|
if (input.name === '') {
|
|
input.name = input.id
|
|
}
|
|
if (input.name && !input.value) {
|
|
input.name = '';
|
|
}
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
{% endblock head %}
|
|
|
|
{% block content %}
|
|
<h1>search</h1>
|
|
|
|
<form method="get" id="form">
|
|
<input id="q" name="q" placeholder="Your query" type="search">
|
|
<details>
|
|
<summary>Advanced search</summary>
|
|
{{ macros::input(name="title", label="Title matching these words", props='placeholder="Title"') }}
|
|
{{ macros::input(name="subtitle", label="Subtitle matching these words", props='placeholder="Subtitle"') }}
|
|
{{ macros::input(name="content", label="Content matching these words", props='placeholder="Content"') }}
|
|
{{ macros::input(name="after", label="From this date", type="date", props='max=' ~ now) }}
|
|
{{ macros::input(name="before", label="To this date", type="date", props='max=' ~ now) }}
|
|
|
|
{{ macros::input(name="instance", label="Sent from one of these instance", props='placeholder="Instance domain"') }}
|
|
{{ macros::input(name="author", label="Sent by one of these author", props='placeholder="Authors"') }}
|
|
{{ macros::input(name="tag", label="Containing these tags", props='placeholder="Tags"') }}
|
|
{{ macros::input(name="blog", label="In blog", props='placeholder="Blog title"') }}
|
|
{{ macros::input(name="lang", label="Language used", props='placeholder="Language"') }}
|
|
{{ macros::input(name="license", label="Using license", props='placeholder="License"') }}
|
|
|
|
|
|
</details>
|
|
<input type="submit" value="Search"/>
|
|
</form>
|
|
{% endblock content %}
|