commissions/by-artist/grey/index.html

330 lines
14 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Ubuntu&display=swap" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: "Ubuntu", sans-serif;
}
a.G, a.R, a.X {
display: inline-block;
border: 2px solid transparent;
overflow: hidden;
}
img {
max-height: 200px;
max-width: 100%;
}
a.X {
border: 2px solid red;
}
a.X img {
filter: blur(1rem);
}
a.R {
border: 2px solid orange;
}
a.R img {
filter: blur(0.5rem);
}
a.X img:hover, a.R img:hover {
filter: blur(0);
}
main {
max-width: 1024px;
border: 1px solid #ccc;
margin: 0 auto;
padding: 0.5rem;
overflow: none;
text-align: center;
}
footer {
max-width: 1024px;
margin: 0 auto;
padding: 1rem 0;
font-size: 10pt;
text-align: right;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 100%;
background-color: rgba(0, 0, 0, 0.8);
}
.modal .inner {
width: calc(100% - 2rem);
max-height: calc(100vh - 2rem);
max-width: 1024px;
position: relative;
overflow: scroll;
margin: 1rem auto;
padding: 0;
background-color: #fff;
}
.modal .meta {
padding: 1rem;
margin: 0 auto;
}
.show {
display: block !important;
}
.modal .img {
text-align: center;
width: 100%;
}
.modal .img img {
max-width: 100%;
max-height: 100vh;
}
dt {
font-weight: bold;
}
table {
margin: 0 auto;
min-width: 50%;
}
td {
padding: 5px;
}
tbody tr:nth-child(even) td {
background-color: #eee;
}
thead th {
border-bottom: 2px solid #888;
}
</style>
</head>
<body>
<main>
<h1>Artist: grey</h1>
<a href="grey--skeleton-punch--maddy--G.jpg" class="G">
<img src="../../thumbs/grey--skeleton-punch--maddy--G.jpg" title="skeleton-punch" alt="skeleton-punch" />
</a>
<a href="grey--z-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--z-sticker--makyo--G.png" title="z-sticker" alt="z-sticker" />
</a>
<a href="grey--wolver-small--happenstance--G.jpg" class="G">
<img src="../../thumbs/grey--wolver-small--happenstance--G.jpg" title="wolver-small" alt="wolver-small" />
</a>
<a href="grey--wat-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--wat-sticker--makyo--G.png" title="wat-sticker" alt="wat-sticker" />
</a>
<a href="grey--vrrr-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--vrrr-sticker--makyo--G.png" title="vrrr-sticker" alt="vrrr-sticker" />
</a>
<a href="grey--typing--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--typing--makyo--G.jpg" title="typing" alt="typing" />
</a>
<a href="grey--trans-small--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--trans-small--makyo--G.jpg" title="trans-small" alt="trans-small" />
</a>
<a href="grey--taurstretch-small--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--taurstretch-small--makyo--G.jpg" title="taurstretch-small" alt="taurstretch-small" />
</a>
<a href="grey--taurkyo-small--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--taurkyo-small--makyo--G.jpg" title="taurkyo-small" alt="taurkyo-small" />
</a>
<a href="grey--tea-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--tea-sticker--makyo--G.png" title="tea-sticker" alt="tea-sticker" />
</a>
<a href="grey--springtime--makyo--G.png" class="G">
<img src="../../thumbs/grey--springtime--makyo--G.png" title="springtime" alt="springtime" />
</a>
<a href="grey--snugabug-fixed--makyo-amdusias--G.jpg" class="G">
<img src="../../thumbs/grey--snugabug-fixed--makyo-amdusias--G.jpg" title="snugabug-fixed" alt="snugabug-fixed" />
</a>
<a href="grey--sneppers--maddy--G.jpg" class="G">
<img src="../../thumbs/grey--sneppers--maddy--G.jpg" title="sneppers" alt="sneppers" />
</a>
<a href="grey--snep--maddy--G.jpg" class="G">
<img src="../../thumbs/grey--snep--maddy--G.jpg" title="snep" alt="snep" />
</a>
<a href="grey--prance-small--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--prance-small--makyo--G.jpg" title="prance-small" alt="prance-small" />
</a>
<a href="grey--running-away-small--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--running-away-small--makyo--G.jpg" title="running-away-small" alt="running-away-small" />
</a>
<a href="grey--prettycorgi-via-amdusias--lexy--G.jpg" class="G">
<img src="../../thumbs/grey--prettycorgi-via-amdusias--lexy--G.jpg" title="prettycorgi-via-amdusias" alt="prettycorgi-via-amdusias" />
</a>
<a href="grey--sera--sera--G.jpg" class="G">
<img src="../../thumbs/grey--sera--sera--G.jpg" title="sera" alt="sera" />
</a>
<a href="grey--nature-boy--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--nature-boy--makyo--G.jpg" title="nature-boy" alt="nature-boy" />
</a>
<a href="grey--plush-small--macchi--G.jpg" class="G">
<img src="../../thumbs/grey--plush-small--macchi--G.jpg" title="plush-small" alt="plush-small" />
</a>
<a href="grey--oh-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--oh-sticker--makyo--G.png" title="oh-sticker" alt="oh-sticker" />
</a>
<a href="grey--music-small--makyo-amdusias--G.jpg" class="G">
<img src="../../thumbs/grey--music-small--makyo-amdusias--G.jpg" title="music-small" alt="music-small" />
</a>
<a href="grey--music-picnic--makyo-amdusias--G.jpg" class="G">
<img src="../../thumbs/grey--music-picnic--makyo-amdusias--G.jpg" title="music-picnic" alt="music-picnic" />
</a>
<a href="grey--monthly-jan--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--monthly-jan--makyo--G.jpg" title="monthly-jan" alt="monthly-jan" />
</a>
<a href="grey--micro-pirate-small--makyo-miko--G.jpg" class="G">
<img src="../../thumbs/grey--micro-pirate-small--makyo-miko--G.jpg" title="micro-pirate-small" alt="micro-pirate-small" />
</a>
<a href="grey--meshuga-small--makyo-amdusias--G.jpg" class="G">
<img src="../../thumbs/grey--meshuga-small--makyo-amdusias--G.jpg" title="meshuga-small" alt="meshuga-small" />
</a>
<a href="grey--interview-small--randomwolf--G.jpg" class="G">
<img src="../../thumbs/grey--interview-small--randomwolf--G.jpg" title="interview-small" alt="interview-small" />
</a>
<a href="grey--hot-beverages-small--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--hot-beverages-small--makyo--G.jpg" title="hot-beverages-small" alt="hot-beverages-small" />
</a>
<a href="grey--magical-girl--makyo-peri--G.jpg" class="G">
<img src="../../thumbs/grey--magical-girl--makyo-peri--G.jpg" title="magical-girl" alt="magical-girl" />
</a>
<a href="grey--high-fashion--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--high-fashion--makyo--G.jpg" title="high-fashion" alt="high-fashion" />
</a>
<a href="grey--frumpcore-small--makyo--G.jpg" class="G">
<img src="../../thumbs/grey--frumpcore-small--makyo--G.jpg" title="frumpcore-small" alt="frumpcore-small" />
</a>
<a href="grey--heart-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--heart-sticker--makyo--G.png" title="heart-sticker" alt="heart-sticker" />
</a>
<a href="grey--fluff-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--fluff-sticker--makyo--G.png" title="fluff-sticker" alt="fluff-sticker" />
</a>
<a href="grey--dogiversary-small--makyo-jd--G.jpg" class="G">
<img src="../../thumbs/grey--dogiversary-small--makyo-jd--G.jpg" title="dogiversary-small" alt="dogiversary-small" />
</a>
<a href="grey--dinner-talk-small--makyo-jd--G.jpg" class="G">
<img src="../../thumbs/grey--dinner-talk-small--makyo-jd--G.jpg" title="dinner-talk-small" alt="dinner-talk-small" />
</a>
<a href="grey--delphox--delphox--G.jpg" class="G">
<img src="../../thumbs/grey--delphox--delphox--G.jpg" title="delphox" alt="delphox" />
</a>
<a href="grey--christmas-mead-small--anonybadger--G.jpg" class="G">
<img src="../../thumbs/grey--christmas-mead-small--anonybadger--G.jpg" title="christmas-mead-small" alt="christmas-mead-small" />
</a>
<a href="grey--corgibust--lexy--G.jpg" class="G">
<img src="../../thumbs/grey--corgibust--lexy--G.jpg" title="corgibust" alt="corgibust" />
</a>
<a href="grey--blep-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--blep-sticker--makyo--G.png" title="blep-sticker" alt="blep-sticker" />
</a>
<a href="grey--bone-small--zephyr-falcon--G.jpg" class="G">
<img src="../../thumbs/grey--bone-small--zephyr-falcon--G.jpg" title="bone-small" alt="bone-small" />
</a>
<a href="grey--abloobloo-sticker--makyo--G.png" class="G">
<img src="../../thumbs/grey--abloobloo-sticker--makyo--G.png" title="abloobloo-sticker" alt="abloobloo-sticker" />
</a>
</main>
<footer>
Site built using <a href="https://commorg.projects.makyo.io" target="_blank">commission organizer</a> on 2022-10-07.
</footer>
<div class="modal">
<div class="inner">
<div class="meta"></div>
<div class="img"></div>
</div>
</div>
<script type="text/javascript">
const root = window.location.pathname.replace(/\/by-.+$/, '/');
const modal = document.querySelector('.modal');
const img = document.querySelector('.img');
const meta = document.querySelector('.meta');
const scroll = {
top: window.scrollY,
left: window.scrollX,
behavior: 'auto'
};
let mustLoadHash = window.location.hash !== '';
function loadHash() {
if (!mustLoadHash) {
mustLoadHash = true;
return;
}
hash = window.location.hash.replace('#', '');
if (hash !== '') {
scroll.top = window.scrollY;
scroll.left = window.scrollX;
document.querySelectorAll('.G, .R, .X').forEach(thumb => {
if (thumb.attributes.href.textContent === hash) {
thumb.click();
}
});
} else {
hideModal();
window.scrollTo(scroll);
}
}
function hideModal() {
modal.classList.remove('show');
// There's an edge case here, where if you load the page with
// no hash, click an image, then click back, it adds an empty
// hash to the URL (e.g: example.com/#). The problem with this
// is that it adds to the history, so if you click back from
// there, it goes to the location without the hash, then adds
// the hash again, meaning you can't back out of the page
// after clicking an image.
//
// The web is a mess and computers were a mistake.
if (window.location.hash !== '') {
window.location.hash = '';
}
}
document.body.addEventListener('keydown', evt => {
if (evt.key === 'Escape') {
hideModal();
}
});
modal.addEventListener('click', evt => {
hideModal();
});
window.onhashchange = loadHash;
document.querySelectorAll('.G, .R, .X').forEach(thumb => {
thumb.addEventListener('click', evt => {
const imgName = thumb.attributes.href.textContent;
const parts = imgName.split('.')[0].split('--');
const title = parts[1].replace(/-/g, ' ');
const characters = parts[2].split('-').map(c => `<a href="${root}by-character/${c}">${c}</a>`).join(', ');
evt.preventDefault();
modal.classList.add('show');
mustLoadHash = true;
window.location.hash = imgName;
img.innerHTML = `<a href="${imgName}" target="_blank"><img src="${imgName}" title="${title}" alt="${title}" /></a>`;
meta.innerHTML = `<h2>${title}</h2>
<table>
<thead>
<tr>
<th>Artist</th>
<th>Characters</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="${root}by-artist/${parts[0]}">${parts[0]}</a></td>
<td>${characters}</td>
<td><a href="${root}by-rating/${parts[3]}">${parts[3]}</a></td>
</tr>
</tbody>
</table>`;
});
});
loadHash();
</script>
</body>
</html>