summaryrefslogtreecommitdiff
path: root/index.php
blob: 33ccfa208b787c3a00c531752a3c4d1e16d3f6bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

if (isset($_POST['decklist'])) {
  $_ENV['DECKLIST'] = $_POST['decklist'];
  include __DIR__ . '/mtg-pdf.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%;"></textarea>
      <button>Submit</button>
    </form>
  </body>
</html>