This commit is contained in:
Rizky 2024-08-20 08:27:15 +07:00
parent d2df629851
commit f3ee63ea2d
2 changed files with 39 additions and 48 deletions

File diff suppressed because one or more lines are too long

View File

@ -179,34 +179,25 @@ export const Root = () => {
if (base.page.root.responsive === "mobile") {
base.mode = "mobile";
if (
!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
)
) {
// if page is mobile but device is not, frame the screen
mobileCSS = css`
@media (min-width: 768px) {
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
width: 375px;
top: 0px;
overflow-x: hidden;
overflow-y: auto;
bottom: 0px;
}
@media (max-width: 767px) {
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
overflow-y: auto;
}
`;
}
} else {
mobileCSS = css`
@media (min-width: 768px) {
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
width: 375px;
top: 0px;
overflow-x: hidden;
overflow-y: auto;
bottom: 0px;
}
@media (max-width: 767px) {
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
overflow-y: auto;
}
`;
} else if (base.page.root.responsive === "desktop") {
base.mode = "desktop";
}