Added <header>, <main> and <footer> tags; Added version info and source link to footer

This commit is contained in:
fanir 2017-06-01 02:28:19 +02:00
parent e575bb3a72
commit 2844fe18cc

View file

@ -11,10 +11,19 @@
}
h1 {
font-size: 2rem;
border-bottom: 0.2rem solid lightgray;
border-bottom: 0.1em solid lightgray;
display: inline-block;
}
footer {
display: inline-block;
border-top: 0.2em solid lightgray;
}
footer,
footer * {
font-size: 0.75rem;
}
table#result {
border-collapse: collapse;
}
@ -82,7 +91,6 @@
}
:required:invalid, :focus:invalid {
/* insert your own styles for invalid form input */
background-color: #ffeeee;
}
</style>
@ -106,7 +114,10 @@
</script>
</head>
<body>
<header>
<h1>MtG Card Data Collector</h1>
</header>
<main>
<?php
require 'vendor/autoload.php';
@ -230,7 +241,7 @@ foreach ([
</div>
<div class="row">
<label for="query">Cards:<br><small id=linecounter>0/100</small></label>
<textarea id="query" name="query" rows="20" onkeyup="updateLineCounter()" <?= !isset($_REQUEST['query']) ? "autofocus" : "" ?> required placeholder="M12 7
<textarea id="query" name="query" rows="20" onkeyup="updateLineCounter();" <?= !isset($_REQUEST['query']) ? "autofocus" : "" ?> required placeholder="M12 7
ORI 25
AER 178"><?= !empty($_REQUEST['query']) ? $_REQUEST['query'] : "" ?></textarea>
</div>
@ -253,6 +264,27 @@ AER 178"><?= !empty($_REQUEST['query']) ? $_REQUEST['query'] : "" ?></textarea>
</div>
</div>
</form>
</main>
<footer>
<p>
Version:
<?php
$stdout=[];
exec("git log --format=\"%h|%cd|%d\" --decorate=short --date=short HEAD~1..HEAD", $stdout);
$parts = explode("|", $stdout[0]);
$offset_start = strpos($parts[2], "tag: ");
if ($offset_start !== false) {
$offset_start += 5;
$offset_end = strpos($parts[2], ",", $offset_start) or strpos($parts[1], ")", $offset_start);
echo substr($parts[2], $offset_start, $offset_end - $offset_start), "; ";
}
echo $parts[0], " (", $parts[1], ")";
?>
| <a href="https://git.zom.bi/fanir/mtg-cdc">Source</a>
</p>
</footer>
<script type="text/javascript">updateLineCounter()</script>
</body>
</html>