summaryrefslogtreecommitdiff
path: root/web/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/index.php')
-rw-r--r--web/index.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/web/index.php b/web/index.php
new file mode 100644
index 0000000..2aec31f
--- /dev/null
+++ b/web/index.php
@@ -0,0 +1,38 @@
+<?php
+
+if (isset($_POST['decklist'])) {
+ $_ENV['DECKLIST'] = $_POST['decklist'];
+ include __DIR__ . '/print/print.php';
+ exit;
+}
+
+$placeholder = <<<PLCHLDR
+QUANTITY NAME (SET) NUMBER
+3 Nissa, Who Shakes the World (WAR) 169
+PLCHLDR;
+
+?>
+
+<!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%;" required></textarea>
+ <button>Submit</button>
+ </form>
+ <hr>
+ <a href="https://git.dweipert.de/mtg-pdf">Source</a>
+ </body>
+</html>