Double tile width on mobile viewports
This commit is contained in:
parent
ed8dd1e205
commit
4353022588
@ -150,9 +150,18 @@ foreach ($tiles as $tile) {
|
|||||||
?>
|
?>
|
||||||
#tile-<?php echo $tile["tileid"]; ?> {
|
#tile-<?php echo $tile["tileid"]; ?> {
|
||||||
order: <?php echo $tile["order"]; ?>;
|
order: <?php echo $tile["order"]; ?>;
|
||||||
width: <?php echo round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)); ?>%;
|
width: <?php echo min([100, round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)) * 2]); ?>%;
|
||||||
flex-basis: <?php echo round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)); ?>%;
|
flex-basis: <?php echo min([100, round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)) * 2]); ?>%;
|
||||||
flex: 0 0 calc(<?php echo round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)); ?>% - 10px);
|
flex: 0 0 calc(<?php echo min([100, round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)) * 2]); ?>% - 10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
#tile-<?php echo $tile["tileid"]; ?> {
|
||||||
|
order: <?php echo $tile["order"]; ?>;
|
||||||
|
width: <?php echo round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)); ?>%;
|
||||||
|
flex-basis: <?php echo round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)); ?>%;
|
||||||
|
flex: 0 0 calc(<?php echo round((($tile["width"] * 1.0) / ($pubdata["columns"] * 1.0) * 100)); ?>% - 10px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user