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-05-06 20:18:53 +02:00
|
|
|
<input id="q" name="q" placeholder="@i18n!(ctx.1, "Your query")" type="search" style="-webkit-appearance: none;">
|
2018-12-06 18:54:16 +01:00
|
|
|
<details>
|
2019-01-28 13:12:56 +01:00
|
|
|
<summary>@i18n!(ctx.1, "Advanced search")</summary>
|
|
|
|
@input!(ctx.1, title (text), "Article title matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Title")))
|
2019-02-02 15:23:50 +01:00
|
|
|
@input!(ctx.1, subtitle (text), "Subtitle matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Subtitle - byline")))
|
2019-01-28 13:12:56 +01:00
|
|
|
@input!(ctx.1, content (text), "Content matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Body content")))
|
|
|
|
@input!(ctx.1, after (date), "From this date", &format!("max={}", now))
|
|
|
|
@input!(ctx.1, before (date), "To this date", &format!("max={}", now))
|
2018-12-06 18:54:16 +01:00
|
|
|
|
2019-01-28 13:12:56 +01:00
|
|
|
@input!(ctx.1, tag (text), "Containing these tags", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Tags")))
|
|
|
|
@input!(ctx.1, instance (text), "Posted on one of these instances", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Instance domain")))
|
2019-05-06 20:18:53 +02:00
|
|
|
@input!(ctx.1, author (text), "Posted by one of these authors", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Author(s)")))
|
2019-01-28 13:12:56 +01:00
|
|
|
@input!(ctx.1, blog (text), "Posted on one of these blogs", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Blog title")))
|
|
|
|
@input!(ctx.1, lang (text), "Written in this language", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Language")))
|
|
|
|
@input!(ctx.1, license (text), "Published under this license", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Article license")))
|
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>
|
|
|
|
})
|