@cenk1cenk2/md-printer 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/index.js +186 -98
- package/dist/constants/file.constants.js +32 -5
- package/dist/constants/index.js +51 -17
- package/dist/constants/template.constants.js +42 -11
- package/dist/hooks/init.hook.js +35 -5
- package/dist/hooks/not-found.hook.js +28 -4
- package/dist/hooks/prerun.hook.js +28 -4
- package/dist/interfaces/commands/index.interface.js +17 -2
- package/dist/interfaces/commands/index.js +16 -16
- package/dist/templates/logo.template.js +29 -5
- package/package.json +25 -22
- package/templates/privat-rechnung/footer.html +26 -0
- package/templates/privat-rechnung/header.html +16 -0
- package/templates/privat-rechnung/main.css +1330 -0
- package/templates/privat-rechnung/settings.json +9 -0
- package/templates/privat-rechnung/tailwind.config.js +74 -0
- package/templates/privat-rechnung/tailwind.css +13 -0
- package/templates/privat-rechnung/template.html.j2 +130 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const colors = require('theme-colors').getColors
|
|
2
|
+
|
|
3
|
+
/** @type {import("tailwindcss").Config} */
|
|
4
|
+
module.exports = {
|
|
5
|
+
content: [ './template.html.j2' ],
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {
|
|
8
|
+
fontFamily: {
|
|
9
|
+
sans: [ 'Montserrat' ],
|
|
10
|
+
serif: [ 'Montserrat' ]
|
|
11
|
+
},
|
|
12
|
+
colors: {
|
|
13
|
+
primary: colors('#cd0043')
|
|
14
|
+
},
|
|
15
|
+
typography: (theme) => ({
|
|
16
|
+
css: {
|
|
17
|
+
a: {
|
|
18
|
+
color: theme('colors.primary.500'),
|
|
19
|
+
textDecoration: 'none'
|
|
20
|
+
},
|
|
21
|
+
h1: {
|
|
22
|
+
fontWeight: 700,
|
|
23
|
+
paddingTop: theme('padding.0.75'),
|
|
24
|
+
paddingBottom: theme('padding.0.75'),
|
|
25
|
+
marginBottom: 0,
|
|
26
|
+
marginTop: 0,
|
|
27
|
+
borderWidth: 0
|
|
28
|
+
},
|
|
29
|
+
h2: {
|
|
30
|
+
paddingTop: theme('padding.0.5'),
|
|
31
|
+
paddingBottom: theme('padding.0.5'),
|
|
32
|
+
marginBottom: 0,
|
|
33
|
+
marginTop: 0,
|
|
34
|
+
borderWidth: 0
|
|
35
|
+
},
|
|
36
|
+
h3: {
|
|
37
|
+
paddingTop: theme('padding.0.25'),
|
|
38
|
+
paddingBottom: theme('padding.0.25'),
|
|
39
|
+
marginBottom: 0,
|
|
40
|
+
marginTop: 0,
|
|
41
|
+
borderWidth: 0
|
|
42
|
+
},
|
|
43
|
+
blockquote: {
|
|
44
|
+
fontWeight: 400,
|
|
45
|
+
color: theme('colors.gray.600'),
|
|
46
|
+
fontStyle: 'normal',
|
|
47
|
+
quotes: '"\\201C""\\201D""\\2018""\\2019"'
|
|
48
|
+
},
|
|
49
|
+
'blockquote p:first-of-type::before': {
|
|
50
|
+
content: ''
|
|
51
|
+
},
|
|
52
|
+
'blockquote p:last-of-type::after': {
|
|
53
|
+
content: ''
|
|
54
|
+
},
|
|
55
|
+
'ul > li': {
|
|
56
|
+
paddingLeft: '1em',
|
|
57
|
+
textAlign: 'left'
|
|
58
|
+
},
|
|
59
|
+
'ol > li': {
|
|
60
|
+
paddingLeft: '1em',
|
|
61
|
+
textAlign: 'left'
|
|
62
|
+
},
|
|
63
|
+
'ol > li::before': {
|
|
64
|
+
top: 'calc(0.875em - 0.1em)'
|
|
65
|
+
},
|
|
66
|
+
'ul > li::before': {
|
|
67
|
+
top: 'calc(0.875em - 0.1em)'
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
plugins: [ require('@tailwindcss/forms'), require('@tailwindcss/typography') ]
|
|
74
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>Document</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div class="max-w-full leading-tight prose">
|
|
11
|
+
<h1 class="mb-2 text-center">Privatrechnung</h1>
|
|
12
|
+
<div class="text-center">
|
|
13
|
+
<p class="p-0 m-0 font-bold">Rechnungsnummer</p>
|
|
14
|
+
<p class="p-0 m-0 font-bold">{{ id }}</p>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="grid grid-cols-2">
|
|
17
|
+
<div class="grid-cols-1">
|
|
18
|
+
<div>
|
|
19
|
+
<h4 class="">Absender</h4>
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<p class="p-0 my-2 font-semibold">{{ sender.name }}</p>
|
|
23
|
+
{% if sender.phone %}
|
|
24
|
+
<p class="p-0 m-0 mb-2">{{ sender.phone }}</p>
|
|
25
|
+
{% endif %}
|
|
26
|
+
<p class="p-0 m-0">{{ sender.address }}</p>
|
|
27
|
+
<p class="p-0 m-0">{{ sender.postcode }}</p>
|
|
28
|
+
<p class="p-0 m-0">{{ sender.location }}</p>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="grid-cols-1 text-right">
|
|
32
|
+
<div>
|
|
33
|
+
<h4 class="">Empfänger</h4>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="leading-tight">
|
|
36
|
+
<p class="p-0 my-2 font-semibold">{{ receiver.name }}</p>
|
|
37
|
+
{% if receiver.phone %}
|
|
38
|
+
<p class="p-0 m-0 mb-2">{{ receiver.phone }}</p>
|
|
39
|
+
{% endif %}
|
|
40
|
+
<p class="p-0 m-0">{{ receiver.address }}</p>
|
|
41
|
+
<p class="p-0 m-0">{{ receiver.postcode }}</p>
|
|
42
|
+
<p class="p-0 m-0">{{ receiver.location }}</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div>
|
|
47
|
+
<h4>Dies ist eine Privatrechnung über eine nicht gewerbliche Tätigkeit. Umsatzsteuer wird daher nicht in Rechnung gestellt.</h4>
|
|
48
|
+
<table class="w-full rounded-lg border-gray-200 table-fixed">
|
|
49
|
+
<thead class="border-b-2 border-primary-500">
|
|
50
|
+
<tr class="bg-gray-200">
|
|
51
|
+
<th class="px-2 w-full">
|
|
52
|
+
Leistung
|
|
53
|
+
</th>
|
|
54
|
+
<th class="px-8">
|
|
55
|
+
Menge
|
|
56
|
+
</th>
|
|
57
|
+
<th class="px-4">
|
|
58
|
+
Einzelpreis
|
|
59
|
+
</th>
|
|
60
|
+
<th class="px-4">
|
|
61
|
+
Gesamtpreis
|
|
62
|
+
</th>
|
|
63
|
+
</tr>
|
|
64
|
+
</thead>
|
|
65
|
+
<tbody>
|
|
66
|
+
{% set sum = 0 %}
|
|
67
|
+
{% for item in items %}
|
|
68
|
+
<tr class="even:bg-gray-50">
|
|
69
|
+
<td class="px-2">{{ item.description }}</td>
|
|
70
|
+
<td class="text-center">{{ item.quantity }} {{ item.type }}</td>
|
|
71
|
+
<td class="text-center">{{ item.price }}{{ currency }}</td>
|
|
72
|
+
<td class="font-semibold text-center">{{ item.quantity * item.price }}{{ currency }}</td>
|
|
73
|
+
</tr>
|
|
74
|
+
{% set sum = sum + item.quantity * item.price %}
|
|
75
|
+
{% endfor %}
|
|
76
|
+
</tbody>
|
|
77
|
+
<tfoot class="text-black border-t-2 border-primary-500">
|
|
78
|
+
<tr class="border-0 !bg-gray-200">
|
|
79
|
+
<td></td>
|
|
80
|
+
<td></td>
|
|
81
|
+
<th class="text-center">Gesamt</th>
|
|
82
|
+
<td class="font-bold text-center text-primary-500">{{ sum }}{{ currency }}</td>
|
|
83
|
+
</tr>
|
|
84
|
+
</tfoot>
|
|
85
|
+
</table>
|
|
86
|
+
</div>
|
|
87
|
+
<h3>Anmerkung</h3>
|
|
88
|
+
<div class="py-2 px-4 mt-0 w-full rounded-lg border-2 border-gray-200">{{ content }}</div>
|
|
89
|
+
<h3>Zahlungsdaten</h3>
|
|
90
|
+
<div>
|
|
91
|
+
<table class="mt-0 w-full rounded-lg border-gray-200 table-fixed">
|
|
92
|
+
<thead class="border-b-2 border-gray-500">
|
|
93
|
+
<tr class="text-center bg-gray-200">
|
|
94
|
+
<th class="px-24">
|
|
95
|
+
Name
|
|
96
|
+
</th>
|
|
97
|
+
<th class="px-24">
|
|
98
|
+
Bank
|
|
99
|
+
</th>
|
|
100
|
+
<th class="px-12">
|
|
101
|
+
BIC
|
|
102
|
+
</th>
|
|
103
|
+
<th class="w-full">
|
|
104
|
+
IBAN
|
|
105
|
+
</th>
|
|
106
|
+
</tr>
|
|
107
|
+
</thead>
|
|
108
|
+
<tfoot class="text-black border-t-2 border-primary-500">
|
|
109
|
+
<tr class="border-0 !bg-gray-100 font-semibold text-center">
|
|
110
|
+
<td>{{ payment.name }}</td>
|
|
111
|
+
<td>{{ payment.bank }}</td>
|
|
112
|
+
<td>{{ payment.bic }}</td>
|
|
113
|
+
<td>{{ payment.iban }}</td>
|
|
114
|
+
</tr>
|
|
115
|
+
</tfoot>
|
|
116
|
+
</table>
|
|
117
|
+
</div>
|
|
118
|
+
<hr />
|
|
119
|
+
<div class="grid grid-cols-2 font-semibold">
|
|
120
|
+
<div class="flex flex-row items-center text-center">
|
|
121
|
+
<div class="w-full">
|
|
122
|
+
<p class="p-0 m-0">{{ location }}</p>
|
|
123
|
+
<p class="p-0 m-0">{{ date }}</p>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="p-20 text-center rounded-lg border-2 border-gray-200">Unterschrift</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</body>
|
|
130
|
+
</html>
|