diff --git a/src/front/cobalt.css b/src/front/cobalt.css index b7e34565..5e3c0659 100644 --- a/src/front/cobalt.css +++ b/src/front/cobalt.css @@ -1171,7 +1171,7 @@ button:active, .tab-content-settings, #picker-holder { padding-bottom: calc(var(--padding) + 3.5rem); - padding-top: calc(var(--padding) + 3rem); + padding-top: calc(var(--padding) + 3rem - var(--padding-small)); } #footer, .popup-tabs { @@ -1191,7 +1191,7 @@ button:active, } .tab-content-settings, #tab-about-about .popup-content-inner { - padding-top: 5rem; + padding-top: calc(5rem - var(--padding-small)); } } @media screen and (max-width: 535px) and (display-mode: standalone) { @@ -1252,4 +1252,18 @@ button:active, calc(4rem - var(--padding) + var(--padding-small)) ); } + + .android .popup-header { + padding-top: var(--padding); + } + .android .popup-content-inner, + .android .tab-content-settings, + .android #picker-holder { + padding-bottom: calc(var(--padding) + 3.5rem); + padding-top: calc(var(--padding) + 3rem - var(--padding-small)); + } + .android .tab-content-settings, + .android #tab-about-about .popup-content-inner { + padding-top: calc(5rem - var(--padding-small)); + } } diff --git a/src/front/cobalt.js b/src/front/cobalt.js index a3302c10..150e8f92 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -1,5 +1,6 @@ const ua = navigator.userAgent.toLowerCase(); const isIOS = ua.includes("iphone os") || (ua.includes("mac os") && navigator.maxTouchPoints > 0); +const isAndroid = ua.includes("android"); const isMobile = ua.includes("android") || isIOS; const isSafari = ua.includes("safari/"); const isFirefox = ua.includes("firefox/"); @@ -167,6 +168,7 @@ const changeStatusBarColor = () => { } document.querySelector('meta[name="theme-color"]').setAttribute('content', colors[state]); + document.querySelector('meta[name="background-color"]').setAttribute('content', colors[state]); } const detectColorScheme = () => { document.documentElement.setAttribute("data-theme", preferredColorScheme()); @@ -626,6 +628,9 @@ const loadSettings = () => { if (!isMobile) { eid("cobalt-body").classList.add('desktop'); } + if (isAndroid) { + eid("cobalt-body").classList.add('android'); + } if (isIOS) { eid("download-switcher") .querySelector(".explanation") diff --git a/src/modules/pageRender/page.js b/src/modules/pageRender/page.js index 7666f206..f0696843 100644 --- a/src/modules/pageRender/page.js +++ b/src/modules/pageRender/page.js @@ -69,7 +69,6 @@ export default function(obj) { - @@ -86,6 +85,9 @@ export default function(obj) { + + +