diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-10-23 21:52:24 -0400 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-10-23 21:52:24 -0400 |
| commit | 8f360dd9cc45bb14431238ccc5e3d137c020fa7b (patch) | |
| tree | fcb65190ba06932cdba79b91513e74155aaa912e /ui/lib | |
| parent | 56e16e29db55dae84549229d24b971f8bcf7da21 (diff) | |
Do a big mobile app design thing
Mobile-friendly anyway. Thanks to
[Miriam](https://www.miriamsuzanne.com/) for the CSS that enables a
sliding menu on mobile size, constant menu on larger.
Diffstat (limited to 'ui/lib')
| -rw-r--r-- | ui/lib/assets/logo.png | bin | 0 -> 137101 bytes | |||
| -rw-r--r-- | ui/lib/components/Channel.svelte | 8 | ||||
| -rw-r--r-- | ui/lib/store.js | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/ui/lib/assets/logo.png b/ui/lib/assets/logo.png Binary files differnew file mode 100644 index 0000000..5df6b4e --- /dev/null +++ b/ui/lib/assets/logo.png diff --git a/ui/lib/components/Channel.svelte b/ui/lib/components/Channel.svelte index e62f0f3..bbe9ff7 100644 --- a/ui/lib/components/Channel.svelte +++ b/ui/lib/components/Channel.svelte @@ -1,14 +1,20 @@ <script> + import { showMenu } from '$lib/store'; + export let id; export let name; export let active = false; + + function hideMenu() { + showMenu.update(() => false); + } </script> <li class="rounded-full" class:bg-slate-400={active} > -<a href="/ch/{id}"> +<a href="/ch/{id}" on:click={hideMenu}> <span class="badge bg-primary-500">#</span> <span class="flex-auto">{name}</span> </a> diff --git a/ui/lib/store.js b/ui/lib/store.js index ae17ffa..bdd3e3b 100644 --- a/ui/lib/store.js +++ b/ui/lib/store.js @@ -3,6 +3,7 @@ import { Channels } from '$lib/store/channels'; import { Messages } from '$lib/store/messages'; import { Logins } from '$lib/store/logins'; +export const showMenu = writable(false); export const currentUser = writable(null); export const logins = writable(new Logins()); export const channelsList = writable(new Channels()); |
