58 lines
2.4 KiB
HTML
58 lines
2.4 KiB
HTML
{% extends "/base.html" %}
|
|
{% block title %}サーバーのバージョン - Nercone{% endblock %}
|
|
{% block extra_title %}Server Version{% endblock %}
|
|
{% block header_desc %}サーバーのバージョン{% endblock %}
|
|
{% block extra_head %}
|
|
<style>
|
|
main {
|
|
display: grid;
|
|
grid-template-rows: auto 1fr auto;
|
|
}
|
|
.big-text {
|
|
margin: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 48pt;
|
|
}
|
|
</style>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const el = document.getElementById('version-text');
|
|
let tapCount = 0, tapTimer = null, lastTouch = 0;
|
|
|
|
function onTap() {
|
|
tapCount++;
|
|
if (tapCount >= 3) {
|
|
clearTimeout(tapTimer);
|
|
tapCount = 0;
|
|
location.href = '/qr-code/';
|
|
return;
|
|
}
|
|
clearTimeout(tapTimer);
|
|
tapTimer = setTimeout(() => { tapCount = 0; }, 1000);
|
|
}
|
|
|
|
el.addEventListener('touchend', (e) => {
|
|
e.preventDefault();
|
|
lastTouch = Date.now();
|
|
onTap();
|
|
}, { passive: false });
|
|
|
|
el.addEventListener('click', () => {
|
|
if (Date.now() - lastTouch < 1000) return;
|
|
onTap();
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<p class="text-small text-bold"><a href="/" class="text-no-decoration">← ホーム</a></p>
|
|
<p id="version-text" class="text-highlight big-text"><span class="text-lowlight unselectable">#</span>{{ server_version }}</p>
|
|
<div class="block">
|
|
<p>このサーバーで現在使用されているソースコードのコミットID(ハッシュ)の先頭7文字です。</p>
|
|
<p>サーバーが起動されるたびに<span class="code">git rev-parse --short HEAD</span>を使用して取得しています。</p>
|
|
<p>詳しくは<a href="https://gitea.nercone.dev/nercone-dev/website/">このサーバーのソースコード</a>へ</p>
|
|
</div>
|
|
{% endblock %}
|