blob: 31092de8589abb520f523aef979fae150be4ab74 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Hashtag</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="body-sk">
<header>
<a href='/'>Hashtag</a>
<theme-chooser-sk></theme-chooser-sk>
</header>
<main {% if not .IsSearch %} class=search {% end %}>
{% if not .IsSearch %}
<section>
<h2>Hashtags</h2>
<ul>
{% range .Hashtags %}
<li><a href='?value={%.%}'>{%.%}</a></li>
{% end %}
</ul>
</section>
{% end %}
{% if .IsSearch %}
<details>
<summary>{% .Form.Value %}</summary>
{% else %}
<section>
{% end %}
<h2>Search</h2>
<form class=search action="" method=get accept-charset="utf-8">
<section class=value>
<label>
<input type="radio" name="type" value="hashtag" {% if ne .Form.Type "email" %} checked {% end %}>
Hashtag
</label>
<label>
<input type="radio" name="type" value="email" {% if eq .Form.Type "email" %} checked {% end %}>
Email
</label>
<label class=value>
Value
<input type=text name=value value="{% .Form.Value %}" placeholder="search">
</label>
</section>
<section class=range>
<h3>Range</h3>
<label><input type=radio name=range value="" {% if eq .Form.Range "" %} checked {% end %}>All time</label>
<label><input type=radio name=range value=7 {% if eq .Form.Range "7" %} checked {% end %}>Last week</label>
<label><input type=radio name=range value=30 {% if eq .Form.Range "30" %} checked {% end %}>Last month</label>
<label><input type=radio name=range value=90 {% if eq .Form.Range "90" %} checked {% end %}>Last 3 months</label>
<label><input type=radio name=range value=180 {% if eq .Form.Range "180" %} checked {% end %}>Last 6 months</label>
<label><input type=radio name=range value=custom {% if eq .Form.Range "custom" %} checked {% end %}>Custom:</label>
<label><input type=radio name=range value=Spring2020 {% if eq .Form.Range "Spring2020" %} checked {% end %}>Spring 2020</label>
<section class=custom>
<label>Begin <input type=date name=begin value="{% .Form.Begin %}"></label>
<label>End <input type=date name=end value="{% .Form.End %}"></label>
</section>
</section>
<label><input type="submit" value="Search"></label>
</form>
</section>
{% if .IsSearch %}
</details>
{% else %}
</section>
{% end %}
{% if .IsSearch %}
<label
class="edit-toggle"
title="Enables controls that allow hiding search results.">
Edit
<input type="checkbox" id="edit-toggle">
</label>
{% range .Results %}
<section>
<h2>{% .DisplayName %} [{% len .Artifacts %}]</h2>
<ul>
{% range .Artifacts %}
<li class="{% if .Hidden %}hidden{% end %}">
<!-- Form for toggling the hidden state of an Artifact. -->
<form action="/toggleHidden" method=POST target=__toggle_hidden>
<input type=hidden name=title value="{% .Title %}">
<input type=hidden name=value value="{% .Value %}">
<input type=hidden name=url value="{% .URL %}">
<input type=hidden name=hidden value="{% .Hidden %}">
<button class='hidden'> &cross;</button>
<button class='nothidden'> &check;</button>
</form>
<a href="{% .URL %}">{% .Title %}</a>
</li>
{% else %}
<p>None found.</p>
{% end %}
</ul>
</section>
{% end %}
{% end %}
<error-toast-sk></error-toast-sk>
</main>
</body>
</html>