Added <header>, <main> and <footer> tags; Added version info and source link to footer
This commit is contained in:
parent
e575bb3a72
commit
2844fe18cc
1 changed files with 68 additions and 36 deletions
38
index.php
38
index.php
|
@ -11,10 +11,19 @@
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
border-bottom: 0.2rem solid lightgray;
|
border-bottom: 0.1em solid lightgray;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
display: inline-block;
|
||||||
|
border-top: 0.2em solid lightgray;
|
||||||
|
}
|
||||||
|
footer,
|
||||||
|
footer * {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
table#result {
|
table#result {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +91,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:required:invalid, :focus:invalid {
|
:required:invalid, :focus:invalid {
|
||||||
/* insert your own styles for invalid form input */
|
|
||||||
background-color: #ffeeee;
|
background-color: #ffeeee;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -106,7 +114,10 @@
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<header>
|
||||||
<h1>MtG Card Data Collector</h1>
|
<h1>MtG Card Data Collector</h1>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require 'vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
|
@ -230,7 +241,7 @@ foreach ([
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label for="query">Cards:<br><small id=linecounter>0/100</small></label>
|
<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
|
ORI 25
|
||||||
AER 178"><?= !empty($_REQUEST['query']) ? $_REQUEST['query'] : "" ?></textarea>
|
AER 178"><?= !empty($_REQUEST['query']) ? $_REQUEST['query'] : "" ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
@ -253,6 +264,27 @@ AER 178"><?= !empty($_REQUEST['query']) ? $_REQUEST['query'] : "" ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</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>
|
<script type="text/javascript">updateLineCounter()</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue