Fix tile padding and margins to be nice and consistent
This commit is contained in:
parent
53aebdc79a
commit
735fbd3abe
@ -32,7 +32,7 @@ if (defined("EDIT_MODE") && EDIT_MODE == true) {
|
||||
<?php echo $pubcss; ?>
|
||||
}
|
||||
|
||||
<?php $pagesize = $database->get("page_sizes", ["sizewidth (width)", "sizeheight (height)"], ["sizeid" => $pubdata["page_size"]]); ?>
|
||||
<?php $pagesize = $database->get("page_sizes", ["sizewidth (width)", "sizeheight (height)"], ["sizeid" => $pubdata["page_size"]]); ?>
|
||||
.pub-content {
|
||||
max-width: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["width"] : $pagesize["height"]); ?>;
|
||||
min-height: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["height"] : $pagesize["width"]); ?>;
|
||||
@ -57,6 +57,7 @@ foreach ($tiles as $tile) {
|
||||
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
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.pub-content {
|
||||
@ -11,7 +13,7 @@
|
||||
}
|
||||
|
||||
.tile {
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.tile-html {
|
||||
@ -19,6 +21,10 @@
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
.tile-html img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.pub-content {
|
||||
height: 100%;
|
||||
|
Loading…
x
Reference in New Issue
Block a user