summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-11-26 11:51:23 +0100
committerDaniel Weipert <code@drogueronin.de>2023-11-26 11:51:23 +0100
commit7bfd13f0886548dcd9a414c702144429fb117b04 (patch)
tree46f99d218992771fda72dd6d6c26da3398f3bf11
parent5d55842c465710c910735bb6a55fcb42f910984e (diff)
update commit
-rw-r--r--Justfile2
-rw-r--r--index.php30
-rw-r--r--mtg-pdf.php2
3 files changed, 28 insertions, 6 deletions
diff --git a/Justfile b/Justfile
index b5bb857..9551f3b 100644
--- a/Justfile
+++ b/Justfile
@@ -1,2 +1,2 @@
generate deck:
- DECKLIST="{{deck}}" docker compose run php
+ DECKLIST="{{deck}}" docker compose run cli
diff --git a/index.php b/index.php
index 4f403a3..33ccfa2 100644
--- a/index.php
+++ b/index.php
@@ -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));