mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-07-26 19:42:47 +02:00
fix(web): 2x2 dashboard chart grid on mobile landscape
Charts jumped from a single column straight to N-across at the md breakpoint, cramming them on landscape phones. Introduce a 2-column layout at the sm breakpoint (2x2 for 4 charts; 3 charts flow to 2-on-top + 1 bottom-left with a gap on the right) and defer the full N-across row to lg. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -111,11 +111,11 @@ function renderChannelMessages(channelMessages, channelLabels) {
|
||||
</div>`;
|
||||
}
|
||||
|
||||
/** Return a Tailwind grid-cols class for the given visible column count. */
|
||||
/** Return responsive Tailwind grid-cols classes for the given visible column count. */
|
||||
function gridCols(count) {
|
||||
if (count === 2) return 'md:grid-cols-2';
|
||||
if (count === 3) return 'md:grid-cols-3';
|
||||
if (count === 4) return 'md:grid-cols-4';
|
||||
if (count === 2) return 'sm:grid-cols-2';
|
||||
if (count === 3) return 'sm:grid-cols-2 lg:grid-cols-3';
|
||||
if (count === 4) return 'sm:grid-cols-2 lg:grid-cols-4';
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user