add search, improve SLayout
This commit is contained in:
parent
ddb07a651e
commit
1dc5768640
11 changed files with 153 additions and 15 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
let { user } : {user: UserEntry} = $props();
|
||||
let enable_search = $state(false);
|
||||
let enable_search = $derived(user !== null);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ let enable_search = $state(false);
|
|||
method="POST"
|
||||
class="mini-search-bar nomobile">
|
||||
<!-- csrf_token() -->
|
||||
<input type="search" disabled={true} name="q" placeholder="Search among {activePostCount()} posts" />
|
||||
<input type="search" name="q" placeholder="Search among {activePostCount()} posts" />
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
<a href="/search" aria-label="Search" title="Search" class="mobileonly">
|
||||
|
|
@ -98,7 +98,7 @@ let enable_search = $state(false);
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mini-search-bar + a {display: none}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue