Dynamic Columns for mobile device support #9
Replies: 2 comments
-
|
I must admit that I haven't tested the ELN vault on mobile devices. Wrapping everything in a multi-column callout may be a workaround for now, but it's a bit cumbersome to edit. I'll see if I can transfer a bit of the multicolumn css magic to the dashboard css to improve the layout on mobile devices. |
Beta Was this translation helpful? Give feedback.
-
|
Here is a quick fix to address the issue. Add @media (max-width: 768px) {
.dashboard div.el-ul>ul {
grid-template-columns: 50% 50%; /* 2 columns for tablets */
}
}
@media (max-width: 480px) {
.dashboard div.el-ul>ul {
grid-template-columns: 100%; /* 1 column for smartphones */
}
}to the dashboard.css snippet. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Idea
When using obsidian on mobile, i.e. dashboard or home become hard to use because the screen is not wide enough for three elements in a row.
A solution would be to not strictly force the three-column grid layout and instead use more dynamic columns.
Approach
I saw that you already imported the mcl multi-column css snippet. I wrapped all elements on the home screen in mcl elements and it works quite well. Also, I altered the build function for open tasks, so that these are also wrapped in multicolumns.
I think this works quite well and would be a nice optimization for mobile.
Code:
Beta Was this translation helpful? Give feedback.
All reactions