blob: 5c5b7afe39907980fbc59c91bd692742c2b32929 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<?php
if (isset($_POST['decklist'])) {
$_ENV['DECKLIST'] = $_POST['decklist'];
$_ENV['USE_UNROUNDED_CORNERS'] = isset($_POST['use_unrounded_corners']);
$_ENV['UNROUNDED_CORNER_COLOR'] = $_POST['unrounded_corner_color'];
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">
<div>
<textarea name="decklist" placeholder="<?php echo $placeholder; ?>" rows="10" cols="40" style="max-width: 100%;" required></textarea>
</div>
<div>
<label>Use Unrounded Corners <input type="checkbox" name="use_unrounded_corners" value="1"></label>
</div>
<div>
<label>Unrounded Corner Color <input type="color" name="unrounded_corner_color"></label>
</div>
<div>
<button style="width: 100%; min-height: 4rem;">Submit</button>
</div>
</form>
<hr>
<a href="https://git.dweipert.de/mtg-pdf">Source</a>
</body>
</html>
|