1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Update designs

This commit is contained in:
David Bomba 2023-01-28 00:08:42 +11:00
parent 423a7f4cc9
commit 6abea7bc9c
12 changed files with 39 additions and 13 deletions

View File

@ -24,6 +24,7 @@ use App\Utils\Ninja;
use App\Utils\Number;
use App\Utils\Traits\AppSetup;
use App\Utils\Traits\MakesDates;
use App\Utils\Traits\MakesHash;
use Exception;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Cache;
@ -32,7 +33,8 @@ class HtmlEngine
{
use MakesDates;
use AppSetup;
use MakesHash;
public $entity;
public $invitation;
@ -101,9 +103,9 @@ class HtmlEngine
private function resolveCompanyLogoSize()
{
$design_map = [
"VolejRejNm" => "65%", // "Plain",
"VolejRejNm" => "5%", // "Plain",
"Wpmbk5ezJn" => "65%", //"Clean",
"Opnel5aKBz" => "100%", //"Bold",
"Opnel5aKBz" => "65%", //"Bold",
"wMvbmOeYAl" => "55%", //Modern",
"4openRe7Az" => "65%", //"Business",
"WJxbojagwO" => "65%", //"Creative",
@ -112,24 +114,37 @@ class HtmlEngine
"yMYerEdOBQ" => "65%", //"Playful",
"gl9avmeG1v" => "65%", //"Tech",
"7LDdwRb1YK" => "65%", //"Calm",
"APdRoy0eGy" => "65%", //"Calm-DB2",
"y1aK83rbQG" => "65%", //"Calm-DB1",
];
if(strlen($this->settings->company_logo_size) > 1)
{
return $this->settings->company_logo_size;
}
$design_int_map = [
"1" => "5%", // "Plain",
"2" => "65%", //"Clean",
"3" => "65%", //"Bold",
"4" => "55%", //Modern",
"5" => "65%", //"Business",
"6" => "65%", //"Creative",
"7" => "55%", //"Elegant",
"8" => "65%", //"Hipster",
"9" => "65%", //"Playful",
"10" => "65%", //"Tech",
"11" => "65%", //"Calm",
"6972" => "65%", //"C-DB2"
"11221" => "65%", //"C-DB1"
];
if($this->entity->design_id && array_key_exists($this->entity->design_id, $design_map))
{
return $design_map[$this->entity->design_id];
}
if(isset($this->settings->company_logo_size) && strlen($this->settings->company_logo_size) > 1)
return $this->settings->company_logo_size;
if($this->entity->design_id && array_key_exists($this->entity->design_id, $design_int_map))
return $design_map[$this->encodePrimaryKey($this->entity->design_id)];
$default_design_id = $this->entity_string."_design_id";
$design_id = $this->settings->{$default_design_id};
if(array_key_exists($design_id, $design_map))
return $design_map[$this->entity->design_id];
return $design_map[$design_id];
return '65%';

View File

@ -59,6 +59,7 @@
.company-logo {
height: 100%;
max-width: 100%;
/* max-width: $company_logo_size;*/
object-fit: contain;
object-position: left center;
}

View File

@ -41,6 +41,7 @@
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
}
.header-container > span {

View File

@ -47,6 +47,7 @@
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
}
.client-and-entity-wrapper {

View File

@ -53,6 +53,7 @@
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
}
#company-details {

View File

@ -42,6 +42,7 @@
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
}
#entity-details p { margin-top: 5px; }

View File

@ -32,6 +32,7 @@
.company-logo {
max-width: 55%;
/* max-width: $company_logo_size;*/
margin-left: auto;
margin-right: auto;
display: block;

View File

@ -81,6 +81,7 @@
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
}
.entity-label {

View File

@ -85,6 +85,7 @@
.company-logo {
max-width: 55%;
/* max-width: $company_logo_size;*/
}
#client-details {

View File

@ -42,6 +42,7 @@
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
}
.header-wrapper #company-address {

View File

@ -63,6 +63,7 @@
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
}
.contacts-wrapper {

View File

@ -68,6 +68,7 @@
.company-logo {
max-width: 65%;
/* max-width: $company_logo_size;*/
}
.header-invoice-number {