You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
3.4 KiB
72 lines
3.4 KiB
1 year ago
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>{% block title %}Tegaki Tuesday{% endblock %}</title>
|
||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
|
<link href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
|
||
|
<link href="/fonts/K-Gothic/stylesheet.css" rel="stylesheet">
|
||
|
<link href="/css/style.css" rel="stylesheet">
|
||
|
{% block head %}{% endblock head %}
|
||
|
</head>
|
||
|
<body>
|
||
|
{% if user %}
|
||
|
{% include "modal" %}
|
||
|
{% endif %}
|
||
|
<div id="content">
|
||
|
<nav>{% block nav %}{% include "nav" %}{% endblock %}</nav>
|
||
|
<div id="challenge">
|
||
|
<div>{% block content %}{% endblock %}</div>
|
||
|
<footer>
|
||
|
{% block content_copyright %}
|
||
|
Copyright {% include "copyright-years" %} Tegaki Tuesday. All rights reserved. 字ちゃん mascot art by <a href="https://twitter.com/bellumela" target="_blank">@bellumela</a>.
|
||
|
{% endblock %}
|
||
|
</footer>
|
||
|
</div>
|
||
|
<div id="submissions">
|
||
|
<script>
|
||
|
const submissionModal = image => {
|
||
|
const dialog = document.createElement("dialog");
|
||
|
dialog.style.padding = "0";
|
||
|
const img = document.createElement("img");
|
||
|
img.src = image.src;
|
||
|
const defaultZoom = "75vh";
|
||
|
img.style.height = defaultZoom;
|
||
|
img.style.cursor = "zoom-in";
|
||
|
img.style.display = "block";
|
||
|
img.style.margin = "0";
|
||
|
img.onclick = event => img.style.height = img.style.height ? "" : defaultZoom;
|
||
|
dialog.appendChild(img);
|
||
|
dialog.addEventListener("close", event => document.body.removeChild(dialog));
|
||
|
document.body.appendChild(dialog);
|
||
|
dialog.showModal();
|
||
|
};
|
||
|
</script>
|
||
|
<div>
|
||
|
{% for submission in submissions %}
|
||
|
{% if users %}
|
||
|
{% set author = users[submission.author_id] %}
|
||
|
{% else %}
|
||
|
{% set author = profile_user %}
|
||
|
{% endif %}
|
||
|
<figure>
|
||
|
<img src="/{{ submission.challenge }}/{{ submission.image }}" alt="{{ author.username }}'s submission" onclick="submissionModal('{{ submission.image }}')">
|
||
|
<figcaption>
|
||
|
{% if profile_user %}
|
||
|
<a href="/{{ submission.challenge }}">#{{ submission.challenge }}</a>
|
||
|
{% else %}
|
||
|
{% if not author.deleted %}<a href="/users/{{ author.name }}" target="_blank">{% endif %}{{ author.username }}{% if author.deleted %} (deleted account){% else %}</a>{% endif %}
|
||
|
{% endif %}
|
||
|
</figcaption>
|
||
|
</figure>
|
||
|
{% endfor %}
|
||
|
</div>
|
||
|
<footer>
|
||
|
{% block submissions_copyright %}
|
||
|
Submissions are copyright {% include "copyright-years" %} their respective submitters, and are licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</a> license.
|
||
|
{% endblock %}
|
||
|
</footer>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|