|
891 | 891 | }; |
892 | 892 |
|
893 | 893 | onMount(() => { |
| 894 | + const htmlEl = document.documentElement; |
| 895 | + const bodyEl = document.body; |
894 | 896 | const appEl = document.querySelector("#app") as HTMLElement | null; |
| 897 | + if (htmlEl) { |
| 898 | + htmlEl.style.height = "100dvh"; |
| 899 | + } |
| 900 | + if (bodyEl) { |
| 901 | + bodyEl.style.height = "100dvh"; |
| 902 | + } |
895 | 903 | if (appEl) { |
896 | 904 | appEl.style.overflow = "hidden"; |
897 | | - appEl.style.height = "100%"; |
| 905 | + appEl.style.height = "100dvh"; |
898 | 906 | } |
899 | 907 |
|
900 | 908 | void getAllCachedImages().then((cached) => { |
|
920 | 928 | }); |
921 | 929 |
|
922 | 930 | onDestroy(() => { |
| 931 | + const htmlEl = document.documentElement; |
| 932 | + const bodyEl = document.body; |
923 | 933 | const appEl = document.querySelector("#app") as HTMLElement | null; |
| 934 | + if (htmlEl) { |
| 935 | + htmlEl.style.height = ""; |
| 936 | + } |
| 937 | + if (bodyEl) { |
| 938 | + bodyEl.style.height = ""; |
| 939 | + } |
924 | 940 | if (appEl) { |
925 | 941 | appEl.style.overflow = ""; |
926 | 942 | appEl.style.height = ""; |
|
1328 | 1344 | min-height: 0; |
1329 | 1345 | overflow-y: auto; |
1330 | 1346 | overflow-x: hidden; |
1331 | | - padding: 14px 14px calc(92px + env(safe-area-inset-bottom, 0px)); |
| 1347 | + padding: 14px 14px 24px; |
1332 | 1348 | display: grid; |
1333 | 1349 | align-content: start; |
1334 | 1350 | gap: 14px; |
1335 | 1351 | } |
1336 | 1352 |
|
1337 | 1353 | .content.controller-mode { |
1338 | | - padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); |
| 1354 | + padding-bottom: 24px; |
1339 | 1355 | } |
1340 | 1356 |
|
1341 | 1357 | .section, |
|
1918 | 1934 | } |
1919 | 1935 |
|
1920 | 1936 | .bottom-nav { |
1921 | | - position: fixed; |
1922 | | - left: 50%; |
1923 | | - bottom: 0; |
1924 | | - transform: translateX(-50%); |
1925 | | - width: min(620px, 100vw); |
1926 | | - height: calc(72px + env(safe-area-inset-bottom, 0px)); |
| 1937 | + width: 100%; |
| 1938 | + height: 72px; |
1927 | 1939 | display: grid; |
1928 | 1940 | grid-template-columns: repeat(3, minmax(0, 1fr)); |
1929 | | - padding-bottom: env(safe-area-inset-bottom, 0px); |
1930 | 1941 | border-top: 1px solid rgb(255 255 255 / 0.1); |
1931 | 1942 | background: rgb(25 25 25 / 0.96); |
1932 | 1943 | backdrop-filter: blur(14px); |
1933 | 1944 | } |
1934 | 1945 |
|
| 1946 | + @media (display-mode: standalone) { |
| 1947 | + .bottom-nav { |
| 1948 | + height: calc(60px + env(safe-area-inset-bottom, 0px)); |
| 1949 | + padding-bottom: env(safe-area-inset-bottom, 0px); |
| 1950 | + } |
| 1951 | + } |
| 1952 | +
|
1935 | 1953 | .bottom-nav button { |
1936 | 1954 | display: flex; |
1937 | 1955 | flex-direction: column; |
|
0 commit comments