Skip to content

Commit

Permalink
Update search form and add contributors in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfyre committed Oct 30, 2023
1 parent 8c20efc commit d67f9c9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
30 changes: 22 additions & 8 deletions assets/views/pages/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ <h1 class="title is-size-1">Artwork search</h1>
<div class="columns">
<div class="column is-one-quarter">
<div class="box">
<form action="/search" hx-target="#artwork-search-results">
<form action="/search" hx-get="/search" hx-target="#artwork-search-results">
<div class="field">
<label class="label">Artforms</label>
<div class="control">
<div class="select">
<select name="art_form">
<option value="na">Select artform</option>
{{range $k, $v := .ArtFormOptions}}
<option value="{{$k}}">{{$v}}</option>
<option value="{{$k}}" {{if eq $.ActiveFilterValues.ArtFormString
$k}}selected{{end}}>{{$v}}</option>
{{end}}
</select>
</div>
Expand All @@ -28,9 +28,9 @@ <h1 class="title is-size-1">Artwork search</h1>
<div class="control">
<div class="select">
<select name="art_type">
<option value="na">Select art type</option>
{{range $k, $v := .ArtTypeOptions}}
<option value="{{$k}}">{{$v}}</option>
<option value="{{$k}}" {{if eq $.ActiveFilterValues.ArtTypeString
$k}}selected{{end}}>{{$v}}</option>
{{end}}
</select>
</div>
Expand All @@ -41,9 +41,9 @@ <h1 class="title is-size-1">Artwork search</h1>
<div class="control">
<div class="select">
<select name="art_school">
<option value="na">Select school</option>
{{range $k, $v := .ArtSchoolOptions}}
<option value="{{$k}}">{{$v}}</option>
<option value="{{$k}}" {{if eq $.ActiveFilterValues.SchoolString
$k}}selected{{end}}>{{$v}}</option>
{{end}}
</select>
</div>
Expand All @@ -52,9 +52,23 @@ <h1 class="title is-size-1">Artwork search</h1>
<div class="field">
<label class="label">Title</label>
<p class="control">
<input class="input" type="search" name="q" placeholder="Artwork title">
<input class="input" type="search" name="title" placeholder="Artwork title"
value="{{.ActiveFilterValues.Title}}">
</p>
</div>
<div class="field">
<label class="label">Artist</label>
<p class="control">
<input class="input" list="artist_list" type="search" name="artist"
placeholder="Artist name" value="{{.ActiveFilterValues.ArtistString}}">
<datalist id="artist_list">
{{range .ArtistNameList}}
<option value="{{.}}"></option>
{{end}}
</datalist>
</p>
</div>

<div class="field"><button type="submit" class="button is-primary">Search</button></div>
</form>
</div>
Expand Down
4 changes: 4 additions & 0 deletions assets/views/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
Please send your comments, sign our guestbook and send a postcard.
© Web Gallery of Art, created by Emil Krén and Daniel Marx.
</p>
<p>
v2 was made possible by our <a href="/contributors" hx-get="/contributors"
hx-target="#mc-area">contributors</a>!
</p>
</div>
<div class="column has-text-right">
<p>
Expand Down

0 comments on commit d67f9c9

Please sign in to comment.