PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.2.0
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.2.0
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
easy-invoice / templates / quote-templates / minimalist.php

minimalist.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.2.0, at templates/quote-templates/minimalist.php

506 lines 15.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Minimalist Quote Template - Clean & Simple Design
4 * Minimalist, clean, and simple quote template
5 */
6
7 $text_settings = \EasyInvoice\Helpers\TemplateTextHelper::getQuoteTextSettings();
8 $company_info = \EasyInvoice\Helpers\TemplateTextHelper::getCompanyInfo();
9 // Ensure a formatter is available
10 if (!isset($formatter) || !$formatter) {
11 $formatter = new \EasyInvoice\Helpers\QuoteFormatter($quote ?? null);
12 }
13 ?>
14 <style>
15 /* Minimalist Quote Template - Clean & Simple Design */
16 :root {
17 --primary-color: #374151;
18 --primary-light: #6b7280;
19 --primary-dark: #1f2937;
20 --secondary-color: #9ca3af;
21 --accent-color: #3b82f6;
22 --success-color: #10b981;
23 --warning-color: #f59e0b;
24 --error-color: #ef4444;
25 --text-primary: #111827;
26 --text-secondary: #6b7280;
27 --text-muted: #9ca3af;
28 --border-color: #d1d5db;
29 --border-light: #e5e7eb;
30 --background-primary: #ffffff;
31 --background-secondary: #f9fafb;
32 --background-accent: #f3f4f6;
33
34 --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
35 --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
36
37 --font-size-xs: 0.75rem;
38 --font-size-sm: 0.875rem;
39 --font-size-base: 1rem;
40 --font-size-lg: 1.125rem;
41 --font-size-xl: 1.25rem;
42 --font-size-2xl: 1.5rem;
43 --font-size-3xl: 1.875rem;
44 --font-size-4xl: 2.25rem;
45
46 --spacing-1: 0.25rem;
47 --spacing-2: 0.5rem;
48 --spacing-3: 0.75rem;
49 --spacing-4: 1rem;
50 --spacing-5: 1.25rem;
51 --spacing-6: 1.5rem;
52 --spacing-8: 2rem;
53 --spacing-10: 2.5rem;
54 --spacing-12: 3rem;
55 --spacing-16: 4rem;
56 --spacing-20: 5rem;
57
58 --radius-sm: 0.25rem;
59 --radius-md: 0.375rem;
60 --radius-lg: 0.5rem;
61 --radius-xl: 0.75rem;
62 --radius-2xl: 1rem;
63
64 --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
65 --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
66 --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
67 --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
68 }
69
70 .template-minimalist {
71 font-family: var(--font-family);
72 background: var(--background-primary);
73 color: var(--text-primary);
74 max-width: 800px;
75 margin: 0 auto;
76 padding: var(--spacing-8);
77 line-height: 1.6;
78 }
79
80 /* Header Section */
81 .template-minimalist .quote-header {
82 display: flex;
83 justify-content: space-between;
84 align-items: flex-start;
85 margin-bottom: var(--spacing-12);
86 padding-bottom: var(--spacing-8);
87 border-bottom: 1px solid var(--border-light);
88 }
89
90 .template-minimalist .company-info {
91 flex: 1;
92 }
93
94 .template-minimalist .company-logo {
95 margin-bottom: 0;
96 }
97
98 .template-minimalist .logo-image {
99 max-height: 60px;
100 max-width: 200px;
101 object-fit: contain;
102 filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
103 }
104
105 .template-minimalist .company-name {
106 font-family: var(--font-family-heading);
107 font-size: var(--font-size-2xl);
108 font-weight: 700;
109 color: var(--text-primary);
110 margin-bottom: var(--spacing-3);
111 line-height: 1.2;
112 }
113
114 .template-minimalist .company-details {
115 color: var(--text-secondary);
116 font-size: var(--font-size-sm);
117 line-height: 1.5;
118 }
119
120 .template-minimalist .quote-meta {
121 text-align: right;
122 min-width: 200px;
123 }
124
125 .template-minimalist .quote-title {
126 font-family: var(--font-family-heading);
127 font-size: var(--font-size-xl);
128 font-weight: 600;
129 color: var(--text-primary);
130 margin-bottom: var(--spacing-4);
131 }
132
133 .template-minimalist .meta-item {
134 display: flex;
135 justify-content: space-between;
136 align-items: center;
137 margin-bottom: var(--spacing-2);
138 padding-bottom: var(--spacing-2);
139 border-bottom: 1px solid var(--border-light);
140 }
141
142 .template-minimalist .meta-item:last-child {
143 margin-bottom: 0;
144 padding-bottom: 0;
145 border-bottom: none;
146 }
147
148 .template-minimalist .meta-label {
149 font-size: var(--font-size-sm);
150 color: var(--text-secondary);
151 font-weight: 400;
152 }
153
154 .template-minimalist .meta-value {
155 font-size: var(--font-size-sm);
156 color: var(--text-primary);
157 font-weight: 500;
158 }
159
160 /* Address Section */
161 .template-minimalist .address-section {
162 display: grid;
163 grid-template-columns: 1fr 1fr;
164 gap: var(--spacing-8);
165 margin-bottom: var(--spacing-12);
166 }
167
168 .template-minimalist .address-block h2 {
169 font-family: var(--font-family-heading);
170 font-size: var(--font-size-base);
171 font-weight: 600;
172 color: var(--text-primary);
173 margin-bottom: var(--spacing-3);
174 }
175
176 .template-minimalist .client-name {
177 font-weight: 600;
178 color: var(--text-primary);
179 font-size: var(--font-size-base);
180 margin-bottom: var(--spacing-2);
181 }
182
183 .template-minimalist .address-content {
184 color: var(--text-secondary);
185 font-size: var(--font-size-sm);
186 line-height: 1.5;
187 }
188
189 /* Quote Items Table */
190 .template-minimalist .quote-items {
191 width: 100%;
192 border-collapse: collapse;
193 margin-bottom: var(--spacing-12);
194 background: var(--background-primary);
195 border: 1px solid var(--border-color);
196 }
197
198 .template-minimalist .quote-items th {
199 background: var(--background-secondary);
200 color: var(--text-primary);
201 font-weight: 600;
202 text-align: left;
203 padding: var(--spacing-3) var(--spacing-4);
204 font-size: var(--font-size-sm);
205 border-bottom: 1px solid var(--border-color);
206 }
207
208 .template-minimalist .quote-items td {
209 padding: var(--spacing-3) var(--spacing-4);
210 border-bottom: 1px solid var(--border-light);
211 vertical-align: top;
212 }
213
214 .template-minimalist .quote-items tr:last-child td {
215 border-bottom: none;
216 }
217
218 .template-minimalist .item-name .item-title {
219 font-weight: 500;
220 color: var(--text-primary);
221 margin-bottom: var(--spacing-1);
222 }
223
224 .template-minimalist .item-description {
225 color: var(--text-muted);
226 font-size: var(--font-size-sm);
227 line-height: 1.4;
228 font-weight: normal;
229 }
230
231 .template-minimalist .item-quantity,
232 .template-minimalist .item-price,
233 .template-minimalist .item-total {
234 text-align: right;
235 font-weight: 400;
236 color: var(--text-primary);
237 }
238
239 /* Quote Totals */
240 .template-minimalist .quote-totals {
241 margin-left: auto;
242 width: 300px;
243 background: var(--background-secondary);
244 padding: var(--spacing-6);
245 border: 1px solid var(--border-color);
246 }
247
248 .template-minimalist .quote-total-row {
249 display: flex;
250 justify-content: space-between;
251 align-items: center;
252 padding: var(--spacing-2) 0;
253 border-bottom: 1px solid var(--border-light);
254 }
255
256 .template-minimalist .quote-total-row:last-child {
257 border-bottom: none;
258 }
259
260 .template-minimalist .quote-total-label {
261 font-weight: 400;
262 color: var(--text-secondary);
263 }
264
265 .template-minimalist .quote-total-value {
266 font-weight: 600;
267 color: var(--text-primary);
268 }
269
270 .template-minimalist .quote-grand-total {
271 font-size: var(--font-size-lg);
272 font-weight: 700;
273 color: var(--text-primary);
274 border-top: 2px solid var(--border-color);
275 padding-top: var(--spacing-3);
276 margin-top: var(--spacing-3);
277 }
278
279 /* Notes Section */
280 .template-minimalist .quote-notes {
281 margin-top: var(--spacing-8);
282 padding: var(--spacing-6);
283 background: var(--background-secondary);
284 border-radius: var(--radius-lg);
285 border: 1px solid var(--border-color);
286 }
287
288 .template-minimalist .quote-notes h3 {
289 font-family: var(--font-family-heading);
290 font-size: var(--font-size-lg);
291 font-weight: 600;
292 color: var(--text-primary);
293 margin-bottom: var(--spacing-3);
294 border-bottom: 1px solid var(--border-color);
295 padding-bottom: var(--spacing-2);
296 }
297
298 .template-minimalist .notes-content {
299 color: var(--text-secondary);
300 font-size: var(--font-size-sm);
301 line-height: 1.6;
302 }
303
304 .template-minimalist .quote-terms {
305 margin-top: var(--spacing-8);
306 padding: var(--spacing-6);
307 background: var(--background-secondary);
308 border-radius: var(--radius-lg);
309 border: 1px solid var(--border-color);
310 }
311
312 .template-minimalist .quote-terms h3 {
313 font-family: var(--font-family-heading);
314 font-size: var(--font-size-lg);
315 font-weight: 600;
316 color: var(--text-primary);
317 margin-bottom: var(--spacing-3);
318 border-bottom: 1px solid var(--border-color);
319 padding-bottom: var(--spacing-2);
320 }
321
322 .template-minimalist .terms-content {
323 color: var(--text-secondary);
324 font-size: var(--font-size-sm);
325 line-height: 1.6;
326 }
327
328 .template-minimalist .quote-footer {
329 margin-top: var(--spacing-8);
330 padding-top: var(--spacing-6);
331 border-top: 2px solid var(--border-light);
332 text-align: center;
333 color: var(--text-secondary);
334 font-size: var(--font-size-sm);
335 }
336
337 /* Footer */
338 .template-minimalist .quote-footer p {
339 margin: 0;
340 color: var(--text-secondary);
341 font-size: var(--font-size-sm);
342 }
343
344 /* Responsive Design */
345 @media (max-width: 768px) {
346 .template-minimalist {
347 padding: var(--spacing-4);
348 }
349
350 .template-minimalist .quote-header {
351 flex-direction: column;
352 gap: var(--spacing-6);
353 }
354
355 .template-minimalist .quote-meta {
356 text-align: left;
357 min-width: auto;
358 }
359
360 .template-minimalist .address-section {
361 grid-template-columns: 1fr;
362 gap: var(--spacing-6);
363 }
364
365 .template-minimalist .quote-totals {
366 width: 100%;
367 }
368 }
369 </style>
370
371 <div class="template template-minimalist">
372 <!-- Header -->
373 <div class="quote-header">
374 <div class="company-info">
375 <div class="company-logo">
376 <?php if (!empty($company_info['logo'])): ?>
377 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
378 <?php endif; ?>
379 </div>
380 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
381 <div class="company-details">
382 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
383 </div>
384 </div>
385
386 <div class="quote-meta">
387 <div class="quote-title"><?php echo esc_html($quote->getTitle() ?: __('Quote', 'easy-invoice')); ?></div>
388 <div class="meta-item">
389 <span class="meta-label"><?php echo esc_html($text_settings['quote_number']); ?></span>
390 <span class="meta-value"><?php echo esc_html($quote->getNumber()); ?></span>
391 </div>
392 <div class="meta-item">
393 <span class="meta-label"><?php echo esc_html($text_settings['quote_date']); ?></span>
394 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($quote->getIssueDate())); ?></span>
395 </div>
396 <div class="meta-item">
397 <span class="meta-label"><?php echo esc_html($text_settings['valid_until']); ?></span>
398 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($quote->getExpiryDate())); ?></span>
399 </div>
400 </div>
401 </div>
402
403 <!-- Address Section -->
404 <div class="address-section">
405 <div class="address-block">
406 <h2><?php echo esc_html($text_settings['to']); ?></h2>
407 <div class="address-content">
408 <div class="client-name"><?php echo esc_html($quote->getCustomerName()); ?></div>
409 <?php if ($quote->getCustomerAddress()): ?>
410 <?php echo nl2br(esc_html($quote->getCustomerAddress())); ?><br>
411 <?php endif; ?>
412 <?php if ($quote->getCustomerEmail()): ?>
413 <?php echo esc_html($quote->getCustomerEmail()); ?><br>
414 <?php endif; ?>
415 </div>
416 </div>
417 </div>
418
419 <!-- Quote Description -->
420 <?php if ($quote->getDescription()): ?>
421 <div class="quote-description" style="margin-bottom: 1.5rem;">
422 <div class="description-content" style="color:#6b7280; line-height:1.6; font-size:0.875rem; white-space:pre-wrap;">
423 <?php echo wp_kses_post($quote->getDescription()); ?>
424 </div>
425 </div>
426 <?php endif; ?>
427
428 <!-- Quote Items -->
429 <table class="quote-items">
430 <thead>
431 <tr>
432 <th><?php echo esc_html($text_settings['service']); ?></th>
433 <th><?php echo esc_html($text_settings['qty']); ?></th>
434 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
435 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowQuoteAdjustField()): ?>
436 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
437 <?php endif; ?>
438 <th><?php echo esc_html($text_settings['total']); ?></th>
439 </tr>
440 </thead>
441 <tbody>
442 <?php foreach ($quote->getItems() as $item): ?>
443 <tr>
444 <td class="item-name">
445 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
446 <?php if ($item->getDescription()): ?>
447 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
448 <?php endif; ?>
449 </td>
450 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
451 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
452 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowQuoteAdjustField()): ?>
453 <td class="item-adjust"><?php
454 $adjust_percentage = $item->getAdjustPercentage();
455 if ($adjust_percentage != 0) {
456 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
457 } else {
458 echo esc_html__('', 'easy-invoice');
459 }
460 ?></td>
461 <?php endif; ?>
462 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
463 </tr>
464 <?php endforeach; ?>
465 </tbody>
466 </table>
467
468 <!-- Quote Totals -->
469 <div class="quote-totals">
470 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($quote, $text_settings, $formatter, 'quote'); ?>
471 </div>
472
473 <!-- Notes -->
474 <?php if ($quote->getNotes()): ?>
475 <div class="quote-notes">
476 <h3><?php _e('Notes:', 'easy-invoice'); ?></h3>
477 <div class="notes-content">
478 <?php echo wp_kses_post($quote->getNotes() ?: ''); ?>
479 </div>
480 </div>
481 <?php endif; ?>
482
483 <!-- Terms and Conditions -->
484 <?php
485 $terms_conditions = $quote->getTerms() ?: \EasyInvoice\Controllers\SettingsController::getQuoteTermsConditions();
486 if ($terms_conditions):
487 ?>
488 <div class="quote-terms">
489 <h3><?php _e('Terms & Conditions:', 'easy-invoice'); ?></h3>
490 <div class="terms-content">
491 <?php echo wp_kses_post($terms_conditions); ?>
492 </div>
493 </div>
494 <?php endif; ?>
495
496 <!-- Footer -->
497 <div class="quote-footer">
498 <?php
499 $footer_text = $quote->getFooterText();
500 if (!$footer_text) {
501 $footer_text = \EasyInvoice\Controllers\SettingsController::getQuoteFooterText();
502 }
503 ?>
504 <p><?php echo wp_kses_post($footer_text); ?></p>
505 </div>
506 </div>