From 8b7c0176cff6258f28e94aa63763743cbd765650 Mon Sep 17 00:00:00 2001 From: Kilian Saffran Date: Thu, 11 Apr 2019 09:03:04 +0200 Subject: [PATCH] receipt and ticket --- package-lock.json | 32 +- package.json | 12 +- server/htdocs/receipt.html | 94 +++++ server/htdocs/ticket.html | 72 ++++ server/htdocs/vendor/normalize/normalize.css | 349 +++++++++++++++++++ server/htdocs/vendor/paper-css/paper.css | 54 +++ server/htdocs/vendor/paper-css/paper.min.css | 1 + 7 files changed, 592 insertions(+), 22 deletions(-) create mode 100644 server/htdocs/receipt.html create mode 100644 server/htdocs/ticket.html create mode 100644 server/htdocs/vendor/normalize/normalize.css create mode 100644 server/htdocs/vendor/paper-css/paper.css create mode 100644 server/htdocs/vendor/paper-css/paper.min.css diff --git a/package-lock.json b/package-lock.json index eecf1f7..cb09a18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,8 +7,7 @@ "@fortawesome/fontawesome-free": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.7.2.tgz", - "integrity": "sha512-Ha4HshKdCVKgu4TVCtG8XyPPYdzTzNW4/fvPnn+LT7AosRABryhlRv4cc4+o84dgpvVJN9reN7jo/c+nYujFug==", - "dev": true + "integrity": "sha512-Ha4HshKdCVKgu4TVCtG8XyPPYdzTzNW4/fvPnn+LT7AosRABryhlRv4cc4+o84dgpvVJN9reN7jo/c+nYujFug==" }, "@types/node": { "version": "10.12.26", @@ -133,14 +132,12 @@ "bootstrap": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz", - "integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==", - "dev": true + "integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==" }, "bootstrap-table": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.13.4.tgz", - "integrity": "sha512-033fnjYKgFZO98PL6E0JAqmwTJ2isoQxJBFU6BwEbIMmRZETk5iDoPGgV+7wORt4c+yABNWj8EnbFBWAHz5YPw==", - "dev": true + "integrity": "sha512-033fnjYKgFZO98PL6E0JAqmwTJ2isoQxJBFU6BwEbIMmRZETk5iDoPGgV+7wORt4c+yABNWj8EnbFBWAHz5YPw==" }, "brace-expansion": { "version": "1.1.11", @@ -894,8 +891,7 @@ "jquery": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", - "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==", - "dev": true + "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" }, "jsbn": { "version": "0.1.1", @@ -1070,6 +1066,12 @@ "validate-npm-package-license": "^3.0.1" } }, + "normalize.css": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz", + "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==", + "dev": true + }, "nugget": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", @@ -1165,6 +1167,11 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, + "paper-css": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/paper-css/-/paper-css-0.4.1.tgz", + "integrity": "sha512-7gOjG4Hzy/ZGG/+tn8weFtSHWtQvSpkeJpFsH0nLqjXiH50zFyhajHggLEZd0hpCoYBhg5pRH5Lrg9p3EnDl2A==" + }, "parse-author": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-author/-/parse-author-2.0.0.tgz", @@ -1259,8 +1266,7 @@ "popper.js": { "version": "1.14.7", "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.7.tgz", - "integrity": "sha512-4q1hNvoUre/8srWsH7hnoSJ5xVmIL4qgz+s4qf2TnJIMyZFUFMGH+9vE7mXynAlHSZ/NdTmmow86muD0myUkVQ==", - "dev": true + "integrity": "sha512-4q1hNvoUre/8srWsH7hnoSJ5xVmIL4qgz+s4qf2TnJIMyZFUFMGH+9vE7mXynAlHSZ/NdTmmow86muD0myUkVQ==" }, "pretty-bytes": { "version": "1.0.4", @@ -1605,14 +1611,12 @@ "tinymce": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-5.0.1.tgz", - "integrity": "sha512-bAKaEEtRd4BsXu6ySYflhO83Cg844LHrplcaWalbdeZjFXwkodtv3G6H1x2r6ThaOdyE4+otJtxPYlfzwyKDdw==", - "dev": true + "integrity": "sha512-bAKaEEtRd4BsXu6ySYflhO83Cg844LHrplcaWalbdeZjFXwkodtv3G6H1x2r6ThaOdyE4+otJtxPYlfzwyKDdw==" }, "tinymce-i18n": { "version": "19.2.11", "resolved": "https://registry.npmjs.org/tinymce-i18n/-/tinymce-i18n-19.2.11.tgz", - "integrity": "sha512-mr4MZx8XYMR7Ig/sShKILuhZj8jj89gy2QBMV0eNByOqtKUdkBLoY8SZDOwQmKsbvvFOcdWsUXyuPv6vllHj0g==", - "dev": true + "integrity": "sha512-mr4MZx8XYMR7Ig/sShKILuhZj8jj89gy2QBMV0eNByOqtKUdkBLoY8SZDOwQmKsbvvFOcdWsUXyuPv6vllHj0g==" }, "tmp": { "version": "0.0.33", diff --git a/package.json b/package.json index b9e7e5f..88a0497 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "electron .", "test": "echo \"Error: no test specified\" && exit 1", "package-win": "electron-packager . cashbox --overwrite --asar --platform=win32 --arch=x64 --out=release-builds --version-string.CompanyName=DKS --version-string.FileDescription=DKS --version-string.ProductName=CashBox --icon=img/cashbox_KhG_icon.ico", -"build": "npm run pack:osx && npm run pack:win32 && npm run pack:win64" + "build": "npm run pack:osx && npm run pack:win32 && npm run pack:win64" }, "repository": { "type": "git", @@ -28,16 +28,12 @@ "popper.js": "^1.14.7", "tinymce": "^5.0.1", "tinymce-i18n": "^19.2.11" + }, "devDependencies": { - "@fortawesome/fontawesome-free": "^5.7.2", - "bootstrap": "^4.3.1", - "bootstrap-table": "^1.13.4", "electron": "^4.0.5", "electron-packager": "^13.1.1", - "jquery": "^3.3.1", - "popper.js": "^1.14.7", - "tinymce": "^5.0.1", - "tinymce-i18n": "^19.2.11" + "paper-css": "^0.4.1", + "normalize.css": "^8.0.1" } } diff --git a/server/htdocs/receipt.html b/server/htdocs/receipt.html new file mode 100644 index 0000000..6a00253 --- /dev/null +++ b/server/htdocs/receipt.html @@ -0,0 +1,94 @@ + + + + + + Receipt + + + + + + + + + + + + + + + + + + + + + + +
+ +

Hand an Hand fir Afrika

+

Drivers Day Hellange 2019

+

Rechnung

+

Tisch: Table 2

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Anz.ProduktPreis
1Produkt Name0,00 €
1Produkt Name0,00 €
1Produkt Name0,00 €
1Produkt Name0,00 €
1Produkt Name0,00 €
 Total:0,00 €
+ +

Bezahlt-Art: Bar
+ DD.MM.YYYY HH:MM
+ 550e8400-e29b-11d4-a716-446655440000

+
+ + + + \ No newline at end of file diff --git a/server/htdocs/ticket.html b/server/htdocs/ticket.html new file mode 100644 index 0000000..384fbf8 --- /dev/null +++ b/server/htdocs/ticket.html @@ -0,0 +1,72 @@ + + + + + + Ticket + + + + + + + + + + + + +
+

Hand an Hand fir Afrika

+

Drivers Day Hellange 2019

+

Ticket

+
+ + +
1Produkt Name
+ +
+

+ DD.MM.YYYY HH:MM
+ 550e8400-e29b-11d4-a716-446655440000

+
+
+

Hand an Hand fir Afrika

+

Drivers Day Hellange 2019

+

Ticket

+
+ + +
1Produkt Name
+ +
+

+ DD.MM.YYYY HH:MM
+ 550e8400-e29b-11d4-a716-446655440000

+
+ + + \ No newline at end of file diff --git a/server/htdocs/vendor/normalize/normalize.css b/server/htdocs/vendor/normalize/normalize.css new file mode 100644 index 0000000..192eb9c --- /dev/null +++ b/server/htdocs/vendor/normalize/normalize.css @@ -0,0 +1,349 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/server/htdocs/vendor/paper-css/paper.css b/server/htdocs/vendor/paper-css/paper.css new file mode 100644 index 0000000..a3a54c1 --- /dev/null +++ b/server/htdocs/vendor/paper-css/paper.css @@ -0,0 +1,54 @@ +@page { margin: 0 } +body { margin: 0 } +.sheet { + margin: 0; + overflow: hidden; + position: relative; + box-sizing: border-box; + page-break-after: always; +} + +/** Paper sizes **/ +body.A3 .sheet { width: 297mm; height: 419mm } +body.A3.landscape .sheet { width: 420mm; height: 296mm } +body.A4 .sheet { width: 210mm; height: 296mm } +body.A4.landscape .sheet { width: 297mm; height: 209mm } +body.A5 .sheet { width: 148mm; height: 209mm } +body.A5.landscape .sheet { width: 210mm; height: 147mm } +body.letter .sheet { width: 216mm; height: 279mm } +body.letter.landscape .sheet { width: 280mm; height: 215mm } +body.legal .sheet { width: 216mm; height: 356mm } +body.legal.landscape .sheet { width: 357mm; height: 215mm } +body.A7 .sheet { width: 74mm; } +body.A7.landscape .sheet { width: 105mm; } + +/** Padding area **/ +.sheet.padding-2mm { padding: 2mm } +.sheet.padding-5mm { padding: 5mm } +.sheet.padding-10mm { padding: 10mm } +.sheet.padding-15mm { padding: 15mm } +.sheet.padding-20mm { padding: 20mm } +.sheet.padding-25mm { padding: 25mm } + +/** For screen preview **/ +@media screen { + body { background: #e0e0e0 } + .sheet { + background: white; + box-shadow: 0 .5mm 2mm rgba(0,0,0,.3); + margin: 5mm auto; + } +} + +/** Fix for Chrome issue #273306 **/ +@media print { + body.A3.landscape { width: 420mm } + body.A3, body.A4.landscape { width: 297mm } + body.A4, body.A5.landscape { width: 210mm } + body.A5 { width: 148mm } + body.letter, body.legal { width: 216mm } + body.letter.landscape { width: 280mm } + body.legal.landscape { width: 357mm } + body.A7 { width: 74mm } + body.A7.landscape { width: 105mm } +} diff --git a/server/htdocs/vendor/paper-css/paper.min.css b/server/htdocs/vendor/paper-css/paper.min.css new file mode 100644 index 0000000..265a771 --- /dev/null +++ b/server/htdocs/vendor/paper-css/paper.min.css @@ -0,0 +1 @@ +@page{margin:0}body{margin:0}.sheet{margin:0;overflow:hidden;position:relative;box-sizing:border-box;page-break-after:always}body.A3 .sheet{width:297mm;height:419mm}body.A3.landscape .sheet{width:420mm;height:296mm}body.A4 .sheet{width:210mm;height:296mm}body.A4.landscape .sheet{width:297mm;height:209mm}body.A5 .sheet{width:148mm;height:209mm}body.A5.landscape .sheet{width:210mm;height:147mm}body.letter .sheet{width:216mm;height:279mm}body.letter.landscape .sheet{width:280mm;height:215mm}body.legal .sheet{width:216mm;height:356mm}body.legal.landscape .sheet{width:357mm;height:215mm}.sheet.padding-10mm{padding:10mm}.sheet.padding-15mm{padding:15mm}.sheet.padding-20mm{padding:20mm}.sheet.padding-25mm{padding:25mm}@media screen{body{background:#e0e0e0}.sheet{background:#fff;box-shadow:0 .5mm 2mm rgba(0,0,0,.3);margin:5mm auto}}@media print{body.A3.landscape{width:420mm}body.A3,body.A4.landscape{width:297mm}body.A4,body.A5.landscape{width:210mm}body.A5{width:148mm}body.legal,body.letter{width:216mm}body.letter.landscape{width:280mm}body.legal.landscape{width:357mm}} \ No newline at end of file -- 2.39.5