feat: ✨ add overview page
This commit is contained in:
parent
824fe614a4
commit
b338189713
@ -18,6 +18,7 @@ header, main, footer {
|
|||||||
|
|
||||||
section {
|
section {
|
||||||
border: 1px solid #666;
|
border: 1px solid #666;
|
||||||
|
overflow: hidden;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
@ -25,10 +26,16 @@ section {
|
|||||||
height: calc(100% - 75px);
|
height: calc(100% - 75px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.muted,
|
||||||
#bookmark {
|
#bookmark {
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.muted:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #335;
|
||||||
|
}
|
||||||
|
|
||||||
#img {
|
#img {
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
124
overview.php
Normal file
124
overview.php
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
|
include_once('src/storage.php');
|
||||||
|
|
||||||
|
// if (!isset($_GET['token']) || $_GET['token'] !== '*****') {
|
||||||
|
// exit("invalid access token");
|
||||||
|
// }
|
||||||
|
|
||||||
|
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
||||||
|
$bookmark = $protocol . '://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$entries = Storage::getAll($id);
|
||||||
|
}
|
||||||
|
catch(Exception $ex) {
|
||||||
|
exit($ex);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html prefix="og: http://ogp.me/ns#" lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Artist Credits</title>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta name="description" content="Overview" />
|
||||||
|
<meta name="keywords" content="eurofurence, Conbook, artist credits" />
|
||||||
|
<meta name="robots" content="index, follow, noodp" />
|
||||||
|
<meta name="author" content="The Eurofurence Conbook Team" />
|
||||||
|
<meta name="rating" content="general" />
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="favicon.png">
|
||||||
|
|
||||||
|
<meta property="og:image" content="img/ogp.jpg" />
|
||||||
|
<meta property="og:image:secure_url" content="img/ogp.jpg" />
|
||||||
|
<meta property="og:image:type" content="image/jpeg" />
|
||||||
|
<meta property="og:image:width" content="344" />
|
||||||
|
<meta property="og:image:height" content="247" />
|
||||||
|
<meta property="og:image:alt" content="Conbook Art Credits" />
|
||||||
|
<meta property="og:title" content="Conbook Art Credits" />
|
||||||
|
<meta property="og:description" content="Overview" />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:url" content="https://dogpixels.net/ef/conbook-artist-credits" />
|
||||||
|
<meta property="og:site_name" content="Conbook Art Credits" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
<meta name="twitter:title" content="Conbook Art Credits" />
|
||||||
|
<meta name="twitter:description" content="Overview" />
|
||||||
|
<meta name="twitter:image" content="img/ogp.jpg" />
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/uikit.min.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
||||||
|
|
||||||
|
<script src="js/uikit.min.js"></script>
|
||||||
|
<script src="js/uikit-icons.min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>Conbook Artist Credit</h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="uk-margin-bottom uk-grid-small uk-grid-match uk-child-width-1-1 uk-child-width-1-2@m" uk-grid>
|
||||||
|
<?php $i = 0;
|
||||||
|
foreach ($entries as $id => $data) { ?>
|
||||||
|
<div>
|
||||||
|
<section>
|
||||||
|
<?= "<h3><a href=\"$bookmark?id=$id\">$id</a></h3>" ?>
|
||||||
|
<div class="uk-margin">
|
||||||
|
<strong>Name:</strong>
|
||||||
|
<input type="text" id="e_<?= $i ?>_n" class="muted jscopy uk-input" value="<?= $data['name'] ?>" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="uk-margin">
|
||||||
|
<strong>Text:</strong>
|
||||||
|
<textarea id="e_<?= $i ?>_t" class="muted jscopy uk-textarea"><?= $data['desc'] ?></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="uk-margin">
|
||||||
|
<strong>Image:</strong>
|
||||||
|
<?= $data['img']? "<a href=\"" . $data['img'] . "\">" . basename($data['img']) . "</a>" : "<span class=\"uk-label uk-label-danger\">NO IMAGE</span>" ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<strong>Contributions:</strong>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
$j = 0;
|
||||||
|
if (file_exists("uppies/$id/gallery")) {
|
||||||
|
foreach(scandir("uppies/$id/gallery") as $g) {
|
||||||
|
if (in_array($g, ['.', '..', '.thumbs', '.DS_Store']))
|
||||||
|
continue;
|
||||||
|
echo "<li><a href=\"uppies/$id/gallery/$g\">$g</a></li>";
|
||||||
|
$j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($j === 0) echo "<li class=\"uk-label uk-label-danger\">NO FILES</li>";
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<?php $i++; } ?>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<hr />
|
||||||
|
<p>If you need assistance, please contact <a href="https://t.me/draconigen" target="_blank">@draconigen</a>.</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.querySelectorAll('.jscopy').forEach(element => {
|
||||||
|
element.addEventListener('click', (e) => {
|
||||||
|
e.target.setSelectionRange(0, e.target.value.length);
|
||||||
|
navigator.clipboard.writeText(e.target.value);
|
||||||
|
e.target.style.backgroundColor = "#335";
|
||||||
|
e.target.blur();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user