Move away from fixed positioned page elements because they act squirrely on android
This commit is contained in:
+4
-20
@@ -390,28 +390,12 @@ progress[value]::-webkit-progress-value {
|
|||||||
|
|
||||||
/* content width for fixed elements */
|
/* content width for fixed elements */
|
||||||
|
|
||||||
.cw {
|
.left-content {
|
||||||
@apply w-full md:left-[18.5rem] md:w-[calc(100%-18.5rem-var(--sair))];
|
@apply md:left-[calc(18.5rem+var(--sail))];
|
||||||
}
|
|
||||||
|
|
||||||
.cw-full {
|
|
||||||
@apply w-full md:left-[4rem] md:w-[calc(100%-4rem-var(--sair))];
|
|
||||||
}
|
|
||||||
|
|
||||||
.cb {
|
|
||||||
@apply md:bottom-sai bottom-[calc(var(--saib)+3.5rem)];
|
|
||||||
}
|
|
||||||
|
|
||||||
.ct {
|
|
||||||
@apply top-[calc(var(--sait)+5rem)] md:top-[calc(var(--sait)+3rem)];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Keyboard open state adjustments */
|
/* Keyboard open state adjustments */
|
||||||
|
|
||||||
body.keyboard-open .cb {
|
|
||||||
@apply bottom-sai;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.keyboard-open .hide-on-keyboard {
|
body.keyboard-open .hide-on-keyboard {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -419,11 +403,11 @@ body.keyboard-open .hide-on-keyboard {
|
|||||||
/* chat view */
|
/* chat view */
|
||||||
|
|
||||||
.chat__compose {
|
.chat__compose {
|
||||||
@apply cb cw fixed z-compose;
|
@apply left-content bottom-sai right-sai fixed z-compose;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat__compose-zone {
|
.chat__compose-zone {
|
||||||
@apply cb cw fixed z-compose;
|
@apply left-content bottom-sai right-sai fixed z-compose;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat__compose-zone .chat__compose-inner {
|
.chat__compose-zone .chat__compose-inner {
|
||||||
|
|||||||
@@ -64,7 +64,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={spacer}></div>
|
<div bind:this={spacer}></div>
|
||||||
<form in:fly bind:this={form} onsubmit={preventDefault(submit)} class="cb cw fixed z-feature pt-3">
|
<form
|
||||||
|
in:fly
|
||||||
|
bind:this={form}
|
||||||
|
onsubmit={preventDefault(submit)}
|
||||||
|
class="left-content bottom-sai right-sai ml-2 pl-2 fixed z-feature">
|
||||||
<div class="card2 mx-2 my-2 bg-alt shadow-md">
|
<div class="card2 mx-2 my-2 bg-alt shadow-md">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<div class="note-editor flex-grow overflow-hidden">
|
<div class="note-editor flex-grow overflow-hidden">
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="ml-sai mt-sai mb-sai relative z-nav hidden w-14 flex-shrink-0 bg-base-200 pt-4 md:block">
|
class="ml-sai mt-sai mb-sai relative z-nav hidden w-14 flex-shrink-0 bg-base-200 pt-2 md:block">
|
||||||
<div class="flex h-full flex-col" class:justify-between={PLATFORM_RELAYS.length === 0}>
|
<div class="flex h-full flex-col" class:justify-between={PLATFORM_RELAYS.length === 0}>
|
||||||
<PrimaryNavSpaces />
|
<PrimaryNavSpaces />
|
||||||
{#if PLATFORM_RELAYS.length > 0}
|
{#if PLATFORM_RELAYS.length > 0}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
const itemHeight = 56
|
const itemHeight = 56
|
||||||
const navPadding = 8 * itemHeight
|
const navPadding = 8 * itemHeight
|
||||||
const itemLimit = $derived((windowHeight - navPadding) / itemHeight)
|
const itemLimit = $derived(Math.max(0, (windowHeight - navPadding) / itemHeight))
|
||||||
const [primarySpaceUrls, secondarySpaceUrls] = $derived(splitAt(itemLimit, $userSpaceUrls))
|
const [primarySpaceUrls, secondarySpaceUrls] = $derived(splitAt(itemLimit, $userSpaceUrls))
|
||||||
const otherSpaceNotifications = $derived(secondarySpaceUrls.some(p => $notifications.has(p)))
|
const otherSpaceNotifications = $derived(secondarySpaceUrls.some(p => $notifications.has(p)))
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -130,13 +130,12 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<button class="btn btn-neutral btn-sm btn-square" aria-label="Search" onclick={open}>
|
||||||
<button class="btn btn-neutral btn-sm btn-square" aria-label="Search" onclick={open}>
|
|
||||||
<Icon size={4} icon={Magnifier} />
|
<Icon size={4} icon={Magnifier} />
|
||||||
</button>
|
</button>
|
||||||
{#if show}
|
{#if show}
|
||||||
<button class="fixed inset-0 z-feature" aria-label="Close search" onclick={close}></button>
|
<button class="fixed inset-0 z-feature" aria-label="Close search" onclick={close}></button>
|
||||||
<div class="fixed cw top-0 right-0 z-feature p-2">
|
<div class="fixed top-sai right-sai left-content z-feature p-2">
|
||||||
<div
|
<div
|
||||||
class="card2 card2-sm bg-alt flex flex-col gap-2 shadow-md"
|
class="card2 card2-sm bg-alt flex flex-col gap-2 shadow-md"
|
||||||
transition:fly={{y: -40, duration: 150}}>
|
transition:fly={{y: -40, duration: 150}}>
|
||||||
@@ -201,5 +200,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -9,6 +9,6 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
data-component="Page"
|
data-component="Page"
|
||||||
class="scroll-container bottom-sai top-sai cw fixed mb-14 overflow-auto bg-base-200 md:mb-0 {props.class}">
|
class="relative flex-grow flex flex-col min-w-0 ml-sai mb-sai mt-sai mr-sai bg-base-200 md:ml-0 md:mb-0 {props.class}">
|
||||||
{@render props.children?.()}
|
{@render props.children?.()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
const {children, ...props}: Props = $props()
|
const {children, ...props}: Props = $props()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div data-component="PageBar" class="cw top-sai fixed z-nav p-2 {props.class}">
|
<div data-component="PageBar" class="relative z-nav p-2 -mb-4 {props.class}">
|
||||||
<div class="rounded-xl bg-base-100 p-4 shadow-md h-20 md:h-12 flex flex-col justify-center">
|
<div class="rounded-xl bg-base-100 p-4 shadow-md h-20 md:h-12 flex flex-col justify-center">
|
||||||
{@render children?.()}
|
{@render children?.()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,10 +10,7 @@
|
|||||||
|
|
||||||
let {children, element = $bindable(), ...props}: Props = $props()
|
let {children, element = $bindable(), ...props}: Props = $props()
|
||||||
|
|
||||||
const className = cx(
|
const className = cx(props.class, "scroll-container z-feature overflow-y-auto overflow-x-hidden")
|
||||||
props.class,
|
|
||||||
"scroll-container cw cb ct fixed z-feature overflow-y-auto overflow-x-hidden",
|
|
||||||
)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div {...props} bind:this={element} data-component="PageContent" class={className}>
|
<div {...props} bind:this={element} data-component="PageContent" class={className}>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
class={cx(
|
class={cx(
|
||||||
"ml-sai mt-sai mb-sai max-h-screen w-60 sm:flex-shrink-0 flex-col gap-1 bg-base-300 z-nav hidden md:flex",
|
"mt-sai mb-sai max-h-screen w-60 min-h-0 flex-shrink-0 flex-col gap-1 bg-base-300 z-nav hidden md:flex",
|
||||||
props.class,
|
props.class,
|
||||||
)}>
|
)}>
|
||||||
{@render children?.()}
|
{@render children?.()}
|
||||||
|
|||||||
@@ -7,6 +7,6 @@
|
|||||||
const {...props}: Props = $props()
|
const {...props}: Props = $props()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col gap-1 px-2 py-4 {props.class}">
|
<div class="flex flex-col gap-1 px-2 py-2 {props.class}">
|
||||||
{@render props.children?.()}
|
{@render props.children?.()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Page class="cw-full">
|
<Page>
|
||||||
<ContentSearch>
|
<ContentSearch>
|
||||||
{#snippet input()}
|
{#snippet input()}
|
||||||
<label class="row-2 input input-bordered">
|
<label class="row-2 input input-bordered">
|
||||||
|
|||||||
@@ -180,8 +180,8 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Page class="cw-full">
|
<Page>
|
||||||
<PageBar class="cw-full">
|
<PageBar>
|
||||||
{#if showSearch}
|
{#if showSearch}
|
||||||
<label class="input input-bordered input-sm flex flex-1 items-center gap-2" in:fly>
|
<label class="input input-bordered input-sm flex flex-1 items-center gap-2" in:fly>
|
||||||
<Icon icon={Magnifier} />
|
<Icon icon={Magnifier} />
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</PageBar>
|
</PageBar>
|
||||||
<PageContent class="cw-full flex flex-col gap-2 p-2 pt-4">
|
<PageContent class="flex flex-col gap-2 p-2 pt-4">
|
||||||
<div class="flex flex-col gap-2" bind:this={element}>
|
<div class="flex flex-col gap-2" bind:this={element}>
|
||||||
{#each PLATFORM_RELAYS as url (url)}
|
{#each PLATFORM_RELAYS as url (url)}
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
<svelte:window bind:innerWidth={width} />
|
<svelte:window bind:innerWidth={width} />
|
||||||
|
|
||||||
{#if width <= md}
|
{#if width <= md}
|
||||||
<div class="ml-sai mt-sai mb-sai relative z-nav w-14 flex-shrink-0 bg-base-200 pt-4">
|
<div class="ml-sai mt-sai mb-sai relative z-nav w-14 flex-shrink-0 bg-base-200 pt-2">
|
||||||
<PrimaryNavSpaces />
|
<PrimaryNavSpaces />
|
||||||
</div>
|
</div>
|
||||||
<SecondaryNav class="!flex !min-h-0 !w-auto flex-grow pb-4">
|
<SecondaryNav class="!flex !w-auto flex-grow pb-16">
|
||||||
<SpaceMenu {url} />
|
<SpaceMenu {url} />
|
||||||
</SecondaryNav>
|
</SecondaryNav>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -216,14 +216,13 @@
|
|||||||
<strong>Recent Activity</strong>
|
<strong>Recent Activity</strong>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#snippet action()}
|
{#snippet action()}
|
||||||
<div>
|
|
||||||
<button class="btn btn-neutral btn-sm btn-square" aria-label="Search" onclick={openSearch}>
|
<button class="btn btn-neutral btn-sm btn-square" aria-label="Search" onclick={openSearch}>
|
||||||
<Icon size={4} icon={Magnifier} />
|
<Icon size={4} icon={Magnifier} />
|
||||||
</button>
|
</button>
|
||||||
{#if showSearch}
|
{#if showSearch}
|
||||||
<button class="fixed inset-0 z-feature" aria-label="Close search" onclick={closeSearch}
|
<button class="fixed inset-0 z-feature" aria-label="Close search" onclick={closeSearch}
|
||||||
></button>
|
></button>
|
||||||
<div class="fixed cw top-0 right-0 z-feature p-2">
|
<div class="fixed top-sai right-sai left-content z-feature p-2">
|
||||||
<div
|
<div
|
||||||
class="card2 card2-sm bg-alt flex flex-col gap-2 shadow-md"
|
class="card2 card2-sm bg-alt flex flex-col gap-2 shadow-md"
|
||||||
transition:fly={{y: -40, duration: 150}}>
|
transition:fly={{y: -40, duration: 150}}>
|
||||||
@@ -288,12 +287,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</SpaceBar>
|
</SpaceBar>
|
||||||
|
|
||||||
<div bind:this={element}>
|
<PageContent class="flex flex-col gap-2 p-2 pt-4" bind:element>
|
||||||
<PageContent class="flex flex-col gap-2 p-2 pt-4">
|
|
||||||
{#if $recentActivity.length === 0}
|
{#if $recentActivity.length === 0}
|
||||||
<p class="flex flex-col items-center py-20 text-center">No recent activity found!</p>
|
<p class="flex flex-col items-center py-20 text-center">No recent activity found!</p>
|
||||||
{:else}
|
{:else}
|
||||||
@@ -315,5 +312,4 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
</PageContent>
|
</PageContent>
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
import PageContent from "@lib/components/PageContent.svelte"
|
import PageContent from "@lib/components/PageContent.svelte"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Page class="cw-full">
|
<Page>
|
||||||
<PageContent class="cw-full flex flex-col items-center gap-2 p-2 pt-4">
|
<PageContent class="flex flex-col items-center gap-2 p-2 pt-4">
|
||||||
<PageHeader>
|
<PageHeader>
|
||||||
{#snippet title()}
|
{#snippet title()}
|
||||||
<div>Create your own Space</div>
|
<div>Create your own Space</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user