mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Merge pull request #4073 from beganovich/v2-1609-fix-modern-design
Design fixes
This commit is contained in:
commit
db29ad958c
@ -161,10 +161,11 @@ trait DesignHelpers
|
||||
|
||||
public function sharedFooterElements()
|
||||
{
|
||||
return ['element' => 'div', 'properties' => ['style' => 'display: flex; justify-content: space-between; margin-top: 1.5rem; page-break-inside: avoid;'], 'elements' => [
|
||||
['element' => 'img', 'properties' => ['src' => '$contact.signature', 'style' => 'height: 5rem;']],
|
||||
['element' => 'img', 'properties' => ['src' => '$app_url/images/created-by-invoiceninja-new.png', 'style' => 'height: 5rem;', 'hidden' => $this->entity->user->account->isPaid() ? 'true' : 'false']],
|
||||
]];
|
||||
// return ['element' => 'div', 'properties' => ['style' => 'display: flex; justify-content: space-between; margin-top: 1.5rem; page-break-inside: avoid;'], 'elements' => [
|
||||
// ['element' => 'img', 'properties' => ['src' => '$invoiceninja.whitelabel', 'style' => 'height: 5rem;', 'hidden' => $this->entity->user->account->isPaid() ? 'true' : 'false']],
|
||||
// ]];
|
||||
|
||||
return ['element' => 'img', 'properties' => ['src' => '$invoiceninja.whitelabel', 'style' => 'height: 3rem; position: fixed; bottom: 0; left: 0; padding: 5px; margin: 5px;', 'hidden' => $this->entity->user->account->isPaid() ? 'true' : 'false', 'id' => 'invoiceninja-whitelabel-logo']];
|
||||
}
|
||||
|
||||
public function entityVariableCheck(string $variable): bool
|
||||
|
@ -317,6 +317,8 @@ class HtmlEngine
|
||||
|
||||
$data['$font-size'] = ['value' => $this->settings->font_size . 'px', 'label' => ''];
|
||||
|
||||
$data['$invoiceninja.whitelabel'] = ['value' => asset('images/created-by-invoiceninja-new.png'), 'label' => ''];
|
||||
|
||||
// $data['custom_label1'] = ['value' => '', 'label' => ctrans('texts.')];
|
||||
// $data['custom_label2'] = ['value' => '', 'label' => ctrans('texts.')];
|
||||
// $data['custom_label3'] = ['value' => '', 'label' => ctrans('texts.')];
|
||||
|
@ -134,7 +134,7 @@
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#product-table-footer {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
@ -11,9 +11,6 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: '$font-size';
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
|
@ -9,11 +9,6 @@
|
||||
font-size: '$font-size';
|
||||
}
|
||||
|
||||
@page {
|
||||
margin-top: 1cm;
|
||||
margin-bottom: 1cm;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -24,6 +19,8 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin-top: 1cm;
|
||||
margin-bottom: 1cm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
@ -9,10 +9,6 @@
|
||||
font-size: '$font-size';
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -22,6 +18,7 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
.company-logo-wrapper {
|
||||
@ -111,7 +108,7 @@
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 4px solid;
|
||||
}
|
||||
|
||||
|
||||
#product-table-footer {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
@ -119,7 +116,7 @@
|
||||
#product-table-footer > * {
|
||||
display: grid;
|
||||
grid-template-columns: 3fr 1fr 1fr;
|
||||
padding-top: .5rem;
|
||||
padding-top: 0.5rem;
|
||||
padding-left: 1rem;
|
||||
gap: 20px;
|
||||
}
|
||||
|
@ -9,11 +9,6 @@
|
||||
font-size: '$font-size';
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -25,11 +20,14 @@
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
@page { margin: 1cm; }
|
||||
|
||||
.header-wrapper {
|
||||
display: grid;
|
||||
grid-template-columns: 1.2fr 1.8fr;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.header-wrapper .header-text-label {
|
||||
font-size: 1.1rem;
|
||||
color: #bba238;
|
||||
@ -124,7 +122,7 @@
|
||||
#product-table-footer > * {
|
||||
display: grid;
|
||||
grid-template-columns: 3fr 1fr 1fr;
|
||||
padding-top: .5rem;
|
||||
padding-top: 0.5rem;
|
||||
padding-left: 1rem;
|
||||
gap: 20px;
|
||||
}
|
||||
|
@ -29,7 +29,10 @@
|
||||
display: grid;
|
||||
grid-template-columns: 1.5fr 1fr;
|
||||
padding: 1.5rem;
|
||||
width: 100%;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.header-container .company-name {
|
||||
font-size: 2rem;
|
||||
}
|
||||
@ -97,6 +100,10 @@
|
||||
margin-top: 1rem;
|
||||
background-color: #f46521;
|
||||
padding: 1rem;
|
||||
height: 160px;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
@ -152,39 +159,68 @@
|
||||
padding-top: 0.7rem;
|
||||
padding-bottom: 0.7rem;
|
||||
}
|
||||
|
||||
table.page-container {
|
||||
page-break-after: always;
|
||||
}
|
||||
thead.page-header {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot.page-footer {
|
||||
display: table-footer-group;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<div class="header-container" id="header">
|
||||
<h1 class="company-name">$company.name</h1>
|
||||
<table class="page-container">
|
||||
<thead class="page-header">
|
||||
<tr>
|
||||
<th class="page-header-cell">
|
||||
<div class="header-container" id="header">
|
||||
<h1 class="company-name">$company.name</h1>
|
||||
<table id="entity-details" cellspacing="0"></table>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot class="page-footer">
|
||||
<tr>
|
||||
<td class="page-footer-cell">
|
||||
<div class="footer-info">
|
||||
<div style="margin-top: 195px">
|
||||
<!-- An offset div to space out table from footer -->
|
||||
</div>
|
||||
<div class="footer-wrapper" id="footer">
|
||||
<div class="footer-content">
|
||||
<div><!-- Placeholder for offset --></div>
|
||||
<div id="company-details"></div>
|
||||
<div id="company-address"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody class="page-content">
|
||||
<tr>
|
||||
<td class="page-content-cell" id="body">
|
||||
<div class="logo-client-wrapper">
|
||||
<img
|
||||
class="company-logo"
|
||||
src="$company.logo"
|
||||
alt="$company.name logo"
|
||||
/>
|
||||
|
||||
<table id="entity-details" cellspacing="0"></table>
|
||||
</div>
|
||||
<div id="client-details"></div>
|
||||
</div>
|
||||
|
||||
<body id="body">
|
||||
<div class="logo-client-wrapper">
|
||||
<img
|
||||
class="company-logo"
|
||||
src="$company.logo"
|
||||
alt="$company.name logo"
|
||||
/>
|
||||
<div class="table-wrapper">
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
</div>
|
||||
|
||||
<div id="client-details"></div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
</div>
|
||||
|
||||
<div id="product-table-footer" cellspacing="0"></div>
|
||||
</body>
|
||||
|
||||
<div class="footer-wrapper" id="footer">
|
||||
<div class="footer-content">
|
||||
<div><!-- Placeholder for offset --></div>
|
||||
|
||||
<div id="company-details"></div>
|
||||
<div id="company-address"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="product-table-footer" cellspacing="0"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</html>
|
||||
|
@ -9,10 +9,6 @@
|
||||
font-size: '$font-size';
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -23,6 +19,7 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
.header-wrapper {
|
||||
|
@ -9,10 +9,6 @@
|
||||
font-size: '$font-size';
|
||||
}
|
||||
|
||||
@page {
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -22,6 +18,7 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 1cm;
|
||||
}
|
||||
|
||||
.header-wrapper {
|
||||
|
Loading…
x
Reference in New Issue
Block a user