mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Update designs
This commit is contained in:
parent
423a7f4cc9
commit
6abea7bc9c
@ -24,6 +24,7 @@ use App\Utils\Ninja;
|
|||||||
use App\Utils\Number;
|
use App\Utils\Number;
|
||||||
use App\Utils\Traits\AppSetup;
|
use App\Utils\Traits\AppSetup;
|
||||||
use App\Utils\Traits\MakesDates;
|
use App\Utils\Traits\MakesDates;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
@ -32,7 +33,8 @@ class HtmlEngine
|
|||||||
{
|
{
|
||||||
use MakesDates;
|
use MakesDates;
|
||||||
use AppSetup;
|
use AppSetup;
|
||||||
|
use MakesHash;
|
||||||
|
|
||||||
public $entity;
|
public $entity;
|
||||||
|
|
||||||
public $invitation;
|
public $invitation;
|
||||||
@ -101,9 +103,9 @@ class HtmlEngine
|
|||||||
private function resolveCompanyLogoSize()
|
private function resolveCompanyLogoSize()
|
||||||
{
|
{
|
||||||
$design_map = [
|
$design_map = [
|
||||||
"VolejRejNm" => "65%", // "Plain",
|
"VolejRejNm" => "5%", // "Plain",
|
||||||
"Wpmbk5ezJn" => "65%", //"Clean",
|
"Wpmbk5ezJn" => "65%", //"Clean",
|
||||||
"Opnel5aKBz" => "100%", //"Bold",
|
"Opnel5aKBz" => "65%", //"Bold",
|
||||||
"wMvbmOeYAl" => "55%", //Modern",
|
"wMvbmOeYAl" => "55%", //Modern",
|
||||||
"4openRe7Az" => "65%", //"Business",
|
"4openRe7Az" => "65%", //"Business",
|
||||||
"WJxbojagwO" => "65%", //"Creative",
|
"WJxbojagwO" => "65%", //"Creative",
|
||||||
@ -112,24 +114,37 @@ class HtmlEngine
|
|||||||
"yMYerEdOBQ" => "65%", //"Playful",
|
"yMYerEdOBQ" => "65%", //"Playful",
|
||||||
"gl9avmeG1v" => "65%", //"Tech",
|
"gl9avmeG1v" => "65%", //"Tech",
|
||||||
"7LDdwRb1YK" => "65%", //"Calm",
|
"7LDdwRb1YK" => "65%", //"Calm",
|
||||||
|
"APdRoy0eGy" => "65%", //"Calm-DB2",
|
||||||
|
"y1aK83rbQG" => "65%", //"Calm-DB1",
|
||||||
];
|
];
|
||||||
|
|
||||||
if(strlen($this->settings->company_logo_size) > 1)
|
$design_int_map = [
|
||||||
{
|
"1" => "5%", // "Plain",
|
||||||
return $this->settings->company_logo_size;
|
"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))
|
if(isset($this->settings->company_logo_size) && strlen($this->settings->company_logo_size) > 1)
|
||||||
{
|
return $this->settings->company_logo_size;
|
||||||
return $design_map[$this->entity->design_id];
|
|
||||||
}
|
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";
|
$default_design_id = $this->entity_string."_design_id";
|
||||||
|
|
||||||
$design_id = $this->settings->{$default_design_id};
|
$design_id = $this->settings->{$default_design_id};
|
||||||
|
|
||||||
if(array_key_exists($design_id, $design_map))
|
if(array_key_exists($design_id, $design_map))
|
||||||
return $design_map[$this->entity->design_id];
|
return $design_map[$design_id];
|
||||||
|
|
||||||
return '65%';
|
return '65%';
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
.company-logo {
|
.company-logo {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
object-position: left center;
|
object-position: left center;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-container > span {
|
.header-container > span {
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-and-entity-wrapper {
|
.client-and-entity-wrapper {
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#company-details {
|
#company-details {
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#entity-details p { margin-top: 5px; }
|
#entity-details p { margin-top: 5px; }
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 55%;
|
max-width: 55%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.entity-label {
|
.entity-label {
|
||||||
|
@ -85,6 +85,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 55%;
|
max-width: 55%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#client-details {
|
#client-details {
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-wrapper #company-address {
|
.header-wrapper #company-address {
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.contacts-wrapper {
|
.contacts-wrapper {
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
|
|
||||||
.company-logo {
|
.company-logo {
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
|
/* max-width: $company_logo_size;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-invoice-number {
|
.header-invoice-number {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user