diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-11-26 11:51:23 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-11-26 11:51:23 +0100 |
commit | 7bfd13f0886548dcd9a414c702144429fb117b04 (patch) | |
tree | 46f99d218992771fda72dd6d6c26da3398f3bf11 | |
parent | 5d55842c465710c910735bb6a55fcb42f910984e (diff) |
update commit
-rw-r--r-- | Justfile | 2 | ||||
-rw-r--r-- | index.php | 30 | ||||
-rw-r--r-- | mtg-pdf.php | 2 |
3 files changed, 28 insertions, 6 deletions
@@ -1,2 +1,2 @@ generate deck: - DECKLIST="{{deck}}" docker compose run php + DECKLIST="{{deck}}" docker compose run cli @@ -6,9 +6,31 @@ if (isset($_POST['decklist'])) { exit; } +$placeholder = <<<PLCHLDR +QUANTITY NAME (SET) NUMBER +3 Nissa, Who Shakes the World (WAR) 169 +PLCHLDR; + ?> -<form action="" method="POST"> - <textarea name="decklist"></textarea> - <button>Submit</button> -</form> +<!doctype html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <style> + * { + box-sizing: border-box; + } + textarea { + max-width: 100%; + } + </style> + </head> + <body> + <form action="" method="POST"> + <textarea name="decklist" placeholder="<?php echo $placeholder; ?>" rows="10" cols="40" style="max-width: 100%;"></textarea> + <button>Submit</button> + </form> + </body> +</html> diff --git a/mtg-pdf.php b/mtg-pdf.php index 9b705b0..087ae9e 100644 --- a/mtg-pdf.php +++ b/mtg-pdf.php @@ -112,7 +112,7 @@ $html = str_replace('{{imgs}}', implode('', $imgs), $template); $request = Gotenberg::chromium('gotenberg:3000') ->paperSize(8.27, 11.7) # A4 - ->margins(0, 0, 0, 0) + ->margins(0.3, 0, 0.3, 0) ->outputFilename(date("Ymd_His")) ->html(Stream::string('index.html', $html)); |