|
@@ -1,34 +1,32 @@
|
1
|
|
-<div class="search">
|
2
|
|
- <form action="/search" method="get" class="form">
|
3
|
|
- <input name="q" type="search" value="<%= params[:q] %>" placeholder="Search for..." class="form__search" required>
|
4
|
|
- <div class="filters">
|
5
|
|
- <div class="filters__section">
|
6
|
|
- <p>Search in:</p>
|
7
|
|
- <label class="form__label">
|
8
|
|
- <input type="radio" name="type" value="threads" <% if [nil, "threads"].include?(params[:type]) %>checked<% end%>>
|
9
|
|
- Threads
|
10
|
|
- </label>
|
11
|
|
- <label class="form__label">
|
12
|
|
- <input type="radio" name="type" value="posts" <% if params[:type] == "posts" %>checked<% end %>>
|
13
|
|
- Posts
|
14
|
|
- </label>
|
15
|
|
- </div>
|
16
|
|
- <div class="filters__section filters__section--sort <%= params[:type] == 'threads' ? 'open' : '' %>">
|
17
|
|
- <p>Sort by:</p>
|
18
|
|
- <label class="form__label">
|
19
|
|
- <input type="radio" name="sort" value="thread" <% if [nil, "thread"].include? params[:sort] %>checked<% end%>>
|
20
|
|
- Thread creation
|
21
|
|
- </label>
|
22
|
|
- <label class="form__label">
|
23
|
|
- <input type="radio" name="sort" value="post" <% if params[:sort] == "post" %>checked<% end %>>
|
24
|
|
- Most recent post
|
25
|
|
- </label>
|
26
|
|
- </div>
|
27
|
|
- <div class="filters__section">
|
28
|
|
- <p>Posted by:</p>
|
29
|
|
- <input type="text" name="username" value="<%= params[:username] %>" class="form__text-field">
|
30
|
|
- </div>
|
|
1
|
+<form action="/search" method="get" class="form search">
|
|
2
|
+ <input name="q" type="search" value="<%= params[:q] %>" placeholder="Search for..." class="form__search" required>
|
|
3
|
+ <div class="filters">
|
|
4
|
+ <div class="filters__section">
|
|
5
|
+ <p>Search in:</p>
|
|
6
|
+ <label class="form__label">
|
|
7
|
+ <input type="radio" name="type" value="threads" <% if [nil, "threads"].include?(params[:type]) %>checked<% end%>>
|
|
8
|
+ Threads
|
|
9
|
+ </label>
|
|
10
|
+ <label class="form__label">
|
|
11
|
+ <input type="radio" name="type" value="posts" <% if params[:type] == "posts" %>checked<% end %>>
|
|
12
|
+ Posts
|
|
13
|
+ </label>
|
31
|
14
|
</div>
|
32
|
|
- <input type="submit" value="Search" class="btn form__submit">
|
33
|
|
- </form>
|
34
|
|
-</div>
|
|
15
|
+ <div class="filters__section filters__section--sort <%= params[:type] == 'threads' ? 'open' : '' %>">
|
|
16
|
+ <p>Sort by:</p>
|
|
17
|
+ <label class="form__label">
|
|
18
|
+ <input type="radio" name="sort" value="thread" <% if [nil, "thread"].include? params[:sort] %>checked<% end%>>
|
|
19
|
+ Thread creation
|
|
20
|
+ </label>
|
|
21
|
+ <label class="form__label">
|
|
22
|
+ <input type="radio" name="sort" value="post" <% if params[:sort] == "post" %>checked<% end %>>
|
|
23
|
+ Most recent post
|
|
24
|
+ </label>
|
|
25
|
+ </div>
|
|
26
|
+ <div class="filters__section">
|
|
27
|
+ <p>Posted by:</p>
|
|
28
|
+ <input type="text" name="username" value="<%= params[:username] %>" class="form__text-field">
|
|
29
|
+ </div>
|
|
30
|
+ </div>
|
|
31
|
+ <input type="submit" value="Search" class="btn form__submit">
|
|
32
|
+</form>
|