2018-12-06 18:54:16 +01:00
|
|
|
@use templates::base;
|
|
|
|
@use template_utils::*;
|
|
|
|
|
|
|
|
@(ctx: BaseContext, now: &str)
|
|
|
|
|
2019-02-02 15:23:50 +01:00
|
|
|
@:base(ctx, i18n!(ctx.1, "Search"), {}, {}, {
|
2018-12-06 18:54:16 +01:00
|
|
|
<h1>@i18n!(ctx.1, "Search")</h1>
|
|
|
|
<form method="get" id="form">
|
2019-08-27 16:50:24 +02:00
|
|
|
@(Input::new("q", "Your query")
|
|
|
|
.input_type("search")
|
|
|
|
.set_prop("style", "-webkit-appearance: none;")
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
2018-12-06 18:54:16 +01:00
|
|
|
<details>
|
2019-01-28 13:12:56 +01:00
|
|
|
<summary>@i18n!(ctx.1, "Advanced search")</summary>
|
2018-12-06 18:54:16 +01:00
|
|
|
|
2019-08-27 16:50:24 +02:00
|
|
|
@(Input::new("title", i18n!(ctx.1, "Article title matching these words"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Title"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("subtitle", i18n!(ctx.1, "Subtitle matching these words"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Subtitle"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("content", i18n!(ctx.1, "Content macthing these words"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Body content"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("after", i18n!(ctx.1, "From this date"))
|
|
|
|
.input_type("date")
|
|
|
|
.set_prop("max", now)
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
2019-10-24 16:44:14 +02:00
|
|
|
@(Input::new("before", i18n!(ctx.1, "To this date"))
|
2019-08-27 16:50:24 +02:00
|
|
|
.input_type("date")
|
|
|
|
.set_prop("max", now)
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("tag", i18n!(ctx.1, "Containing these tags"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Tags"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("instance", i18n!(ctx.1, "Posted on one of these instances"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Instance domain"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("author", i18n!(ctx.1, "Posted by one of these authors"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Author(s)"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("blog", i18n!(ctx.1, "Posted on one of these blogs"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Blog title"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("lang", i18n!(ctx.1, "Written in this language"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Language"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("license", i18n!(ctx.1, "Published under this license"))
|
|
|
|
.set_prop("placeholder", i18n!(ctx.1, "Article license"))
|
2019-11-10 15:37:51 +01:00
|
|
|
.optional()
|
2019-08-27 16:50:24 +02:00
|
|
|
.html(ctx.1))
|
2018-12-06 18:54:16 +01:00
|
|
|
</details>
|
2019-01-28 13:12:56 +01:00
|
|
|
<input type="submit" value="@i18n!(ctx.1, "Search")"/>
|
2018-12-06 18:54:16 +01:00
|
|
|
</form>
|
|
|
|
})
|