aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/search.tmpl30
-rw-r--r--templates/user.tmpl3
-rw-r--r--templates/usersearch.tmpl25
3 files changed, 42 insertions, 16 deletions
diff --git a/templates/search.tmpl b/templates/search.tmpl
index acbfbdd..96548b5 100644
--- a/templates/search.tmpl
+++ b/templates/search.tmpl
@@ -3,22 +3,20 @@
{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}}
<div class="page-title"> Search </div>
-<div>
- <form action="/search" method="GET">
- <span class="post-form-field>
- <label for="query"> Query </label>
- <input id="query" name="q" value="{{.Q}}">
- </span>
- <span class="post-form-field>
- <label for="type"> Type </label>
- <select id="type" name="type">
- <option value="statuses" {{if eq .Type "statuses"}}selected{{end}}>Statuses</option>
- <option value="accounts" {{if eq .Type "accounts"}}selected{{end}}>Accounts</option>
- </select>
- </span>
- <button type="submit"> Search </button>
- </form>
-</div>
+<form class="search-form" action="/search" method="GET">
+ <span class="post-form-field>
+ <label for="query"> Query </label>
+ <input id="query" name="q" value="{{.Q}}">
+ </span>
+ <span class="post-form-field>
+ <label for="type"> Type </label>
+ <select id="type" name="type">
+ <option value="statuses" {{if eq .Type "statuses"}}selected{{end}}>Statuses</option>
+ <option value="accounts" {{if eq .Type "accounts"}}selected{{end}}>Accounts</option>
+ </select>
+ </span>
+ <button type="submit"> Search </button>
+</form>
{{if eq .Type "statuses"}}
{{range .Statuses}}
diff --git a/templates/user.tmpl b/templates/user.tmpl
index ca8a1ad..e3cb7e8 100644
--- a/templates/user.tmpl
+++ b/templates/user.tmpl
@@ -44,6 +44,9 @@
<a href="/following/{{.User.ID}}"> {{.User.FollowingCount}} following </a> -
<a href="/followers/{{.User.ID}}"> {{.User.FollowersCount}} followers </a>
</div>
+ <div>
+ <a href="/usersearch/{{.User.ID}}"> search statuses </a>
+ </div>
</div>
<div class="user-profile-decription">
{{.User.Note}}
diff --git a/templates/usersearch.tmpl b/templates/usersearch.tmpl
new file mode 100644
index 0000000..8e19fd1
--- /dev/null
+++ b/templates/usersearch.tmpl
@@ -0,0 +1,25 @@
+{{with .Data}}
+{{template "header.tmpl" (WithContext .HeaderData $.Ctx)}}
+{{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}}
+<div class="page-title"> Search {{EmojiFilter .User.DisplayName .User.Emojis}}'s statuses </div>
+
+<form class="search-form" action="/usersearch/{{.User.ID}}" method="GET">
+ <span class="post-form-field>
+ <label for="query"> Query </label>
+ <input id="query" name="q" value="{{.Q}}">
+ </span>
+ <button type="submit"> Search </button>
+</form>
+
+{{range .Statuses}}
+{{template "status.tmpl" (WithContext . $.Ctx)}}
+{{end}}
+
+<div class="pagination">
+ {{if .NextLink}}
+ <a href="{{.NextLink}}">next</a>
+ {{end}}
+</div>
+
+{{template "footer.tmpl"}}
+{{end}}