-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad display on mobile device #719
Comments
Remark: when enabling "desktop version" on mobile, the display is satisfying. |
While forcing the desktop version of your website on mobile devices is generally not recommended due to user experience and accessibility concerns, you can achieve this using a combination of JavaScript and CSS. Here's a simple way to force the desktop version for mobile visitors:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script>
function isMobile() {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
if (isMobile()) {
document.querySelector('meta[name="viewport"]').setAttribute('content', 'width=1024');
}
</script> This script will check if the user is on a mobile device, and if so, it will set the viewport width to a fixed value (e.g., 1024px) to mimic the desktop version. You can adjust the fixed width value according to your website's design. However, I would strongly recommend adopting a responsive design approach instead of forcing the desktop version on mobile devices. This will ensure that your website looks and functions well on all devices, providing a better user experience. You can achieve this by using CSS media queries, responsive grids, and flexible layouts. |
I want to do the following to solve this issue and improve the UI a bit
I suggest that we create a new issue for UI improvements which will include these points and more. All the changes should also be documented as instructions for the future. This will be helpful when adding new material e.g. Text sizes, paddings, margins, colors, icons and more and will help future developers to follow a specified theme rather than adding something which does not match the existing rules for the UI. If this is what we want to do, this should be considered a V2 of the UI rather than a fix |
This looks like a good plan. If you need confirmation that this is a good plan, we should ask @bbearce to give his input. |
Shifted to Discussions #1334 |
The display is problematic and cluttered on mobile device, as shown by the screenshots below. Tested on an Android device, on Firefox browser. We did not have this problem on CodaLab Competitions. Even if the site is mostly used on computers, it is still important to have a clean interface when browsing from a smartphone.
The text was updated successfully, but these errors were encountered: