2018-12-06 17:54:16 +00:00
|
|
|
@use templates::base;
|
|
|
|
@use template_utils::*;
|
|
|
|
|
|
|
|
@(ctx: BaseContext, now: &str)
|
|
|
|
|
2018-12-07 11:05:01 +00:00
|
|
|
@:base(ctx, "Search", {}, {}, {
|
2018-12-06 17:54:16 +00:00
|
|
|
<h1>@i18n!(ctx.1, "Search")</h1>
|
|
|
|
<form method="get" id="form">
|
2018-12-25 14:56:30 +00:00
|
|
|
<input id="q" name="q" placeholder="Your search query" type="search">
|
2018-12-07 11:05:01 +00:00
|
|
|
<br/>
|
2018-12-06 17:54:16 +00:00
|
|
|
<details>
|
|
|
|
<summary>Advanced search</summary>
|
2018-12-25 14:56:30 +00:00
|
|
|
@input!(ctx.1, title (text), "Article title matching these words", "placeholder=\"Title\"")
|
|
|
|
@input!(ctx.1, subtitle (text), "Subtitle matching these words", "placeholder=\"Subtitle - byline\"")
|
|
|
|
@input!(ctx.1, content (text), "Content matching these words", "placeholder=\"Body content\"")
|
2018-12-07 11:05:01 +00:00
|
|
|
@input!(ctx.1, after (date), "From this date", &format!("max={}", now))
|
2018-12-06 17:54:16 +00:00
|
|
|
@input!(ctx.1, before (date), "To this date", &format!("max={}", now))
|
|
|
|
|
|
|
|
@input!(ctx.1, tag (text), "Containing these tags", "placeholder=\"Tags\"")
|
2018-12-25 14:56:30 +00:00
|
|
|
@input!(ctx.1, instance (text), "Posted on one of these instances", "placeholder=\"Instance domain\"")
|
2018-12-06 17:54:16 +00:00
|
|
|
@input!(ctx.1, author (text), "Posted by one of these authors", "placeholder=\"Authors\"")
|
2018-12-25 14:56:30 +00:00
|
|
|
@input!(ctx.1, blog (text), "Posted on one of these blogs", "placeholder=\"Blog title\"")
|
|
|
|
@input!(ctx.1, lang (text), "Written in this language", "placeholder=\"Language\"")
|
|
|
|
@input!(ctx.1, license (text), "Published under this license", "placeholder=\"Article License\"")
|
2018-12-06 17:54:16 +00:00
|
|
|
</details>
|
|
|
|
<input type="submit" value="Search"/>
|
|
|
|
</form>
|
|
|
|
})
|