Working on new clean.html

This commit is contained in:
David Bomba 2023-01-30 21:40:20 +11:00
parent eb550f65df
commit 750986acb0
3 changed files with 22 additions and 11 deletions

View File

@ -364,13 +364,13 @@ class Design extends BaseDesign
if (in_array($_variable, $_customs) && !empty($this->entity->{$var})) {
$elements[] = ['element' => 'div', 'properties' => ['style' => "display: table-row; visibility: {$this->entityVariableCheck($_variable)};"],'elements' => [
['element' => 'div', 'content' => $variable . '_label', 'properties' => ['style' => 'display: table-cell; border-right:10px solid transparent; ', 'data-ref' => 'entity_details-' . substr($variable, 1) . '_label']],
['element' => 'div', 'content' => $variable, 'properties' => ['style' => 'display: table-cell;', 'data-ref' => 'entity_details-' . substr($variable, 1)]],
['element' => 'div', 'content' => $variable . '_label', 'properties' => ['class' => 'entity-details-cell', 'data-ref' => 'entity_details-' . substr($variable, 1) . '_label']],
['element' => 'div', 'content' => $variable, 'properties' => ['class' => 'entity-details-cell', 'data-ref' => 'entity_details-' . substr($variable, 1)]],
]];
} else {
$elements[] = ['element' => 'div', 'properties' => ['style' => "display: table-row; visibility: {$this->entityVariableCheck($variable)};"], 'elements' => [
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['style' => 'display: table-cell; border-right:10px solid transparent;','data-ref' => 'entity_details-' . substr($variable, 1) . '_label']],
['element' => 'span', 'content' => $variable, 'properties' => ['style' => 'display: table-cell;','data-ref' => 'entity_details-' . substr($variable, 1)]],
['element' => 'div', 'content' => $variable . '_label', 'properties' => ['class' => 'entity-details-cell','data-ref' => 'entity_details-' . substr($variable, 1) . '_label']],
['element' => 'div', 'content' => $variable, 'properties' => ['class' => 'entity-details-cell','data-ref' => 'entity_details-' . substr($variable, 1)]],
]];
}
}

View File

@ -264,7 +264,8 @@ trait DesignHelpers
try {
$_variable = explode('.', $variable)[1];
} catch (Exception $e) {
throw new Exception('Company settings seems to be broken. Missing $entity.variable type.');
nlog("Company settings seems to be broken. Could not resolve {$variable} type.");
return 'collapse';
}
if (\in_array($variable, \array_keys($aliases))) {

View File

@ -57,8 +57,8 @@
}
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
/* max-width: 65%;*/
max-width: $company_logo_size;
}
#company-details {
@ -94,19 +94,29 @@
}
#entity-details {
display: flex;
display: table;
padding-right: 30px;
flex-direction: column;
line-height: var(--line-height);
overflow: hidden;
height: 12px;
white-space: nowrap;
line-height: var(--line-height);
}
.entity-details-cell {
display: table-cell;
border-right: 10px solid transparent;
}
#client-details {
display: flex;
flex-direction: column;
line-height: var(--line-height);
padding-right: 30px;
line-height: var(--line-height);
}
#shipping-details {
@ -362,7 +372,7 @@
</div>
<p class="entity-label">$entity_label</p>
<div class="client-and-entity-wrapper">
<div id="entity-details" style="display: table;">
<div id="entity-details">
</div>
<div id="client-details"></div>
<div id="shipping-details"></div>