Add catalog action bar with image size selector
This commit is contained in:
+14
-1
@@ -68,7 +68,20 @@ templ Board(board database.Board) {
|
||||
<button _="on click hide me then show #newThreadForm" id="newThreadBtn">[New Thread]</button>
|
||||
@NewThreadForm(board)
|
||||
</div>
|
||||
<div hx-get={ fmt.Sprintf("/hx/%s/catalog", board.Slug) } hx-trigger="load, refreshThreads from:body"></div>
|
||||
<hr/>
|
||||
<div id="boardActionBar">
|
||||
<span>Image size: </span>
|
||||
<select onchange="resizeCatalogPreviewImgs()" id="selectSortBy">
|
||||
<option selected value="small">Small</option>
|
||||
<option value="large">Large</option>
|
||||
</select>
|
||||
</div>
|
||||
<hr/>
|
||||
<div
|
||||
hx-get={ fmt.Sprintf("/hx/%s/catalog", board.Slug) }
|
||||
hx-trigger="load, refreshThreads from:body"
|
||||
_="on htmx:afterRequest call resizeCatalogPreviewImgs()"
|
||||
></div>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ templ Thread(board database.Board, thread database.Thread, posts []database.Post
|
||||
</form>
|
||||
</div>
|
||||
<hr />
|
||||
<div style="margin-left: 25px;" class="link-button-container">
|
||||
<div style="margin-left: 25px;">
|
||||
<a href={ templ.URL("/" + thread.BoardSlug) } style="margin-right: 5px;" class="link-button">[Catalog]</a>
|
||||
<a _="on click trigger refreshPosts on body" class="link-button">[Refresh]</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user