From 2482b3bb97b17a06d4027cb247381e8afbc56f29 Mon Sep 17 00:00:00 2001 From: "Riley L." Date: Sun, 3 Nov 2024 20:58:57 +0100 Subject: [PATCH] add printing design for lists; add some currency --- abrechenbarkeit.lua | 20 +++++++------- style.css | 63 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 69 insertions(+), 14 deletions(-) diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua index 17e08f4..84fafc7 100755 --- a/abrechenbarkeit.lua +++ b/abrechenbarkeit.lua @@ -248,7 +248,7 @@ local function r_user(username)
- +
]], amount * type, ({ [-1] = "-", [1] = "+" })[type], amount / 100, ({ [-1] = "neg", [1] = "pos" })[type])) @@ -257,18 +257,18 @@ local function r_user(username) print("") print([[
-

Create Transaction

- +

Create 🏳️‍⚧️✊

+ - +

Buy Product

- +
]]) print("") @@ -277,7 +277,7 @@ end local function r_log(filter) return respond(200, "Abrechnungen", function() - print("") + print([[
]]) print("") for time, username, amount, pcode, pcount, comment in read_log() do if filter == nil or filter == username then @@ -293,7 +293,7 @@ local function r_log(filter) - + @@ -403,8 +403,8 @@ local function r_products() - - + + @@ -416,7 +416,7 @@ local function r_products() ]]) - print("
TimeUsernameAmountP.-BarcodeP.-CountComment
") + print([[
NamePriceBarcodeCount
]]) local pbals = product_balances() for barcode, price, name in read_products() do print(string.format([[ diff --git a/style.css b/style.css index ef7104a..b7e0f55 100644 --- a/style.css +++ b/style.css @@ -151,12 +151,14 @@ li { grid-template-columns: repeat(6, 6em); list-style-type: none; } +input.button { + place-content: center; + padding: 0.8em 0.5em; + border: none; + border-radius: 4px; +} .amount-presets > form > input { - place-content: center; - padding: 0.8em 0.5em; - border: none; - border-radius: 4px; width: 6em; margin: 1em; } @@ -181,6 +183,15 @@ input.amount-neg { background-color: rgb(84, 64, 82); } +/* amount neutral */ +.amount-ntr { + color: #04d8f4; +} + +input.amount-ntr { + background-color: #5285a8; +} + h3 { margin: 4px; margin-left: 0; @@ -230,3 +241,47 @@ tr:nth-child(2n) { background-color: #1d2832; } +input { + background-color: inherit; + color: white; +} + +input:not([type=submit]) { + border: none; + border-bottom: 1px solid #e2e2e2; +} + +@media print { + nav, .container, h1 { + display: none; + } + + table.log:before { + content: "Abrechenbarkeit Log"; + font-size: 2em; + text-decoration: underline; + } + + table.productlist:before { + content: "Produkt Liste"; + font-size: 2em; + text-decoration: underline; + } + + tr :last-child { + display: none; + } + + td { + border-bottom: 1px solid black; + } + + *, body { + background-color: white; + color: black; + } + + form { + display: none; + } +}
NamePriceBarcodeCount