2020-02-05 05:06:03 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Designs;
|
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
class Modern extends AbstractDesign
|
2020-02-05 05:06:03 +01:00
|
|
|
{
|
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
public function __construct() {
|
|
|
|
}
|
2020-02-05 05:06:03 +01:00
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
public function header() {
|
2020-02-05 05:06:03 +01:00
|
|
|
|
|
|
|
return '
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2020-02-05 22:54:20 +01:00
|
|
|
<title>$number</title>
|
2020-02-05 05:06:03 +01:00
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
2020-02-06 10:35:51 +01:00
|
|
|
<style>
|
2020-02-26 04:20:12 +01:00
|
|
|
body{font-size:85%}
|
|
|
|
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}h1{font-size:2em;margin:.67em 0}a{background-color:transparent}img{border-style:none}[type=button],[type=reset],[type=submit]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[hidden],template{display:none}h1,h2,h4,p{margin:0}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 solid #e2e8f0}img{border-style:solid}[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h4{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}img{display:block;vertical-align:middle;max-width:100%;height:auto}.bg-black{background-color:#000}.bg-white{background-color:#fff}.bg-gray-100{background-color:#f7fafc}.bg-gray-200{background-color:#edf2f7}.bg-gray-300{background-color:#e2e8f0}.bg-gray-800{background-color:#2d3748}.bg-gray-900{background-color:#1a202c}.bg-red-100{background-color:#fff5f5}.bg-red-300{background-color:#feb2b2}.bg-orange-600{background-color:#dd6b20}.bg-orange-700{background-color:#c05621}.bg-teal-600{background-color:#319795}.bg-blue-900{background-color:#2a4365}.border-black{border-color:#000}.border-white{border-color:#fff}.border-gray-300{border-color:#e2e8f0}.border-gray-400{border-color:#cbd5e0}.border-gray-900{border-color:#1a202c}.border-teal-600{border-color:#319795}.border-pink-700{border-color:#b83280}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem}.rounded-r-lg,.rounded-t-lg{border-top-right-radius:.5rem}.rounded-r-lg{border-bottom-right-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.border-dashed{border-style:dashed}.border-4{border-width:4px}.border{border-width:1px}.border-t-2{border-top-width:2px}.border-l-2{border-left-width:2px}.border-t-4{border-top-width:4px}.border-b-4{border-bottom-width:4px}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.content-center{align-content:center}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.h-12{height:3rem}.h-24{height:6rem}.h-auto{height:auto}.m-3{margin:.75rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.mx-10{margin-left:2.5rem;margin-right:2.5rem}.my-12{margin-top:3rem;margin-bottom:3rem}.my-16{margin-top:4rem;margin-bottom:4rem}.mx-16{margin-left:4rem;margin-right:4rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.ml-2{margin-left:.5rem}.mt-4{margin-top:1rem}.mr-4{margin-right:1rem}.mb-4{margin-bottom:1rem}.ml-4{margin-left:1rem}.mt-5{margin-top:1.25rem}.mr-5{margin-right:1.25rem}.mt-6{margin-top:1.5rem}.mr-6{margin-right:1.5rem}.mb-6{margin-bottom:1.5rem}.ml-6{margin-left:1.5rem}.mt-8{margin-top:2rem}.mr-8{margin-right:2rem}.mb-8{margin-bott
|
|
|
|
</style>
|
2020-02-05 05:06:03 +01:00
|
|
|
</head>
|
2020-02-26 04:20:12 +01:00
|
|
|
<body>
|
2020-02-12 01:41:17 +01:00
|
|
|
|
2020-02-26 04:20:12 +01:00
|
|
|
<div class="bg-orange-600 flex justify-between py-12 px-12">
|
|
|
|
<div class="w-1/2">
|
|
|
|
<h1 class="text-white font-bold text-5xl">$company.name</h1>
|
|
|
|
</div>
|
|
|
|
<div class="w-1/2 flex justify-end">
|
|
|
|
<div class="w-56 flex flex-col text-white">
|
|
|
|
$entity_labels
|
|
|
|
</div>
|
|
|
|
<div class="w-32 flex flex-col text-left text-white">
|
|
|
|
$entity_details
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-05 05:06:03 +01:00
|
|
|
';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
public function body() {
|
2020-02-05 05:06:03 +01:00
|
|
|
|
|
|
|
return '
|
|
|
|
<div class="flex justify-between px-12 pt-12">
|
|
|
|
<div class="w-1/2">
|
|
|
|
$company_logo
|
|
|
|
</div>
|
|
|
|
<div class="w-1/2 flex justify-end">
|
|
|
|
<div class="w-56 flex flex-col">
|
|
|
|
$client_details
|
|
|
|
</div>
|
|
|
|
<div class="w-32">
|
|
|
|
<!-- -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
public function table_styles() {
|
2020-02-05 05:06:03 +01:00
|
|
|
return [
|
2020-02-05 11:28:56 +01:00
|
|
|
'table_header_thead_class' => "text-left text-white bg-gray-900",
|
2020-02-12 01:41:17 +01:00
|
|
|
'table_header_td_class' => "px-4 py-2",
|
|
|
|
'table_body_td_class' => "border-t border-b border-gray-900 px-4 py-4",
|
2020-02-05 05:06:03 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
public function table() {
|
2020-02-05 05:06:03 +01:00
|
|
|
|
|
|
|
return '
|
|
|
|
<div class="px-12 pt-5 pb-20">
|
|
|
|
<table class="w-full table-auto mt-8">
|
|
|
|
<thead class="text-left text-white bg-gray-900">
|
|
|
|
<tr>
|
|
|
|
$table_header
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
$table_body
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2020-02-10 10:53:02 +01:00
|
|
|
<div class="flex px-4 mt-6 w-full" style="page-break-inside: avoid;">
|
2020-02-05 05:06:03 +01:00
|
|
|
<div class="w-1/2">
|
2020-02-19 22:46:31 +01:00
|
|
|
$entity.public_notes
|
2020-02-05 05:06:03 +01:00
|
|
|
</div>
|
2020-02-10 10:53:02 +01:00
|
|
|
<div class="w-1/2 flex"">
|
2020-02-05 05:06:03 +01:00
|
|
|
<div class="w-1/2 text-right flex flex-col">
|
2020-02-06 10:35:51 +01:00
|
|
|
$total_tax_labels
|
|
|
|
$line_tax_labels
|
2020-02-05 05:06:03 +01:00
|
|
|
</div>
|
|
|
|
<div class="w-1/2 text-right flex flex-col">
|
2020-02-06 10:35:51 +01:00
|
|
|
$total_tax_values
|
|
|
|
$line_tax_values
|
2020-02-05 05:06:03 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
<div class="flex px-4 mt-4 w-full items-end mt-5" style="page-break-inside: avoid;">
|
2020-02-05 05:06:03 +01:00
|
|
|
<div class="w-1/2">
|
|
|
|
<p class="font-semibold">$terms_label</p>
|
|
|
|
$terms
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
<div class="mt-8 px-4 py-2 bg-gray-900 text-white" style="page-break-inside: avoid;">
|
2020-02-05 05:06:03 +01:00
|
|
|
<div class="w-1/2"></div>
|
|
|
|
<div class="w-auto flex justify-end">
|
|
|
|
<div class="w-56">
|
|
|
|
<p class="font-bold">$balance_due_label</p>
|
|
|
|
</div>
|
|
|
|
<p>$balance_due</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
|
2020-02-12 01:41:17 +01:00
|
|
|
public function footer() {
|
2020-02-05 05:06:03 +01:00
|
|
|
|
|
|
|
return '
|
2020-02-05 22:54:20 +01:00
|
|
|
<div class="bg-orange-600 flex justify-between py-8 px-12" style="page-break-inside: avoid;">
|
2020-02-05 05:06:03 +01:00
|
|
|
<div class="w-1/2">
|
|
|
|
<!-- // -->
|
|
|
|
</div>
|
|
|
|
<div class="w-1/2 flex justify-end">
|
|
|
|
<div class="w-56 flex flex-col text-white">
|
|
|
|
$company_details
|
|
|
|
</div>
|
|
|
|
<div class="w-32 flex flex-col text-left text-white">
|
|
|
|
$company_address
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|