diff options
| author | Adam Soltys <[email protected]> | 2025-07-08 03:43:02 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-07-08 03:43:02 -0700 |
| commit | 3c63c47f51f0b86f530ce2381a44a05cb1e4abf1 (patch) | |
| tree | 9d599b31e6dcdee88ff099c39d4870b4b6e4f151 /src | |
| parent | 503fa32f2453d76ed34d4d15f3321c981fc8f952 (diff) | |
| download | coinos-ui-3c63c47f51f0b86f530ce2381a44a05cb1e4abf1.tar.gz coinos-ui-3c63c47f51f0b86f530ce2381a44a05cb1e4abf1.zip | |
bottom inset
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/[username]/(profile)/+layout.svelte | 1 | ||||
| -rw-r--r-- | src/routes/+layout.svelte | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte index ac35fe82..15752641 100644 --- a/src/routes/(app)/[username]/(profile)/+layout.svelte +++ b/src/routes/(app)/[username]/(profile)/+layout.svelte @@ -330,6 +330,7 @@ {#if currency} <div class="flex fixed w-full px-4 bg-base-100 py-2 pb-3 bottom-0 bg-opacity-90 tabular-nums" + style="bottom: calc(var(--safe-area-inset-bottom) + 8px);" > <div class="text-secondary flex mr-auto"> <div class="flex mr-1"> diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 4317a6a2..2b3c99bf 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -37,6 +37,18 @@ console.error("Failed to get notch inset:", err); }, ); + + window.AndroidNotch.getInsetBottom( + (px) => { + document.documentElement.style.setProperty( + "--safe-area-inset-bottom", + px + "px", + ); + }, + (err) => { + console.error("Failed to get bottom inset:", err); + }, + ); } }); </script> @@ -74,9 +86,11 @@ --toastBackground: #292929; --safe-area-inset-top: 24px; + --safe-area-inset-bottom: 0px; } main { padding-top: var(--safe-area-inset-top); + padding-bottom: var(--safe-area-inset-bottom); } </style> |
